Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJean Michel-Lemieux2003-12-14 22:55:34 -0500
committerJean Michel-Lemieux2003-12-14 22:55:34 -0500
commit07ace86a1de1f16989a1c09a8cc32e7269b61fbb (patch)
tree1272652ac213afce5256931317e919bcbea6df75
parent1712187be6ac619a3567efc5c7b99a8fd49ade63 (diff)
downloadeclipse.platform.team-07ace86a1de1f16989a1c09a8cc32e7269b61fbb.tar.gz
eclipse.platform.team-07ace86a1de1f16989a1c09a8cc32e7269b61fbb.tar.xz
eclipse.platform.team-07ace86a1de1f16989a1c09a8cc32e7269b61fbb.zip
*** empty log message ***
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CommitCommentArea.java2
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/ReleaseCommentDialog.java66
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/SharingWizardFinishPage.java16
-rw-r--r--bundles/org.eclipse.team.ui/TODO-syncview.txt13
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/Utils.java49
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/dialogs/DetailsDialog.java6
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/dialogs/DialogArea.java2
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/RefreshCompleteDialog.java44
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/SyncInfoDiffViewerForSynchronizeView.java79
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/SynchronizeManager.java1
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/compare/RemoteResourceTypedElement.java4
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/compare/SyncInfoCompareInput.java63
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/compare/SyncInfoSetCompareInput.java78
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/sets/SubscriberInput.java21
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/sets/SyncSet.java24
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/sets/SyncSetInputFromSyncSet.java2
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/views/CompressedFolder.java10
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/views/CompressedFolderContentProvider.java5
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/views/SyncSetContentProvider.java4
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/views/SyncSetTableContentProvider.java2
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ISyncInfoSet.java45
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ISyncInfoSetChangeEvent.java22
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ITeamSubscriberSyncInfoSets.java8
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/SyncInfoDiffNode.java62
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/SyncInfoDiffTreeViewer.java100
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/TeamSubscriberParticipantPage.java1
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/actions/SubscriberAction.java11
27 files changed, 523 insertions, 217 deletions
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CommitCommentArea.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CommitCommentArea.java
index 430c19c53..9fb2e0fe5 100644
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CommitCommentArea.java
+++ b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CommitCommentArea.java
@@ -39,7 +39,7 @@ import org.eclipse.team.internal.ui.dialogs.DialogArea;
public class CommitCommentArea extends DialogArea {
private static final int WIDTH_HINT = 350;
- private static final int HEIGHT_HINT = 150;
+ private static final int HEIGHT_HINT = 50;
private Text text;
private Combo previousCommentsCombo;
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/ReleaseCommentDialog.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/ReleaseCommentDialog.java
index f870f30d0..1f112a684 100644
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/ReleaseCommentDialog.java
+++ b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/ReleaseCommentDialog.java
@@ -10,24 +10,31 @@
*******************************************************************************/
package org.eclipse.team.internal.ccvs.ui;
+import java.lang.reflect.InvocationTargetException;
+
+import org.eclipse.compare.CompareConfiguration;
+import org.eclipse.compare.CompareEditorInput;
import org.eclipse.core.resources.IResource;
+import org.eclipse.core.runtime.NullProgressMonitor;
import org.eclipse.jface.dialogs.Dialog;
import org.eclipse.jface.util.IPropertyChangeListener;
import org.eclipse.jface.util.PropertyChangeEvent;
import org.eclipse.swt.SWT;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Shell;
+import org.eclipse.swt.widgets.*;
+import org.eclipse.team.internal.ui.dialogs.DetailsDialog;
+import org.eclipse.team.internal.ui.synchronize.compare.SyncInfoSetCompareInput;
import org.eclipse.ui.help.WorkbenchHelp;
/**
* Prompts the user for a multi-line comment for releasing to CVS.
*/
-public class ReleaseCommentDialog extends Dialog {
+public class ReleaseCommentDialog extends DetailsDialog {
CommitCommentArea commitCommentArea;
+ private IResource[] resourcesToCommit;
+ private CompareEditorInput compareEditorInput;
/**
* ReleaseCommentDialog constructor.
@@ -35,9 +42,10 @@ public class ReleaseCommentDialog extends Dialog {
* @param parentShell the parent of this dialog
*/
public ReleaseCommentDialog(Shell parentShell, IResource[] resourcesToCommit) {
- super(parentShell);
+ super(parentShell, Policy.bind("ReleaseCommentDialog.title"));
+ this.resourcesToCommit = resourcesToCommit;
int shellStyle = getShellStyle();
- setShellStyle(shellStyle | SWT.RESIZE);
+ setShellStyle(shellStyle | SWT.RESIZE | SWT.MAX);
commitCommentArea = new CommitCommentArea(this, null);
// Get a project from which the commit template can be obtained
if (resourcesToCommit.length > 0)
@@ -47,7 +55,7 @@ public class ReleaseCommentDialog extends Dialog {
/*
* @see Dialog#createDialogArea(Composite)
*/
- protected Control createDialogArea(Composite parent) {
+ protected void createMainDialogArea(Composite parent) {
getShell().setText(Policy.bind("ReleaseCommentDialog.title")); //$NON-NLS-1$
Composite composite = new Composite(parent, SWT.NULL);
composite.setLayout(new GridLayout());
@@ -61,11 +69,13 @@ public class ReleaseCommentDialog extends Dialog {
}
});
+ compareEditorInput = new SyncInfoSetCompareInput(new CompareConfiguration(), resourcesToCommit, CVSUIPlugin.getPlugin().getCvsWorkspaceSynchronizeParticipant().getInput());
+
// set F1 help
WorkbenchHelp.setHelp(composite, IHelpContextIds.RELEASE_COMMENT_DIALOG);
Dialog.applyDialogFont(parent);
- return composite;
+ //return composite;
}
/**
@@ -76,4 +86,44 @@ public class ReleaseCommentDialog extends Dialog {
return commitCommentArea.getComment();
}
+ /* (non-Javadoc)
+ * @see org.eclipse.team.internal.ui.dialogs.DetailsDialog#createDropDownDialogArea(org.eclipse.swt.widgets.Composite)
+ */
+ protected Composite createDropDownDialogArea(Composite parent) {
+ try {
+ compareEditorInput.run(new NullProgressMonitor());
+ } catch (InterruptedException e) {
+ } catch (InvocationTargetException e) {
+ }
+
+ Composite result= new Composite(parent, SWT.NONE);
+ GridLayout layout= new GridLayout();
+ result.setLayout(layout);
+ GridData data = new GridData(GridData.FILL_BOTH);
+ data.grabExcessHorizontalSpace = true;
+ data.grabExcessVerticalSpace = true;
+ data.heightHint = 350;
+ result.setLayoutData(data);
+ Label l = new Label(result, SWT.WRAP);
+ l.setText("Review resources that will be committed:");
+ Control c = compareEditorInput.createContents(result);
+ data = new GridData(GridData.FILL_BOTH);
+ c.setLayoutData(data);
+ return result;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.team.internal.ui.dialogs.DetailsDialog#updateEnablements()
+ */
+ protected void updateEnablements() {
+ // TODO Auto-generated method stub
+
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jface.window.Window#close()
+ */
+ public boolean close() {
+ return super.close();
+ }
}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/SharingWizardFinishPage.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/SharingWizardFinishPage.java
index 9425c59a0..247a49996 100644
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/SharingWizardFinishPage.java
+++ b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/SharingWizardFinishPage.java
@@ -16,6 +16,7 @@ import java.lang.reflect.InvocationTargetException;
import org.eclipse.compare.CompareConfiguration;
import org.eclipse.compare.CompareEditorInput;
import org.eclipse.core.resources.IResource;
+import org.eclipse.core.resources.ResourcesPlugin;
import org.eclipse.core.runtime.*;
import org.eclipse.jface.action.ToolBarManager;
import org.eclipse.jface.dialogs.Dialog;
@@ -49,11 +50,13 @@ public class SharingWizardFinishPage extends CVSWizardPage {
}
public Viewer createDiffViewer(Composite parent) {
- return new SyncInfoDiffTreeViewer(parent, participant2, participant2.getInput().getFilteredSyncSet());
+ SyncInfoDiffTreeViewer v = new SyncInfoDiffTreeViewer(parent, participant2, participant2.getInput().getFilteredSyncSet());
+ v.updateCompareEditorInput(this);
+ return v;
}
protected Object prepareInput(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
- return null; //new SyncInfoDiffNode(participant2.getInput().getFilteredSyncSet(), participant2.getInput().getFilteredSyncSet().g);
+ return new SyncInfoDiffNode(participant2.getInput().getFilteredSyncSet(), ResourcesPlugin.getWorkspace().getRoot());
}
};
@@ -77,7 +80,7 @@ public class SharingWizardFinishPage extends CVSWizardPage {
// setControl(composite);
// Dialog.applyDialogFont(parent);
- setControl(createCoolControl(parent));
+ setControl(createFullCompareControl(parent));
}
@@ -109,8 +112,13 @@ public class SharingWizardFinishPage extends CVSWizardPage {
GridLayout layout= new GridLayout();
layout.marginHeight= 0; layout.marginWidth= 0;
result.setLayout(layout);
+ GridData data = new GridData(GridData.FILL_BOTH);
+ data.grabExcessHorizontalSpace = true;
+ data.grabExcessVerticalSpace = true;
+ result.setLayoutData(data);
- input.createContents(result);
+ Control c = input.createContents(result);
+ c.setLayoutData(new GridData(GridData.FILL_BOTH));
return result;
}
diff --git a/bundles/org.eclipse.team.ui/TODO-syncview.txt b/bundles/org.eclipse.team.ui/TODO-syncview.txt
index 0a95c8145..69b484e56 100644
--- a/bundles/org.eclipse.team.ui/TODO-syncview.txt
+++ b/bundles/org.eclipse.team.ui/TODO-syncview.txt
@@ -7,4 +7,15 @@
- P1 mode switching at the end of a refresh to ensure that changes are shown if available
- P2 need an event for adding roots to a subscriber to update the list shown
- P2 support for table widget in changes page
-- remove duplicated tree/table viewers classes. the orignial ones simply have the INavigable behavior. \ No newline at end of file
+- remove duplicated tree/table viewers classes. the orignial ones simply have the INavigable behavior.
+- make changes section only be a pagebook. this would easily allow adding any number of composites to the page?
+- compareeditorinput fetcheds remote content outside of a progress monitor
+- decorations for SyncInfoDiffElements (of which type.. project persistent property setting?)
+- labels for compare editors (text merge viewers and title for diff viewer)
+x generic navigate support for SyncInfoDiffTreeViewer
+- readonly state for compare panes
+- progress support added when fetching (e.g. caching contents in ITypedElement). This will require compare to add some API.
+- INavigable in compare needs to be made API.
+- details dialog needs to create composites once then display them. Or only create once!!!!
+- sync set filtering creation must be more precise. For example you should be able to specify a root and a direction.
+- cvs update/commit action in sync view toolbar are not updating their state anymore :( \ No newline at end of file
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 27ac8964b..b25ba7e7b 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
@@ -13,6 +13,7 @@ package org.eclipse.team.internal.ui;
import java.lang.reflect.InvocationTargetException;
import java.util.ResourceBundle;
+import org.eclipse.compare.CompareConfiguration;
import org.eclipse.core.runtime.*;
import org.eclipse.jface.action.IAction;
import org.eclipse.jface.dialogs.*;
@@ -21,6 +22,8 @@ import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.swt.custom.BusyIndicator;
import org.eclipse.swt.widgets.*;
import org.eclipse.team.core.TeamException;
+import org.eclipse.team.core.subscribers.SyncInfo;
+import org.eclipse.team.core.sync.IRemoteResource;
import org.eclipse.team.ui.TeamImages;
import org.eclipse.team.ui.synchronize.TeamSubscriberParticipant;
import org.eclipse.ui.*;
@@ -243,9 +246,55 @@ public class Utils {
return null;
}
+ public static IWorkbenchPartSite findSite() {
+ IWorkbench workbench = TeamUIPlugin.getPlugin().getWorkbench();
+ IWorkbenchWindow window = workbench.getActiveWorkbenchWindow();
+ if(window != null) {
+ IWorkbenchPage page = window.getActivePage();
+ if(page != null) {
+ IWorkbenchPart part = page.getActivePart();
+ if(part != null) return part.getSite();
+ }
+ }
+ return null;
+ }
+
public static void initAction(IAction a, String prefix) {
Utils.initAction(a, prefix, Policy.bundle);
}
+
+ public static void updateLabels(SyncInfo sync, CompareConfiguration config) {
+ final IRemoteResource remote = sync.getRemote();
+ final IRemoteResource base = sync.getBase();
+
+ String localContentId = sync.getLocalContentIdentifier();
+ if (localContentId != null) {
+ config.setLeftLabel(Policy.bind("SyncInfoCompareInput.localLabelExists", localContentId)); //$NON-NLS-1$
+ } else {
+ config.setLeftLabel(Policy.bind("SyncInfoCompareInput.localLabel")); //$NON-NLS-1$
+ }
+
+ if (remote != null) {
+ try {
+ config.setRightLabel(Policy.bind("SyncInfoCompareInput.remoteLabelExists", remote.getContentIdentifier())); //$NON-NLS-1$
+ } catch (TeamException e) {
+ config.setRightLabel(Policy.bind("SyncInfoCompareInput.remoteLabel")); //$NON-NLS-1$
+ }
+ } else {
+ config.setRightLabel(Policy.bind("SyncInfoCompareInput.remoteLabel")); //$NON-NLS-1$
+ }
+
+ if (base != null) {
+ try {
+ config.setAncestorLabel(Policy.bind("SyncInfoCompareInput.baseLabelExists", base.getContentIdentifier())); //$NON-NLS-1$
+ } catch (TeamException e) {
+ config.setAncestorLabel(Policy.bind("SyncInfoCompareInput.baseLabel")); //$NON-NLS-1$
+ }
+ } else {
+ config.setAncestorLabel(Policy.bind("SyncInfoCompareInput.baseLabel")); //$NON-NLS-1$
+ }
+ }
+
/**
* Initialize the given Action from a ResourceBundle.
*/
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/dialogs/DetailsDialog.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/dialogs/DetailsDialog.java
index 229dc9190..14653f485 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/dialogs/DetailsDialog.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/dialogs/DetailsDialog.java
@@ -18,11 +18,7 @@ import org.eclipse.swt.graphics.Image;
import org.eclipse.swt.graphics.Point;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.Shell;
+import org.eclipse.swt.widgets.*;
/**
* A simple superclass for detail button dialogs.
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/dialogs/DialogArea.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/dialogs/DialogArea.java
index 0e428747c..035f8a3cb 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/dialogs/DialogArea.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/dialogs/DialogArea.java
@@ -197,6 +197,8 @@ public abstract class DialogArea {
// GridLayout
GridLayout layout = new GridLayout();
layout.numColumns = numColumns;
+ layout.marginHeight = 0;
+ layout.marginWidth = 0;
composite.setLayout(layout);
// GridData
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/RefreshCompleteDialog.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/RefreshCompleteDialog.java
index 12c5c7819..b802f36be 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/RefreshCompleteDialog.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/RefreshCompleteDialog.java
@@ -10,6 +10,12 @@
*******************************************************************************/
package org.eclipse.team.internal.ui.synchronize;
+import java.lang.reflect.InvocationTargetException;
+
+import org.eclipse.compare.CompareConfiguration;
+import org.eclipse.compare.CompareEditorInput;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.runtime.NullProgressMonitor;
import org.eclipse.jface.dialogs.Dialog;
import org.eclipse.swt.SWT;
import org.eclipse.swt.graphics.FontMetrics;
@@ -19,6 +25,7 @@ import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.*;
import org.eclipse.team.core.subscribers.SyncInfo;
import org.eclipse.team.internal.ui.dialogs.DetailsDialog;
+import org.eclipse.team.internal.ui.synchronize.compare.SyncInfoSetCompareInput;
import org.eclipse.team.ui.synchronize.ITeamSubscriberSyncInfoSets;
public class RefreshCompleteDialog extends DetailsDialog {
@@ -26,12 +33,18 @@ public class RefreshCompleteDialog extends DetailsDialog {
private SyncInfo[] changes;
private ITeamSubscriberSyncInfoSets[] inputs;
private Button openSyncButton;
-
+ private CompareEditorInput compareEditorInput;
+
public RefreshCompleteDialog(Shell parentShell, SyncInfo[] changes, ITeamSubscriberSyncInfoSets[] inputs) {
super(parentShell, "Synchronization Complete");
setImageKey(DLG_IMG_INFO);
this.changes = changes;
this.inputs = inputs;
+ this.compareEditorInput = new SyncInfoSetCompareInput(new CompareConfiguration(), getResources(), inputs[0]) {
+ protected boolean allowParticipantMenuContributions() {
+ return true;
+ }
+ };
}
/* (non-Javadoc)
@@ -78,7 +91,25 @@ public class RefreshCompleteDialog extends DetailsDialog {
* @see org.eclipse.team.internal.ui.dialogs.DetailsDialog#createDropDownDialogArea(org.eclipse.swt.widgets.Composite)
*/
protected Composite createDropDownDialogArea(Composite parent) {
- return null;
+ try {
+ compareEditorInput.run(new NullProgressMonitor());
+ } catch (InterruptedException e) {
+ } catch (InvocationTargetException e) {
+ }
+
+ Composite result= new Composite(parent, SWT.NONE);
+ GridLayout layout= new GridLayout();
+ result.setLayout(layout);
+ GridData data = new GridData(GridData.FILL_BOTH);
+ data.grabExcessHorizontalSpace = true;
+ data.grabExcessVerticalSpace = true;
+ data.heightHint = 350;
+ result.setLayoutData(data);
+
+ Control c = compareEditorInput.createContents(result);
+ data = new GridData(GridData.FILL_BOTH);
+ c.setLayoutData(data);
+ return result;
}
/* (non-Javadoc)
@@ -129,4 +160,13 @@ public class RefreshCompleteDialog extends DetailsDialog {
combo.setLayoutData(data);
return combo;
}
+
+ private IResource[] getResources() {
+ IResource[] resources = new IResource[changes.length];
+ for (int i = 0; i < changes.length; i++) {
+ SyncInfo info = changes[i];
+ resources[i] = info.getLocal();
+ }
+ return resources;
+ }
} \ No newline at end of file
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/SyncInfoDiffViewerForSynchronizeView.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/SyncInfoDiffViewerForSynchronizeView.java
index b5e5cfc7f..f0dae6e7c 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/SyncInfoDiffViewerForSynchronizeView.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/SyncInfoDiffViewerForSynchronizeView.java
@@ -18,46 +18,43 @@ import org.eclipse.team.core.subscribers.SyncInfo;
import org.eclipse.team.internal.ui.Policy;
import org.eclipse.team.internal.ui.Utils;
import org.eclipse.team.internal.ui.synchronize.actions.*;
-import org.eclipse.team.internal.ui.synchronize.sets.SyncSet;
import org.eclipse.team.ui.synchronize.*;
import org.eclipse.ui.IWorkbenchActionConstants;
public class SyncInfoDiffViewerForSynchronizeView extends SyncInfoDiffTreeViewer {
private TeamSubscriberParticipant participant;
- private SyncSet set;
-
+
//private ISynchronizeView view;
-
+
private OpenWithActionGroup openWithActions;
private RefactorActionGroup refactorActions;
private RefreshAction refreshSelectionAction;
private Action expandAll;
private ISynchronizeView view;
-
- public SyncInfoDiffViewerForSynchronizeView(Composite parent, ISynchronizeView view, TeamSubscriberParticipant participant, SyncSet set) {
+
+ public SyncInfoDiffViewerForSynchronizeView(Composite parent, ISynchronizeView view, TeamSubscriberParticipant participant, ISyncInfoSet set) {
super(parent, participant, set);
this.view = view;
- this.set = set;
this.participant = participant;
-
+
openWithActions = new OpenWithActionGroup(view, participant);
refactorActions = new RefactorActionGroup(view.getSite().getPage().getActivePart());
- refreshSelectionAction = new RefreshAction(view.getSite().getPage(), participant, false /* refresh all */);
+ refreshSelectionAction = new RefreshAction(view.getSite().getPage(), participant, false /*refresh*/);
expandAll = new Action() {
public void run() {
expandAllFromSelection();
}
};
Utils.initAction(expandAll, "action.expandAll."); //$NON-NLS-1$
-
+ setAcceptParticipantMenuContributions(true);
}
-
+
private void handleOpen(OpenEvent event) {
openWithActions.openInCompareEditor();
}
-
- protected void fillContextMenu(IMenuManager manager) {
+
+ protected void fillContextMenu(IMenuManager manager) {
openWithActions.fillContextMenu(manager);
refactorActions.fillContextMenu(manager);
manager.add(refreshSelectionAction);
@@ -67,47 +64,47 @@ public class SyncInfoDiffViewerForSynchronizeView extends SyncInfoDiffTreeViewer
}
protected void initializeListeners() {
- addSelectionChangedListener(new ISelectionChangedListener() {
+ addSelectionChangedListener(new ISelectionChangedListener() {
public void selectionChanged(SelectionChangedEvent event) {
- updateStatusLine((IStructuredSelection)event.getSelection());
+ updateStatusLine((IStructuredSelection) event.getSelection());
+ }
+ });
+ addOpenListener(new IOpenListener() {
+ public void open(OpenEvent event) {
+ handleOpen(event);
+ }
+ });
+ addDoubleClickListener(new IDoubleClickListener() {
+ public void doubleClick(DoubleClickEvent event) {
+ handleDoubleClick(event);
}
});
- addOpenListener(new IOpenListener() {
- public void open(OpenEvent event) {
- handleOpen(event);
- }
- });
- addDoubleClickListener(new IDoubleClickListener() {
- public void doubleClick(DoubleClickEvent event) {
- handleDoubleClick(event);
- }
- });
}
-
-
-
+
/**
* Updates the message shown in the status line.
- *
- * @param selection the current selection
+ *
+ * @param selection
+ * the current selection
*/
private void updateStatusLine(IStructuredSelection selection) {
String msg = getStatusLineMessage(selection);
view.getViewSite().getActionBars().getStatusLineManager().setMessage(msg);
}
-
+
/**
* Returns the message to show in the status line.
- *
- * @param selection the current selection
+ *
+ * @param selection
+ * the current selection
* @return the status line message
* @since 2.0
*/
private String getStatusLineMessage(IStructuredSelection selection) {
if (selection.size() == 1) {
Object first = selection.getFirstElement();
- if(first instanceof SyncInfoDiffNode) {
- SyncInfo info = ((SyncInfoDiffNode)first).getSyncInfo();
+ if (first instanceof SyncInfoDiffNode) {
+ SyncInfo info = ((SyncInfoDiffNode) first).getSyncInfo();
if (info == null) {
return Policy.bind("SynchronizeView.12"); //$NON-NLS-1$
} else {
@@ -119,15 +116,17 @@ public class SyncInfoDiffViewerForSynchronizeView extends SyncInfoDiffTreeViewer
return selection.size() + Policy.bind("SynchronizeView.13"); //$NON-NLS-1$
}
return ""; //$NON-NLS-1$
- }
- /* (non-Javadoc)
+ }
+ /*
+ * (non-Javadoc)
+ *
* @see org.eclipse.team.ui.synchronize.SyncInfoDiffTreeViewer#handleDoubleClick(org.eclipse.jface.viewers.DoubleClickEvent)
*/
protected void handleDoubleClick(DoubleClickEvent event) {
IStructuredSelection selection = (IStructuredSelection) event.getSelection();
- SyncInfoDiffNode node = (SyncInfoDiffNode)selection.getFirstElement();
- if(node != null) {
- if(node.getResource().getType() == IResource.FILE) {
+ SyncInfoDiffNode node = (SyncInfoDiffNode) selection.getFirstElement();
+ if (node != null) {
+ if (node.getResource().getType() == IResource.FILE) {
openWithActions.openInCompareEditor();
return;
}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/SynchronizeManager.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/SynchronizeManager.java
index bd73fdb45..56d2feebb 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/SynchronizeManager.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/SynchronizeManager.java
@@ -300,7 +300,6 @@ public class SynchronizeManager implements ISynchronizeManager {
public ISynchronizeView showSynchronizeViewInActivePage(IWorkbenchPage activePage) {
IWorkbench workbench = TeamUIPlugin.getPlugin().getWorkbench();
IWorkbenchWindow window = workbench.getActiveWorkbenchWindow();
-
if (!TeamUIPlugin.getPlugin().getPreferenceStore().getString(IPreferenceIds.SYNCVIEW_DEFAULT_PERSPECTIVE).equals(IPreferenceIds.SYNCVIEW_DEFAULT_PERSPECTIVE_NONE)) {
try {
String pId = TeamUIPlugin.getPlugin().getPreferenceStore().getString(IPreferenceIds.SYNCVIEW_DEFAULT_PERSPECTIVE);
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/compare/RemoteResourceTypedElement.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/compare/RemoteResourceTypedElement.java
index d64d66bdf..1b0a00410 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/compare/RemoteResourceTypedElement.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/compare/RemoteResourceTypedElement.java
@@ -17,6 +17,7 @@ import org.eclipse.compare.CompareUI;
import org.eclipse.compare.IEditableContent;
import org.eclipse.compare.ITypedElement;
import org.eclipse.core.resources.IStorage;
+import org.eclipse.core.runtime.*;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.swt.graphics.Image;
@@ -92,6 +93,9 @@ public class RemoteResourceTypedElement extends BufferedContent implements IType
* @see BufferedContent#createStream()
*/
protected InputStream createStream() throws CoreException {
+ if(bufferedContents == null) {
+ cacheContents(new NullProgressMonitor());
+ }
if (bufferedContents != null) {
return bufferedContents.getContents();
}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/compare/SyncInfoCompareInput.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/compare/SyncInfoCompareInput.java
index f6b5e54c4..7d1b25e41 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/compare/SyncInfoCompareInput.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/compare/SyncInfoCompareInput.java
@@ -19,11 +19,9 @@ import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.swt.graphics.Image;
import org.eclipse.team.core.TeamException;
import org.eclipse.team.core.subscribers.SyncInfo;
-import org.eclipse.team.core.sync.IRemoteResource;
-import org.eclipse.team.internal.ui.Policy;
-import org.eclipse.team.internal.ui.TeamUIPlugin;
+import org.eclipse.team.internal.ui.*;
import org.eclipse.team.ui.ISharedImages;
-import org.eclipse.team.ui.synchronize.*;
+import org.eclipse.team.ui.synchronize.SyncInfoDiffNode;
public class SyncInfoCompareInput extends CompareEditorInput {
@@ -31,30 +29,10 @@ public class SyncInfoCompareInput extends CompareEditorInput {
private SyncInfoDiffNode node;
private static Image titleImage;
- public static SyncInfoDiffNode createSyncInfoDiffNode(SyncInfo sync) {
- // Create the local ITypedElement
- ITypedElement localTypedElement = SyncInfoDiffNode.createTypeElement(sync.getLocal(), sync.getKind());
-
- // Create the remote ITypedElement
- ITypedElement remoteTypedElement = null;
- IRemoteResource remoteResource = sync.getRemote();
- if (remoteResource != null) {
- remoteTypedElement = SyncInfoDiffNode.createTypeElement(remoteResource);
- }
-
- // Create the base ITypedElement
- ITypedElement baseTypedElement = null;
- IRemoteResource baseResource = sync.getBase();
- if (baseResource != null) {
- baseTypedElement = SyncInfoDiffNode.createTypeElement(baseResource);
- }
- return new SyncInfoDiffNode(baseTypedElement, localTypedElement, remoteTypedElement, sync.getKind());
- }
-
public SyncInfoCompareInput(SyncInfo sync) {
super(new CompareConfiguration());
this.sync = sync;
- this.node = createSyncInfoDiffNode(sync);
+ this.node = new SyncInfoDiffNode(sync);
initializeContentChangeListeners();
}
@@ -94,7 +72,7 @@ public class SyncInfoCompareInput extends CompareEditorInput {
// update the title now that the remote revision number as been fetched
// from the server
setTitle(getTitle());
- updateLabels();
+ Utils.updateLabels(sync, getCompareConfiguration());
try {
node.cacheContents(monitor);
} catch (TeamException e) {
@@ -112,39 +90,6 @@ public class SyncInfoCompareInput extends CompareEditorInput {
return Policy.bind("SyncInfoCompareInput.title", node.getName()); //$NON-NLS-1$
}
- protected void updateLabels() {
- final CompareConfiguration config = getCompareConfiguration();
- final IRemoteResource remote = sync.getRemote();
- final IRemoteResource base = sync.getBase();
-
- String localContentId = sync.getLocalContentIdentifier();
- if (localContentId != null) {
- config.setLeftLabel(Policy.bind("SyncInfoCompareInput.localLabelExists", localContentId)); //$NON-NLS-1$
- } else {
- config.setLeftLabel(Policy.bind("SyncInfoCompareInput.localLabel")); //$NON-NLS-1$
- }
-
- if (remote != null) {
- try {
- config.setRightLabel(Policy.bind("SyncInfoCompareInput.remoteLabelExists", remote.getContentIdentifier())); //$NON-NLS-1$
- } catch (TeamException e) {
- config.setRightLabel(Policy.bind("SyncInfoCompareInput.remoteLabel")); //$NON-NLS-1$
- }
- } else {
- config.setRightLabel(Policy.bind("SyncInfoCompareInput.remoteLabel")); //$NON-NLS-1$
- }
-
- if (base != null) {
- try {
- config.setAncestorLabel(Policy.bind("SyncInfoCompareInput.baseLabelExists", base.getContentIdentifier())); //$NON-NLS-1$
- } catch (TeamException e) {
- config.setAncestorLabel(Policy.bind("SyncInfoCompareInput.baseLabel")); //$NON-NLS-1$
- }
- } else {
- config.setAncestorLabel(Policy.bind("SyncInfoCompareInput.baseLabel")); //$NON-NLS-1$
- }
- }
-
/*
* (non-Javadoc)
*
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/compare/SyncInfoSetCompareInput.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/compare/SyncInfoSetCompareInput.java
new file mode 100644
index 000000000..11d41ff54
--- /dev/null
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/compare/SyncInfoSetCompareInput.java
@@ -0,0 +1,78 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2003 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Common Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.team.internal.ui.synchronize.compare;
+
+import java.lang.reflect.InvocationTargetException;
+
+import org.eclipse.compare.CompareConfiguration;
+import org.eclipse.compare.CompareEditorInput;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.jface.viewers.*;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.team.internal.ui.Utils;
+import org.eclipse.team.ui.synchronize.*;
+
+public class SyncInfoSetCompareInput extends CompareEditorInput {
+ // TODO: when are these objects disposed, and how to hook in to the dispose to free listeners?
+ private IResource[] resources;
+ private ISyncInfoSet set;
+ private ITeamSubscriberSyncInfoSets sets;
+
+ public SyncInfoSetCompareInput(CompareConfiguration configuration, IResource[] resources, ITeamSubscriberSyncInfoSets sets) {
+ super(configuration);
+ this.resources = resources;
+ this.sets = sets;
+ if(resources != null && resources.length > 0) {
+ this.set = sets.createNewFilteredSyncSet(resources);
+ } else {
+ this.set = sets.getSubscriberSyncSet();
+ }
+ }
+
+ public Viewer createDiffViewer(Composite parent) {
+ SyncInfoDiffTreeViewer v = new SyncInfoDiffTreeViewer(parent, sets.getParticipant(), set);
+ v.updateCompareEditorInput(this);
+ v.addOpenListener(new IOpenListener() {
+ public void open(OpenEvent event) {
+ ISelection s = event.getSelection();
+ SyncInfoDiffNode node = getElement(s);
+ if(node != null && node.getResource().getType() == IResource.FILE) {
+ Utils.updateLabels(node.getSyncInfo(), getCompareConfiguration());
+ }
+ }
+ });
+ v.setAcceptParticipantMenuContributions(allowParticipantMenuContributions());
+ return v;
+ }
+
+ protected Object prepareInput(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
+ return new SyncInfoDiffNode(set, ResourcesPlugin.getWorkspace().getRoot());
+ }
+
+ private static SyncInfoDiffNode getElement(ISelection selection) {
+ if (selection != null && selection instanceof IStructuredSelection) {
+ IStructuredSelection ss= (IStructuredSelection) selection;
+ if (ss.size() == 1) {
+ Object o = ss.getFirstElement();
+ if(o instanceof SyncInfoDiffNode) {
+ return (SyncInfoDiffNode)o;
+ }
+ }
+ }
+ return null;
+ }
+
+ protected boolean allowParticipantMenuContributions() {
+ return false;
+ }
+}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/sets/SubscriberInput.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/sets/SubscriberInput.java
index 09259aa18..21504bb46 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/sets/SubscriberInput.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/sets/SubscriberInput.java
@@ -21,9 +21,9 @@ import org.eclipse.team.internal.core.Assert;
import org.eclipse.team.internal.ui.*;
import org.eclipse.team.ui.TeamUI;
import org.eclipse.team.ui.synchronize.*;
-import org.eclipse.team.ui.synchronize.TeamSubscriberParticipant;
import org.eclipse.team.ui.synchronize.actions.SyncInfoFilter;
import org.eclipse.ui.IWorkingSet;
+import org.eclipse.ui.PlatformUI;
/**
* SubscriberInput encapsulates the UI model for synchronization changes associated
@@ -88,15 +88,15 @@ public class SubscriberInput implements IPropertyChangeListener, ITeamResourceCh
return participant;
}
- public SyncSet getFilteredSyncSet() {
+ public ISyncInfoSet getFilteredSyncSet() {
return filteredSyncSet.getSyncSet();
}
- public SyncSet getSubscriberSyncSet() {
+ public ISyncInfoSet getSubscriberSyncSet() {
return subscriberSyncSet.getSyncSet();
}
- public SyncSet getWorkingSetSyncSet() {
+ public ISyncInfoSet getWorkingSetSyncSet() {
return workingRootsSet.getSyncSet();
}
@@ -290,4 +290,15 @@ public class SubscriberInput implements IPropertyChangeListener, ITeamResourceCh
getFilteredSyncSet().removeSyncSetChangedListener(listener);
getSubscriberSyncSet().removeSyncSetChangedListener(listener);
}
-}
+
+ /* (non-Javadoc)
+ * @see org.eclipse.team.ui.synchronize.ITeamSubscriberSyncInfoSets#createNewFilteredSyncSet(org.eclipse.team.ui.synchronize.actions.SyncInfoFilter)
+ */
+ public ISyncInfoSet createNewFilteredSyncSet(IResource[] resources) {
+ WorkingSetSyncSetInput set = new WorkingSetSyncSetInput((SyncSet)getSubscriberSyncSet());
+ IWorkingSet workingSet = PlatformUI.getWorkbench().getWorkingSetManager().createWorkingSet("SubscriberInput", resources);
+ workingSet.setElements(resources);
+ set.setWorkingSet(workingSet);
+ return set.getSyncSet();
+ }
+} \ No newline at end of file
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/sets/SyncSet.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/sets/SyncSet.java
index 3f1f28e28..796ec395f 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/sets/SyncSet.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/sets/SyncSet.java
@@ -10,26 +10,14 @@
*******************************************************************************/
package org.eclipse.team.internal.ui.synchronize.sets;
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
+import java.util.*;
-import org.eclipse.core.resources.IContainer;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.resources.IWorkspaceRoot;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.ISafeRunnable;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.core.runtime.Platform;
+import org.eclipse.core.resources.*;
+import org.eclipse.core.runtime.*;
import org.eclipse.team.core.subscribers.SyncInfo;
import org.eclipse.team.internal.ui.TeamUIPlugin;
-import org.eclipse.team.ui.synchronize.*;
+import org.eclipse.team.ui.synchronize.ISyncInfoSet;
+import org.eclipse.team.ui.synchronize.ISyncSetChangedListener;
/**
* This class keeps track of a set of resources and their associated synchronization
@@ -289,7 +277,7 @@ public class SyncSet implements ISyncInfoSet {
* Return an array of all the resources that are known to be out-of-sync
* @return
*/
- public synchronized SyncInfo[] allMembers() {
+ public synchronized SyncInfo[] members() {
return (SyncInfo[]) resources.values().toArray(new SyncInfo[resources.size()]);
}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/sets/SyncSetInputFromSyncSet.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/sets/SyncSetInputFromSyncSet.java
index baf3f731f..93f33527f 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/sets/SyncSetInputFromSyncSet.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/sets/SyncSetInputFromSyncSet.java
@@ -44,7 +44,7 @@ public class SyncSetInputFromSyncSet extends SyncSetInput implements ISyncSetCha
*/
protected void fetchInput(IProgressMonitor monitor) throws TeamException {
if (inputSyncSet == null) return;
- SyncInfo[] infos = inputSyncSet.allMembers();
+ SyncInfo[] infos = inputSyncSet.members();
for (int i = 0; i < infos.length; i++) {
collect(infos[i]);
}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/views/CompressedFolder.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/views/CompressedFolder.java
index 338db5317..f054c9882 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/views/CompressedFolder.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/views/CompressedFolder.java
@@ -14,7 +14,7 @@ import java.util.*;
import org.eclipse.core.resources.IResource;
import org.eclipse.team.core.subscribers.SyncInfo;
-import org.eclipse.team.internal.ui.synchronize.sets.SyncSet;
+import org.eclipse.team.ui.synchronize.ISyncInfoSet;
import org.eclipse.team.ui.synchronize.SyncInfoDiffNode;
/**
@@ -22,7 +22,7 @@ import org.eclipse.team.ui.synchronize.SyncInfoDiffNode;
*/
public class CompressedFolder extends SyncInfoDiffNode {
- public CompressedFolder(SyncSet input, IResource resource) {
+ public CompressedFolder(ISyncInfoSet input, IResource resource) {
super(input, resource);
}
@@ -30,16 +30,16 @@ public class CompressedFolder extends SyncInfoDiffNode {
* @see org.eclipse.team.internal.ui.sync.views.SynchronizeViewNode#getOutOfSyncDescendants()
*/
public SyncInfo[] getChildSyncInfos() {
- IResource[] children = getSyncSet().members(getResource());
+ IResource[] children = getSyncInfoSet().members(getResource());
List result = new ArrayList();
for (int i = 0; i < children.length; i++) {
IResource child = children[i];
- SyncInfo info = getSyncSet().getSyncInfo(child);
+ SyncInfo info = getSyncInfoSet().getSyncInfo(child);
if (info != null) {
if (child.getType() == IResource.FOLDER) {
// for folders, add all out-of-sync children
// NOTE: the method getOutOfSyncDescendants includes the out-of-sync parent
- result.addAll(Arrays.asList(getSyncSet().getOutOfSyncDescendants(child)));
+ result.addAll(Arrays.asList(getSyncInfoSet().getOutOfSyncDescendants(child)));
} else {
// for files, just add the info
result.add(info);
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/views/CompressedFolderContentProvider.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/views/CompressedFolderContentProvider.java
index 98a14ef9d..55d31367d 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/views/CompressedFolderContentProvider.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/views/CompressedFolderContentProvider.java
@@ -15,7 +15,6 @@ import java.util.*;
import org.eclipse.core.resources.*;
import org.eclipse.jface.viewers.AbstractTreeViewer;
import org.eclipse.team.core.subscribers.SyncInfo;
-import org.eclipse.team.internal.ui.synchronize.sets.SyncSet;
import org.eclipse.team.internal.ui.synchronize.sets.SyncSetChangedEvent;
import org.eclipse.team.ui.synchronize.SyncInfoDiffNode;
@@ -80,8 +79,8 @@ public class CompressedFolderContentProvider extends SyncSetTreeContentProvider
if (info == null) {
// The resource is in-sync so return a compressed folder
IResource resource = ((SyncInfoDiffNode)parent).getResource();
- if (resource.getType() == IResource.FOLDER) {
- return new CompressedFolder((SyncSet)viewer.getInput(), resource);
+ if (resource.getType() == IResource.FOLDER) {
+ return new CompressedFolder(((SyncInfoDiffNode)parent).getSyncInfoSet(), resource);
}
}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/views/SyncSetContentProvider.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/views/SyncSetContentProvider.java
index fddf2f4de..5eb35e95e 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/views/SyncSetContentProvider.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/views/SyncSetContentProvider.java
@@ -47,8 +47,8 @@ public abstract class SyncSetContentProvider implements IStructuredContentProvid
SyncSet oldSyncSet = null;
SyncSet newSyncSet = null;
- if(newInput instanceof SyncInfoDiffNode) {
- newInput = ((SyncInfoDiffNode)newInput).getSyncInfoSet();
+ if(newInput instanceof SyncInfoDiffNode && oldInput != null) {
+ return;
}
if (oldInput instanceof SyncSet) {
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/views/SyncSetTableContentProvider.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/views/SyncSetTableContentProvider.java
index 6589fda59..72fbf8d65 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/views/SyncSetTableContentProvider.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/views/SyncSetTableContentProvider.java
@@ -24,7 +24,7 @@ public class SyncSetTableContentProvider extends SyncSetContentProvider {
* @see org.eclipse.jface.viewers.IStructuredContentProvider#getElements(java.lang.Object)
*/
public Object[] getElements(Object element) {
- SyncInfo[] infos = getSyncSet().allMembers();
+ SyncInfo[] infos = getSyncSet().members();
return getModelObjects(infos);
}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ISyncInfoSet.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ISyncInfoSet.java
index 9c175aa1b..ef1b2fce3 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ISyncInfoSet.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ISyncInfoSet.java
@@ -1,37 +1,30 @@
-/*
- * Created on Dec 14, 2003
- *
- * To change the template for this generated file go to
- * Window - Preferences - Java - Code Generation - Code and Comments
- */
+/*******************************************************************************
+ * Copyright (c) 2000, 2003 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Common Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
package org.eclipse.team.ui.synchronize;
import org.eclipse.core.resources.IResource;
import org.eclipse.team.core.subscribers.SyncInfo;
import org.eclipse.team.internal.ui.synchronize.sets.SyncInfoStatistics;
-/**
- * @author Jean-Michel Lemieux
- *
- * To change the template for this generated type comment go to
- * Window - Preferences - Java - Code Generation - Code and Comments
- */
public interface ISyncInfoSet {
/**
* Add a change listener
* @param provider
*/
- public abstract void addSyncSetChangedListener(ISyncSetChangedListener listener);
+ public void addSyncSetChangedListener(ISyncSetChangedListener listener);
/**
* Remove a change listener
* @param provider
*/
- public abstract void removeSyncSetChangedListener(ISyncSetChangedListener listener);
- public abstract void add(SyncInfo info);
- /**
- * Reset the sync set so it is empty
- */
- public abstract void reset();
+ public void removeSyncSetChangedListener(ISyncSetChangedListener listener);
/**
* Return the children of the given container who are either out-of-sync or contain
* out-of-sync resources.
@@ -39,7 +32,7 @@ public interface ISyncInfoSet {
* @param container
* @return
*/
- public abstract IResource[] members(IResource resource);
+ public IResource[] members(IResource resource);
/**
* Return the out-of-sync descendants of the given resource. If the given resource
* is out of sync, it will be included in the result.
@@ -47,19 +40,19 @@ public interface ISyncInfoSet {
* @param container
* @return
*/
- public abstract SyncInfo[] getOutOfSyncDescendants(IResource resource);
+ public SyncInfo[] getOutOfSyncDescendants(IResource resource);
/**
* Return an array of all the resources that are known to be out-of-sync
* @return
*/
- public abstract SyncInfo[] allMembers();
- public abstract SyncInfo getSyncInfo(IResource resource);
- public abstract int size();
- public abstract SyncInfoStatistics getStatistics();
+ public SyncInfo[] members();
+ public SyncInfo getSyncInfo(IResource resource);
+ public int size();
+ public SyncInfoStatistics getStatistics();
/**
* Return wether the given resource has any children in the sync set
* @param resource
* @return
*/
- public abstract boolean hasMembers(IResource resource);
+ public boolean hasMembers(IResource resource);
} \ No newline at end of file
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ISyncInfoSetChangeEvent.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ISyncInfoSetChangeEvent.java
index 2660755ed..5d0f3ea1f 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ISyncInfoSetChangeEvent.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ISyncInfoSetChangeEvent.java
@@ -1,21 +1,19 @@
-/*
- * Created on Dec 14, 2003
- *
- * To change the template for this generated file go to
- * Window - Preferences - Java - Code Generation - Code and Comments
- */
+/*******************************************************************************
+ * Copyright (c) 2000, 2003 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Common Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
package org.eclipse.team.ui.synchronize;
import org.eclipse.core.resources.IResource;
import org.eclipse.team.core.subscribers.SyncInfo;
import org.eclipse.team.internal.ui.synchronize.sets.SyncSet;
-/**
- * @author Jean-Michel Lemieux
- *
- * To change the template for this generated type comment go to
- * Window - Preferences - Java - Code Generation - Code and Comments
- */
public interface ISyncInfoSetChangeEvent {
public abstract void removedRoot(IResource root);
public abstract void addedRoot(IResource parent);
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ITeamSubscriberSyncInfoSets.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ITeamSubscriberSyncInfoSets.java
index b91549313..6846470d7 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ITeamSubscriberSyncInfoSets.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ITeamSubscriberSyncInfoSets.java
@@ -4,7 +4,6 @@ import org.eclipse.core.resources.IResource;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.team.core.TeamException;
import org.eclipse.team.core.subscribers.TeamSubscriber;
-import org.eclipse.team.internal.ui.synchronize.sets.SyncSet;
import org.eclipse.team.ui.synchronize.actions.SyncInfoFilter;
import org.eclipse.ui.IWorkingSet;
@@ -13,9 +12,9 @@ public interface ITeamSubscriberSyncInfoSets {
public abstract TeamSubscriberParticipant getParticipant();
public abstract TeamSubscriber getSubscriber();
public void reset() throws TeamException;
- public abstract SyncSet getFilteredSyncSet();
- public abstract SyncSet getSubscriberSyncSet();
- public abstract SyncSet getWorkingSetSyncSet();
+ public abstract ISyncInfoSet getFilteredSyncSet();
+ public abstract ISyncInfoSet getSubscriberSyncSet();
+ public abstract ISyncInfoSet getWorkingSetSyncSet();
public abstract void setFilter(SyncInfoFilter filter, IProgressMonitor monitor) throws TeamException;
public abstract void setWorkingSet(IWorkingSet set);
public abstract IWorkingSet getWorkingSet();
@@ -23,4 +22,5 @@ public interface ITeamSubscriberSyncInfoSets {
public abstract IResource[] subscriberRoots();
public abstract void registerListeners(ISyncSetChangedListener listener);
public abstract void deregisterListeners(ISyncSetChangedListener listener);
+ public abstract ISyncInfoSet createNewFilteredSyncSet(IResource[] resource);
} \ No newline at end of file
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/SyncInfoDiffNode.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/SyncInfoDiffNode.java
index 13a55ca58..4f87dd0e3 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/SyncInfoDiffNode.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/SyncInfoDiffNode.java
@@ -26,6 +26,7 @@ public class SyncInfoDiffNode extends DiffNode implements IAdaptable {
private IResource resource;
private ISyncInfoSet input;
+ private SyncInfo info;
/**
* Create an ITypedElement for the given local resource. The returned ITypedElement
@@ -69,35 +70,53 @@ public class SyncInfoDiffNode extends DiffNode implements IAdaptable {
this(createBaseTypeElement(input, resource), createLocalTypeElement(input, resource), createRemoteTypeElement(input, resource), getSyncKind(input, resource));
this.input = input;
this.resource = resource;
+ this.info = null;
+ }
+
+ /**
+ * Construct a SynchromizeViewNode
+ * @param input The SubscriberInput for the node.
+ * @param resource The resource for the node
+ */
+ public SyncInfoDiffNode(SyncInfo info) {
+ this(createBaseTypeElement(info), createLocalTypeElement(info), createRemoteTypeElement(info), info.getKind());
+ this.info = info;
+ this.input = null;
+ this.resource = info.getLocal();
}
private static ITypedElement createRemoteTypeElement(ISyncInfoSet set, IResource resource) {
- SyncInfo info = set.getSyncInfo(resource);
+ return createRemoteTypeElement(set.getSyncInfo(resource));
+ }
+
+ private static ITypedElement createLocalTypeElement(ISyncInfoSet set, IResource resource) {
+ return createLocalTypeElement(set.getSyncInfo(resource));
+ }
+
+ private static ITypedElement createBaseTypeElement(ISyncInfoSet set, IResource resource) {
+ return createBaseTypeElement(set.getSyncInfo(resource));
+ }
+
+ private static ITypedElement createRemoteTypeElement(SyncInfo info) {
if(info != null && info.getRemote() != null) {
return createTypeElement(info.getRemote());
}
return null;
}
- private static ITypedElement createLocalTypeElement(ISyncInfoSet set, IResource resource) {
- SyncInfo info = set.getSyncInfo(resource);
+ private static ITypedElement createLocalTypeElement(SyncInfo info) {
if(info != null && info.getLocal() != null) {
return createTypeElement(info.getLocal(), info.getKind());
}
return null;
}
- private static ITypedElement createBaseTypeElement(ISyncInfoSet set, IResource resource) {
- SyncInfo info = set.getSyncInfo(resource);
+ private static ITypedElement createBaseTypeElement(SyncInfo info) {
if(info != null && info.getBase() != null) {
return createTypeElement(info.getBase());
}
return null;
}
-
- protected ISyncInfoSet getSyncSet() {
- return input;
- }
/* (non-Javadoc)
* @see org.eclipse.core.runtime.IAdaptable#getAdapter(java.lang.Class)
@@ -113,7 +132,12 @@ public class SyncInfoDiffNode extends DiffNode implements IAdaptable {
* @see org.eclipse.team.ui.sync.ISynchronizeViewNode#getSyncInfo()
*/
public SyncInfo getSyncInfo() {
- return getSyncSet().getSyncInfo(resource);
+ if(info != null) {
+ return info;
+ } else if(input != null) {
+ return input.getSyncInfo(resource);
+ }
+ return null;
}
protected static int getSyncKind(ISyncInfoSet set, IResource resource) {
@@ -128,7 +152,10 @@ public class SyncInfoDiffNode extends DiffNode implements IAdaptable {
* @see org.eclipse.team.ui.sync.ISynchronizeViewNode#getChildSyncInfos()
*/
public SyncInfo[] getChildSyncInfos() {
- return getSyncSet().getOutOfSyncDescendants(resource);
+ if(input != null) {
+ return input.getOutOfSyncDescendants(resource);
+ }
+ return new SyncInfo[0];
}
/**
@@ -189,4 +216,17 @@ public class SyncInfoDiffNode extends DiffNode implements IAdaptable {
public ISyncInfoSet getSyncInfoSet() {
return input;
}
+
+ /* (non-Javadoc)
+ * @see org.eclipse.compare.structuremergeviewer.IDiffContainer#hasChildren()
+ */
+ public boolean hasChildren() {
+ if(input != null) {
+ if(getResource().getType() == IResource.ROOT) return true;
+ SyncInfo[] info = input.getOutOfSyncDescendants(getResource());
+ if(info != null && info.length > 0)
+ return true;
+ }
+ return false;
+ }
} \ No newline at end of file
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/SyncInfoDiffTreeViewer.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/SyncInfoDiffTreeViewer.java
index d5d8aafa4..40d88981d 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/SyncInfoDiffTreeViewer.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/SyncInfoDiffTreeViewer.java
@@ -13,6 +13,8 @@ package org.eclipse.team.ui.synchronize;
import java.util.ArrayList;
import java.util.Iterator;
+import org.eclipse.compare.*;
+import org.eclipse.compare.internal.INavigatable;
import org.eclipse.core.resources.IResource;
import org.eclipse.jface.action.*;
import org.eclipse.jface.preference.IPreferenceStore;
@@ -31,11 +33,15 @@ import org.eclipse.ui.IWorkbenchPartSite;
import org.eclipse.ui.internal.PluginAction;
import org.eclipse.ui.views.navigator.ResourceSorter;
-public class SyncInfoDiffTreeViewer extends TreeViewer {
+public class SyncInfoDiffTreeViewer extends TreeViewer implements INavigableControl {
private TeamSubscriberParticipant participant;
private ISyncInfoSet set;
private Action expandAll;
+ private NavigationAction nextAction;
+ private NavigationAction previousAction;
+ private boolean acceptParticipantMenuContributions = false;
+ private MenuManager menuMgr = null;
/**
* Change the tree layout between using compressed folders and regular folders
@@ -47,7 +53,7 @@ public class SyncInfoDiffTreeViewer extends TreeViewer {
setTreeViewerContentProvider();
}
}
- };
+ };
public SyncInfoDiffTreeViewer(Composite parent, TeamSubscriberParticipant participant, ISyncInfoSet set) {
super(parent, SWT.MULTI | SWT.H_SCROLL | SWT.V_SCROLL);
@@ -65,11 +71,61 @@ public class SyncInfoDiffTreeViewer extends TreeViewer {
handleDoubleClick(event);
}
});
+
+ getTree().setData(CompareUI.COMPARE_VIEWER_TITLE, getTitle());
+
+ INavigatable nav= new INavigatable() {
+ public boolean gotoDifference(boolean next) {
+ // Fix for http://dev.eclipse.org/bugs/show_bug.cgi?id=20106
+ return internalNavigate(next, true);
+ }
+ };
+ getTree().setData(INavigatable.NAVIGATOR_PROPERTY, nav);
+
createActions();
hookContextMenu();
+
+ createToolBarActions(parent);
setInput(getSyncSet());
}
+ protected Object getTitle() {
+ return "Synchronization Changes";
+ }
+
+ public void setAcceptParticipantMenuContributions(boolean accept) {
+ this.acceptParticipantMenuContributions = accept;
+ if(acceptParticipantMenuContributions) {
+ IWorkbenchPartSite site = Utils.findSite(getControl());
+ if(site == null) {
+ site = Utils.findSite();
+ }
+ if(site != null) {
+ site.registerContextMenu(participant.getId(), menuMgr, this);
+ }
+ }
+ }
+
+ private void createToolBarActions(Composite parent) {
+ ToolBarManager tbm= CompareViewerPane.getToolBarManager(parent);
+ if (tbm != null) {
+ tbm.removeAll();
+
+ tbm.add(new Separator("navigation")); //$NON-NLS-1$
+
+ createToolItems(tbm);
+ tbm.update(true);
+ }
+ }
+
+ protected void createToolItems(IToolBarManager tbm) {
+ nextAction= new NavigationAction(true);
+ tbm.appendToGroup("navigation", nextAction); //$NON-NLS-1$
+
+ previousAction= new NavigationAction(false);
+ tbm.appendToGroup("navigation", previousAction); //$NON-NLS-1$
+ }
+
protected ISyncInfoSet getSyncSet() {
return set;
}
@@ -161,7 +217,7 @@ public class SyncInfoDiffTreeViewer extends TreeViewer {
}
protected void hookContextMenu() {
- final MenuManager menuMgr = new MenuManager(participant.getId()); //$NON-NLS-1$
+ menuMgr = new MenuManager(participant.getId()); //$NON-NLS-1$
menuMgr.setRemoveAllWhenShown(true);
menuMgr.addMenuListener(new IMenuListener() {
public void menuAboutToShow(IMenuManager manager) {
@@ -190,12 +246,39 @@ public class SyncInfoDiffTreeViewer extends TreeViewer {
}
});
getControl().setMenu(menu);
- IWorkbenchPartSite site = Utils.findSite(getControl());
- if(site != null) {
- site.registerContextMenu(participant.getId(), menuMgr, this);
+
+ if(acceptParticipantMenuContributions) {
+ IWorkbenchPartSite site = Utils.findSite(getControl());
+ if(site == null) {
+ site = Utils.findSite();
+ }
+ if(site != null) {
+ site.registerContextMenu(participant.getId(), menuMgr, this);
+ }
}
}
+ protected void inputChanged(Object in, Object oldInput) {
+ super.inputChanged(in, oldInput);
+ if (in != oldInput) {
+ initialSelection();
+ }
+ }
+
+ /**
+ * This hook method is called from within <code>inputChanged</code>
+ * after a new input has been set but before any controls are updated.
+ * This default implementation calls <code>navigate(true)</code>
+ * to select and expand the first leaf node.
+ * Clients can override this method and are free to decide whether
+ * they want to call the inherited method.
+ *
+ * @since 2.0
+ */
+ protected void initialSelection() {
+ internalNavigate(false, true);
+ }
+
/**
* Selects the next (or previous) node of the current selection.
* If there is no current selection the first (last) node in the tree is selected.
@@ -209,6 +292,11 @@ public class SyncInfoDiffTreeViewer extends TreeViewer {
return internalNavigate(next, false);
}
+ public void updateCompareEditorInput(CompareEditorInput input) {
+ nextAction.setCompareEditorInput(input);
+ previousAction.setCompareEditorInput(input);
+ }
+
/**
* Selects the next (or previous) node of the current selection.
* If there is no current selection the first (last) node in the tree is selected.
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/TeamSubscriberParticipantPage.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/TeamSubscriberParticipantPage.java
index 10903ceb3..223421dd0 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/TeamSubscriberParticipantPage.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/TeamSubscriberParticipantPage.java
@@ -290,7 +290,6 @@ public class TeamSubscriberParticipantPage implements IPageBookViewPage, IProper
}
public Viewer createChangesViewer(Composite parent) {
- parent.setData(getSynchronizeView());
Viewer viewer = new SyncInfoDiffViewerForSynchronizeView(parent, getSynchronizeView(), getParticipant(), getInput().getFilteredSyncSet());
getSite().setSelectionProvider(viewer);
return viewer;
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/actions/SubscriberAction.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/actions/SubscriberAction.java
index 39fae1184..2e6329fa3 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/actions/SubscriberAction.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/actions/SubscriberAction.java
@@ -13,12 +13,15 @@ package org.eclipse.team.ui.synchronize.actions;
import java.util.*;
import org.eclipse.core.runtime.QualifiedName;
+import org.eclipse.jface.action.IAction;
import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.team.core.TeamException;
import org.eclipse.team.core.subscribers.SyncInfo;
import org.eclipse.team.internal.ui.TeamUIPlugin;
import org.eclipse.team.internal.ui.actions.TeamAction;
import org.eclipse.team.ui.synchronize.SyncInfoDiffNode;
+import org.eclipse.ui.*;
+import org.eclipse.ui.IEditorActionDelegate;
import org.eclipse.ui.IViewActionDelegate;
/**
@@ -31,7 +34,7 @@ import org.eclipse.ui.IViewActionDelegate;
* </p>
* @since 3.0
*/
-public abstract class SubscriberAction extends TeamAction implements IViewActionDelegate {
+public abstract class SubscriberAction extends TeamAction implements IViewActionDelegate, IEditorActionDelegate {
public static final QualifiedName SUBSCRIBER_JOB_TYPE = new QualifiedName(TeamUIPlugin.ID, "subcriber_job"); //$NON-NLS-1$
@@ -98,4 +101,10 @@ public abstract class SubscriberAction extends TeamAction implements IViewAction
}
return (SyncInfo[]) filtered.toArray(new SyncInfo[filtered.size()]);
}
+
+ /* (non-Javadoc)
+ * @see org.eclipse.ui.IEditorActionDelegate#setActiveEditor(org.eclipse.jface.action.IAction, org.eclipse.ui.IEditorPart)
+ */
+ public void setActiveEditor(IAction action, IEditorPart targetEditor) {
+ }
}

Back to the top