diff options
author | Michael Valenta | 2004-04-28 15:44:22 +0000 |
---|---|---|
committer | Michael Valenta | 2004-04-28 15:44:22 +0000 |
commit | 9a132b16227c28211eb4a9e5c799c67b26615b84 (patch) | |
tree | e72af8169dfcea20e3ddeee8a7cf49908ed65005 /bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/Utils.java | |
parent | e91862badfc991f88a65f6a32e7a0c3bb214560a (diff) | |
download | eclipse.platform.team-9a132b16227c28211eb4a9e5c799c67b26615b84.tar.gz eclipse.platform.team-9a132b16227c28211eb4a9e5c799c67b26615b84.tar.xz eclipse.platform.team-9a132b16227c28211eb4a9e5c799c67b26615b84.zip |
Initial release of page based synchronize API
Diffstat (limited to 'bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/Utils.java')
-rw-r--r-- | bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/Utils.java | 45 |
1 files changed, 35 insertions, 10 deletions
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/Utils.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/Utils.java index 1b8e27bad..3434ae092 100644 --- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/Utils.java +++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/Utils.java @@ -10,29 +10,49 @@ *******************************************************************************/ package org.eclipse.team.internal.ui; -import java.io.*; +import java.io.ByteArrayOutputStream; +import java.io.IOException; +import java.io.InputStream; import java.lang.reflect.InvocationTargetException; -import java.util.*; +import java.util.ArrayList; +import java.util.HashSet; import java.util.List; +import java.util.ResourceBundle; +import java.util.Set; import org.eclipse.compare.CompareConfiguration; import org.eclipse.compare.structuremergeviewer.IDiffContainer; import org.eclipse.compare.structuremergeviewer.IDiffElement; import org.eclipse.core.resources.IResource; -import org.eclipse.core.runtime.*; +import org.eclipse.core.runtime.CoreException; +import org.eclipse.core.runtime.IAdaptable; +import org.eclipse.core.runtime.IStatus; +import org.eclipse.core.runtime.NullProgressMonitor; +import org.eclipse.core.runtime.Status; import org.eclipse.core.runtime.jobs.Job; import org.eclipse.jface.action.IAction; -import org.eclipse.jface.dialogs.*; +import org.eclipse.jface.dialogs.ErrorDialog; +import org.eclipse.jface.dialogs.MessageDialog; +import org.eclipse.jface.dialogs.ProgressMonitorDialog; import org.eclipse.jface.operation.IRunnableWithProgress; import org.eclipse.jface.resource.ImageDescriptor; import org.eclipse.swt.custom.BusyIndicator; -import org.eclipse.swt.widgets.*; +import org.eclipse.swt.widgets.Control; +import org.eclipse.swt.widgets.Display; +import org.eclipse.swt.widgets.Shell; import org.eclipse.team.core.TeamException; import org.eclipse.team.core.synchronize.SyncInfo; import org.eclipse.team.core.variants.IResourceVariant; import org.eclipse.team.ui.TeamImages; import org.eclipse.team.ui.synchronize.ISynchronizeModelElement; -import org.eclipse.team.ui.synchronize.subscribers.SubscriberParticipant; +import org.eclipse.team.ui.synchronize.ISynchronizePageConfiguration; import org.eclipse.ui.*; +import org.eclipse.ui.IWorkbench; +import org.eclipse.ui.IWorkbenchPage; +import org.eclipse.ui.IWorkbenchPart; +import org.eclipse.ui.IWorkbenchPartSite; +import org.eclipse.ui.IWorkbenchSite; +import org.eclipse.ui.IWorkbenchWindow; +import org.eclipse.ui.IWorkingSet; import org.eclipse.ui.progress.IWorkbenchSiteProgressService; public class Utils { @@ -378,13 +398,13 @@ public class Utils { public static String modeToString(int mode) { switch (mode) { - case SubscriberParticipant.INCOMING_MODE : + case ISynchronizePageConfiguration.INCOMING_MODE : return Policy.bind("Utils.22"); //$NON-NLS-1$ - case SubscriberParticipant.OUTGOING_MODE : + case ISynchronizePageConfiguration.OUTGOING_MODE : return Policy.bind("Utils.23"); //$NON-NLS-1$ - case SubscriberParticipant.BOTH_MODE : + case ISynchronizePageConfiguration.BOTH_MODE : return Policy.bind("Utils.24"); //$NON-NLS-1$ - case SubscriberParticipant.CONFLICTING_MODE : + case ISynchronizePageConfiguration.CONFLICTING_MODE : return Policy.bind("Utils.25"); //$NON-NLS-1$ } return Policy.bind("Utils.26"); //$NON-NLS-1$ @@ -417,6 +437,7 @@ public class Utils { resource = ((ISynchronizeModelElement) element).getResource(); } else { resource = (IResource)getAdapter(element, IResource.class); + if(resource != null && resource.getType() == IResource.ROOT) continue; } if (resource != null) { resources.add(resource); @@ -507,4 +528,8 @@ public class Utils { if (o1 == null || o2 == null) return false; return o1.equals(o2); } + + public static String getKey(String id, String secondaryId) { + return secondaryId == null ? id : id + '/' + secondaryId; + } }
\ No newline at end of file |