Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJean Michel-Lemieux2003-10-21 20:33:30 +0000
committerJean Michel-Lemieux2003-10-21 20:33:30 +0000
commit736b3e56f00f042cc6f5f75c9597830c7b748078 (patch)
tree174e0d2a0e76ac3f64583eb14e14de3a7e028424
parent4e0e20262157aaf21b6e08ae5b1eaa11e00efec7 (diff)
downloadeclipse.platform.team-736b3e56f00f042cc6f5f75c9597830c7b748078.tar.gz
eclipse.platform.team-736b3e56f00f042cc6f5f75c9597830c7b748078.tar.xz
eclipse.platform.team-736b3e56f00f042cc6f5f75c9597830c7b748078.zip
*** empty log message ***
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/CVSProviderPlugin.java2
-rw-r--r--bundles/org.eclipse.team.cvs.ui/plugin.xml4
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/sync/pages/NewSynchronizeView.java92
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/sync/pages/ShowSynchronizeViewPage.java17
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/sync/pages/StatusLineCLabelContribution.java108
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/sync/pages/StatusLineContributionGroup.java88
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/sync/pages/SubscriberSynchronizeViewPage.java116
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/sync/pages/SynchronizePageDropDownAction.java8
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/sync/pages/SynchronizeViewWorkbenchPart.java26
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/sync/views/SynchronizeViewNode.java6
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/sync/AbstractSynchronizeParticipant.java2
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/sync/ISynchronizeParticipantListener.java14
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/sync/TeamSubscriberParticipant.java2
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/sync/actions/workingsets/WorkingSetDropDownAction.java32
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/sync/actions/workingsets/WorkingSetFilterActionGroup.java9
15 files changed, 372 insertions, 154 deletions
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/CVSProviderPlugin.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/CVSProviderPlugin.java
index 07d9fdea5..cc012897e 100644
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/CVSProviderPlugin.java
+++ b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/CVSProviderPlugin.java
@@ -83,7 +83,7 @@ public class CVSProviderPlugin extends Plugin {
// cvs plugin extension points and ids
public static final String ID = "org.eclipse.team.cvs.core"; //$NON-NLS-1$
- public static final QualifiedName CVS_WORKSPACE_SUBSCRIBER_ID = new QualifiedName(null, "org.eclipse.team.cvs.ui.cvsworkspace_syncparticipant"); //$NON-NLS-1$
+ public static final QualifiedName CVS_WORKSPACE_SUBSCRIBER_ID = new QualifiedName("org.eclipse.team.cvs.ui.cvsworkspace-participant", "syncparticipant"); //$NON-NLS-1$
public static final String PT_AUTHENTICATOR = "authenticator"; //$NON-NLS-1$
public static final String PT_CONNECTIONMETHODS = "connectionmethods"; //$NON-NLS-1$
public static final String PT_FILE_MODIFICATION_VALIDATOR = "filemodificationvalidator"; //$NON-NLS-1$
diff --git a/bundles/org.eclipse.team.cvs.ui/plugin.xml b/bundles/org.eclipse.team.cvs.ui/plugin.xml
index 25841c054..b0d628090 100644
--- a/bundles/org.eclipse.team.cvs.ui/plugin.xml
+++ b/bundles/org.eclipse.team.cvs.ui/plugin.xml
@@ -590,7 +590,7 @@
id="org.eclipse.team.ccvs.ui.CVSWorkspaceSubscriberContributions"
adaptable="true">
- <filter name="equals" value="org.eclipse.team.cvs.subscribers:workspace-subscriber" />
+ <filter name="equals" value="org.eclipse.team.cvs.ui.cvsworkspace-participant" />
<action
label="%CVSWorkspaceSubscriber.confirmMerged.label"
@@ -645,7 +645,7 @@
id="org.eclipse.team.ccvs.ui.CVSMergeSubscriberContributions"
adaptable="true">
- <filter name="startsWith" value="org.eclipse.team.cvs.subscribers:merge-" />
+ <filter name="equals" value="org.eclipse.team.cvs.ui.cvsmerge-participant" />
<action
label="%CVSWorkspaceSubscriber.confirmMerged.label"
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/sync/pages/NewSynchronizeView.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/sync/pages/NewSynchronizeView.java
index 5cc8f78a2..df2840d69 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/sync/pages/NewSynchronizeView.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/sync/pages/NewSynchronizeView.java
@@ -33,30 +33,40 @@ import org.eclipse.ui.part.MessagePage;
import org.eclipse.ui.part.PageBook;
import org.eclipse.ui.part.PageBookView;
+/**
+ * @author JLemieux
+ *
+ * To change the template for this generated type comment go to
+ * Window - Preferences - Java - Code Generation - Code and Comments
+ */
+/**
+ * @author JLemieux
+ *
+ * To change the template for this generated type comment go to
+ * Window - Preferences - Java - Code Generation - Code and Comments
+ */
public class NewSynchronizeView extends PageBookView implements ISynchronizeView, ISynchronizeParticipantListener, IPropertyChangeListener {
/**
- * The console being displayed, or <code>null</code> if none
+ * The participant being displayed, or <code>null</code> if none
*/
- private ISynchronizeParticipant fActivePage = null;
+ private ISynchronizeParticipant activeParticipant = null;
/**
- * Map of consoles to dummy console parts (used to close pages)
+ * Map of participants to dummy participant parts (used to close pages)
*/
private Map fPageToPart;
/**
- * Map of parts to consoles
+ * Map of parts to participants
*/
private Map fPartToPage;
- // actions
+ /**
+ *
+ */
private SynchronizePageDropDownAction fPageDropDown;
- private boolean isAvailable() {
- return getPageBook() != null && !getPageBook().isDisposed();
- }
-
/* (non-Javadoc)
* @see org.eclipse.jface.util.IPropertyChangeListener#propertyChange(org.eclipse.jface.util.PropertyChangeEvent)
*/
@@ -78,10 +88,10 @@ public class NewSynchronizeView extends PageBookView implements ISynchronizeView
}
/* (non-Javadoc)
- * @see org.eclipse.debug.internal.ui.console.IConsoleView#getConsole()
+ * @see org.eclipse.team.ui.sync.ISynchronizeView#getParticipant()
*/
public ISynchronizeParticipant getParticipant() {
- return fActivePage;
+ return activeParticipant;
}
/* (non-Javadoc)
@@ -89,12 +99,12 @@ public class NewSynchronizeView extends PageBookView implements ISynchronizeView
*/
protected void showPageRec(PageRec pageRec) {
super.showPageRec(pageRec);
- fActivePage = (ISynchronizeParticipant)fPartToPage.get(pageRec.part);
+ activeParticipant = (ISynchronizeParticipant)fPartToPage.get(pageRec.part);
updateTitle();
}
- /**
- * Updates the view title based on the active console
+ /*
+ * Updates the view title based on the active participant
*/
protected void updateTitle() {
ISynchronizeParticipant page = getParticipant();
@@ -113,12 +123,12 @@ public class NewSynchronizeView extends PageBookView implements ISynchronizeView
page.dispose();
pageRecord.dispose();
- ISynchronizeParticipant console = (ISynchronizeParticipant)fPartToPage.get(part);
- console.removePropertyChangeListener(this);
+ ISynchronizeParticipant participant = (ISynchronizeParticipant)fPartToPage.get(part);
+ participant.removePropertyChangeListener(this);
// empty cross-reference cache
fPartToPage.remove(part);
- fPageToPart.remove(console);
+ fPageToPart.remove(participant);
}
/* (non-Javadoc)
@@ -126,11 +136,11 @@ public class NewSynchronizeView extends PageBookView implements ISynchronizeView
*/
protected PageRec doCreatePage(IWorkbenchPart dummyPart) {
SynchronizeViewWorkbenchPart part = (SynchronizeViewWorkbenchPart)dummyPart;
- ISynchronizeParticipant console = part.getConsole();
- IPageBookViewPage page = console.createPage(this);
+ ISynchronizeParticipant participant = part.getConsole();
+ IPageBookViewPage page = participant.createPage(this);
initPage(page);
page.createControl(getPageBook());
- console.addPropertyChangeListener(this);
+ participant.addPropertyChangeListener(this);
PageRec rec = new PageRec(dummyPart, page);
return rec;
}
@@ -161,18 +171,18 @@ public class NewSynchronizeView extends PageBookView implements ISynchronizeView
}
/* (non-Javadoc)
- * @see org.eclipse.ui.console.IConsoleListener#consolesAdded(org.eclipse.ui.console.IConsole[])
+ * @see org.eclipse.team.ui.sync.ISynchronizeParticipantListener#participantsAdded(org.eclipse.team.ui.sync.ISynchronizeParticipant[])
*/
- public void participantsAdded(final ISynchronizeParticipant[] consoles) {
+ public void participantsAdded(final ISynchronizeParticipant[] participants) {
if (isAvailable()) {
Runnable r = new Runnable() {
public void run() {
- for (int i = 0; i < consoles.length; i++) {
+ for (int i = 0; i < participants.length; i++) {
if (isAvailable()) {
- ISynchronizeParticipant console = consoles[i];
- SynchronizeViewWorkbenchPart part = new SynchronizeViewWorkbenchPart(console, getSite());
- fPageToPart.put(console, part);
- fPartToPage.put(part, console);
+ ISynchronizeParticipant participant = participants[i];
+ SynchronizeViewWorkbenchPart part = new SynchronizeViewWorkbenchPart(participant, getSite());
+ fPageToPart.put(participant, part);
+ fPartToPage.put(part, participant);
partActivated(part);
}
}
@@ -183,7 +193,7 @@ public class NewSynchronizeView extends PageBookView implements ISynchronizeView
}
/* (non-Javadoc)
- * @see org.eclipse.ui.console.IConsoleListener#consolesRemoved(org.eclipse.ui.console.IConsole[])
+ * @see org.eclipse.team.ui.sync.ISynchronizeParticipantListener#participantsRemoved(org.eclipse.team.ui.sync.ISynchronizeParticipant[])
*/
public void participantsRemoved(final ISynchronizeParticipant[] consoles) {
if (isAvailable()) {
@@ -211,7 +221,7 @@ public class NewSynchronizeView extends PageBookView implements ISynchronizeView
}
/**
- * Constructs a console view
+ * Constructs a synchronize view
*/
public NewSynchronizeView() {
super();
@@ -239,15 +249,20 @@ public class NewSynchronizeView extends PageBookView implements ISynchronizeView
}
}
+ /**
+ * Create the default actions for the view. These will be shown regardless of the
+ * participant being displayed.
+ */
protected void createActions() {
- //fPinAction = new PinConsoleAction(this);
fPageDropDown = new SynchronizePageDropDownAction(this);
}
+ /**
+ * Add the actions to the toolbar
+ *
+ * @param mgr toolbar manager
+ */
protected void configureToolBar(IToolBarManager mgr) {
-// mgr.add(new Separator(IConsoleConstants.LAUNCH_GROUP));
-// mgr.add(new Separator(IConsoleConstants.OUTPUT_GROUP));
-// mgr.add(fPinAction);
mgr.add(fPageDropDown);
}
@@ -297,24 +312,27 @@ public class NewSynchronizeView extends PageBookView implements ISynchronizeView
* @see IWorkbenchPart#createPartControl(Composite)
*/
public void createPartControl(Composite parent) {
- //registerPartListener();
super.createPartControl(parent);
createActions();
IToolBarManager tbm= getViewSite().getActionBars().getToolBarManager();
configureToolBar(tbm);
- updateForExistingConsoles();
+ updateForExistingParticipants();
getViewSite().getActionBars().updateActionBars();
}
/**
* Initialize for existing consoles
*/
- private void updateForExistingConsoles() {
+ private void updateForExistingParticipants() {
ISynchronizeManager manager = TeamUI.getSynchronizeManager();
// create pages for consoles
ISynchronizeParticipant[] consoles = manager.getSynchronizeParticipants();
participantsAdded(consoles);
// add as a listener
manager.addSynchronizeParticipantListener(this);
- }
+ }
+
+ private boolean isAvailable() {
+ return getPageBook() != null && !getPageBook().isDisposed();
+ }
} \ No newline at end of file
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/sync/pages/ShowSynchronizeViewPage.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/sync/pages/ShowSynchronizeViewPage.java
index 39fbb0f62..e7414e1b6 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/sync/pages/ShowSynchronizeViewPage.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/sync/pages/ShowSynchronizeViewPage.java
@@ -15,12 +15,10 @@ import org.eclipse.team.ui.sync.ISynchronizeView;
import org.eclipse.team.ui.sync.ISynchronizeParticipant;
public class ShowSynchronizeViewPage extends Action {
+
private ISynchronizeParticipant fPage;
private ISynchronizeView fView;
- /* (non-Javadoc)
- * @see org.eclipse.jface.action.IAction#run()
- */
public void run() {
if (!fPage.equals(fView.getParticipant())) {
fView.display(fPage);
@@ -28,15 +26,16 @@ public class ShowSynchronizeViewPage extends Action {
}
/**
- * Constructs an action to display the given page.
+ * Constructs an action to display the given synchronize participant in the
+ * synchronize view.
*
* @param view the synchronize view in which the given page is contained
- * @param console the console
+ * @param participant the participant to show
*/
- public ShowSynchronizeViewPage(ISynchronizeView view, ISynchronizeParticipant page) {
- super(page.getName(), Action.AS_RADIO_BUTTON);
- fPage = page;
+ public ShowSynchronizeViewPage(ISynchronizeView view, ISynchronizeParticipant participant) {
+ super(participant.getName(), Action.AS_RADIO_BUTTON);
+ fPage = participant;
fView = view;
- setImageDescriptor(page.getImageDescriptor());
+ setImageDescriptor(participant.getImageDescriptor());
}
}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/sync/pages/StatusLineCLabelContribution.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/sync/pages/StatusLineCLabelContribution.java
new file mode 100644
index 000000000..88bdaffc7
--- /dev/null
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/sync/pages/StatusLineCLabelContribution.java
@@ -0,0 +1,108 @@
+/*******************************************************************************
+ * 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.sync.pages;
+
+import org.eclipse.jface.action.ContributionItem;
+import org.eclipse.jface.action.IContributionManager;
+import org.eclipse.jface.action.StatusLineLayoutData;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.custom.CLabel;
+import org.eclipse.swt.graphics.GC;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.widgets.Composite;
+
+public class StatusLineCLabelContribution extends ContributionItem {
+
+ public final static int DEFAULT_CHAR_WIDTH = 40;
+
+ private int charWidth;
+ private CLabel label;
+ private Image image;
+ private String text = "";
+ private int widthHint = -1;
+
+ public StatusLineCLabelContribution(String id) {
+ this(id, DEFAULT_CHAR_WIDTH);
+ }
+
+ public StatusLineCLabelContribution(String id, int charWidth) {
+ super(id);
+ this.charWidth = charWidth;
+ setVisible(false); // no text to start with
+ }
+
+ public void fill(Composite parent) {
+ label = new CLabel(parent, SWT.SHADOW_IN);
+ StatusLineLayoutData statusLineLayoutData = new StatusLineLayoutData();
+
+ if (widthHint < 0) {
+ GC gc = new GC(parent);
+ gc.setFont(parent.getFont());
+ widthHint = gc.getFontMetrics().getAverageCharWidth() * charWidth;
+ gc.dispose();
+ }
+
+ statusLineLayoutData.widthHint = widthHint;
+ label.setLayoutData(statusLineLayoutData);
+ label.setText(text);
+ label.setImage(image);
+ }
+
+ public String getText() {
+ return text;
+ }
+
+ public void setText(String text) {
+ if (text == null)
+ throw new NullPointerException();
+
+ this.text = text;
+
+ if (label != null && !label.isDisposed())
+ label.setText(this.text);
+
+ if (this.text.length() == 0) {
+ if (isVisible()) {
+ setVisible(false);
+ IContributionManager contributionManager = getParent();
+
+ if (contributionManager != null)
+ contributionManager.update(true);
+ }
+ } else {
+ if (!isVisible()) {
+ setVisible(true);
+ IContributionManager contributionManager = getParent();
+
+ if (contributionManager != null)
+ contributionManager.update(true);
+ }
+ }
+ }
+
+ public void setImage(Image image) {
+ if (image == null)
+ throw new NullPointerException();
+
+ this.image = image;
+
+ if (label != null && !label.isDisposed())
+ label.setImage(this.image);
+
+ if (!isVisible()) {
+ setVisible(true);
+ IContributionManager contributionManager = getParent();
+
+ if (contributionManager != null)
+ contributionManager.update(true);
+ }
+ }
+}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/sync/pages/StatusLineContributionGroup.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/sync/pages/StatusLineContributionGroup.java
new file mode 100644
index 000000000..0271c126c
--- /dev/null
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/sync/pages/StatusLineContributionGroup.java
@@ -0,0 +1,88 @@
+/*******************************************************************************
+ * 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.sync.pages;
+
+import org.eclipse.jface.action.IStatusLineManager;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.team.core.subscribers.SyncInfo;
+import org.eclipse.team.internal.ui.Policy;
+import org.eclipse.team.internal.ui.TeamUIPlugin;
+import org.eclipse.team.internal.ui.sync.sets.ISyncSetChangedListener;
+import org.eclipse.team.internal.ui.sync.sets.SubscriberInput;
+import org.eclipse.team.internal.ui.sync.sets.SyncInfoStatistics;
+import org.eclipse.team.internal.ui.sync.sets.SyncSetChangedEvent;
+import org.eclipse.team.ui.ISharedImages;
+
+public class StatusLineContributionGroup implements ISyncSetChangedListener {
+
+ private StatusLineCLabelContribution incoming;
+ private StatusLineCLabelContribution outgoing;
+ private StatusLineCLabelContribution conflicting;
+ private SubscriberInput input;
+
+ public StatusLineContributionGroup(IStatusLineManager statusLineManager, SubscriberInput input) {
+ super();
+ this.incoming = createStatusLineContribution("2", "0", TeamUIPlugin.getImageDescriptor(ISharedImages.IMG_DLG_SYNC_INCOMING).createImage());
+ this.outgoing = createStatusLineContribution("3", "0", TeamUIPlugin.getImageDescriptor(ISharedImages.IMG_DLG_SYNC_OUTGOING).createImage());
+ this.conflicting = createStatusLineContribution("1", "0", TeamUIPlugin.getImageDescriptor(ISharedImages.IMG_DLG_SYNC_CONFLICTING).createImage());
+ statusLineManager.add(incoming);
+ statusLineManager.add(outgoing);
+ statusLineManager.add(conflicting);
+ this.input = input;
+ input.registerListeners(this);
+ }
+
+ private StatusLineCLabelContribution createStatusLineContribution(String id, String label, Image image) {
+ StatusLineCLabelContribution item = new StatusLineCLabelContribution(id, 15);
+ item.setText(Policy.bind("StatisticsPanel.outgoing"));
+ if(image != null) {
+ item.setImage(image);
+ TeamUIPlugin.disposeOnShutdown(image);
+ }
+ return item;
+ }
+
+ public void dispose() {
+ input.deregisterListeners(this);
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.team.internal.ui.sync.sets.ISyncSetChangedListener#syncSetChanged(org.eclipse.team.internal.ui.sync.sets.SyncSetChangedEvent)
+ */
+ public void syncSetChanged(SyncSetChangedEvent event) {
+ if(input != null) {
+ SyncInfoStatistics workspaceSetStats = input.getSubscriberSyncSet().getStatistics();
+ SyncInfoStatistics workingSetSetStats = input.getWorkingSetSyncSet().getStatistics();
+
+ final int workspaceConflicting = (int)workspaceSetStats.countFor(SyncInfo.CONFLICTING, SyncInfo.DIRECTION_MASK);
+ final int workspaceOutgoing = (int)workspaceSetStats.countFor(SyncInfo.OUTGOING, SyncInfo.DIRECTION_MASK);
+ final int workspaceIncoming = (int)workspaceSetStats.countFor(SyncInfo.INCOMING, SyncInfo.DIRECTION_MASK);
+ final int workingSetConflicting = (int)workingSetSetStats.countFor(SyncInfo.CONFLICTING, SyncInfo.DIRECTION_MASK);
+ final int workingSetOutgoing = (int)workingSetSetStats.countFor(SyncInfo.OUTGOING, SyncInfo.DIRECTION_MASK);
+ final int workingSetIncoming = (int)workingSetSetStats.countFor(SyncInfo.INCOMING, SyncInfo.DIRECTION_MASK);
+
+ TeamUIPlugin.getStandardDisplay().asyncExec(new Runnable() {
+ public void run() {
+ if(input.getWorkingSet() != null) {
+ conflicting.setText(Policy.bind("StatisticsPanel.changeNumbers", new Integer(workingSetConflicting).toString(), new Integer(workspaceConflicting).toString())); //$NON-NLS-1$
+ incoming.setText(Policy.bind("StatisticsPanel.changeNumbers", new Integer(workingSetIncoming).toString(), new Integer(workspaceIncoming).toString())); //$NON-NLS-1$
+ outgoing.setText(Policy.bind("StatisticsPanel.changeNumbers", new Integer(workingSetOutgoing).toString(), new Integer(workspaceOutgoing).toString())); //$NON-NLS-1$
+ } else {
+ conflicting.setText(new Integer(workspaceConflicting).toString()); //$NON-NLS-1$
+ incoming.setText(new Integer(workspaceIncoming).toString()); //$NON-NLS-1$
+ outgoing.setText(new Integer(workspaceOutgoing).toString()); //$NON-NLS-1$
+ }
+ }
+ });
+
+ }
+ }
+} \ No newline at end of file
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/sync/pages/SubscriberSynchronizeViewPage.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/sync/pages/SubscriberSynchronizeViewPage.java
index b23d84463..e21af371f 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/sync/pages/SubscriberSynchronizeViewPage.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/sync/pages/SubscriberSynchronizeViewPage.java
@@ -4,31 +4,80 @@ import java.util.Iterator;
import org.eclipse.core.resources.IResource;
import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.jface.action.*;
+import org.eclipse.jface.action.Action;
+import org.eclipse.jface.action.IMenuListener;
+import org.eclipse.jface.action.IMenuManager;
+import org.eclipse.jface.action.IToolBarManager;
+import org.eclipse.jface.action.MenuManager;
+import org.eclipse.jface.action.Separator;
import org.eclipse.jface.preference.IPreferenceStore;
import org.eclipse.jface.util.IPropertyChangeListener;
import org.eclipse.jface.util.PropertyChangeEvent;
-import org.eclipse.jface.viewers.*;
+import org.eclipse.jface.viewers.AbstractTreeViewer;
+import org.eclipse.jface.viewers.ColumnWeightData;
+import org.eclipse.jface.viewers.DoubleClickEvent;
+import org.eclipse.jface.viewers.IDoubleClickListener;
+import org.eclipse.jface.viewers.IOpenListener;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.ISelectionChangedListener;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.viewers.OpenEvent;
+import org.eclipse.jface.viewers.SelectionChangedEvent;
+import org.eclipse.jface.viewers.StructuredViewer;
+import org.eclipse.jface.viewers.TableLayout;
+import org.eclipse.jface.viewers.TableViewer;
+import org.eclipse.jface.viewers.TreeViewer;
+import org.eclipse.jface.viewers.Viewer;
import org.eclipse.swt.SWT;
import org.eclipse.swt.events.SelectionListener;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.*;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Menu;
+import org.eclipse.swt.widgets.Table;
+import org.eclipse.swt.widgets.TableColumn;
import org.eclipse.team.core.TeamException;
import org.eclipse.team.core.subscribers.SyncInfo;
-import org.eclipse.team.internal.ui.*;
+import org.eclipse.team.internal.ui.IPreferenceIds;
+import org.eclipse.team.internal.ui.Policy;
+import org.eclipse.team.internal.ui.TeamUIPlugin;
+import org.eclipse.team.internal.ui.Utils;
import org.eclipse.team.internal.ui.actions.TeamAction;
import org.eclipse.team.internal.ui.jobs.JobBusyCursor;
import org.eclipse.team.internal.ui.sync.sets.SubscriberInput;
-import org.eclipse.team.internal.ui.sync.views.*;
+import org.eclipse.team.internal.ui.sync.views.SyncSetTableContentProvider;
+import org.eclipse.team.internal.ui.sync.views.SyncTableViewer;
+import org.eclipse.team.internal.ui.sync.views.SyncTreeViewer;
+import org.eclipse.team.internal.ui.sync.views.SyncViewerLabelProvider;
+import org.eclipse.team.internal.ui.sync.views.SyncViewerSorter;
+import org.eclipse.team.internal.ui.sync.views.SyncViewerTableSorter;
import org.eclipse.team.ui.sync.ISynchronizeView;
import org.eclipse.team.ui.sync.TeamSubscriberParticipant;
-import org.eclipse.team.ui.sync.actions.*;
+import org.eclipse.team.ui.sync.actions.AndSyncInfoFilter;
+import org.eclipse.team.ui.sync.actions.ComparisonCriteriaActionGroup;
+import org.eclipse.team.ui.sync.actions.INavigableControl;
+import org.eclipse.team.ui.sync.actions.NavigateAction;
+import org.eclipse.team.ui.sync.actions.OpenWithActionGroup;
+import org.eclipse.team.ui.sync.actions.PseudoConflictFilter;
+import org.eclipse.team.ui.sync.actions.RefactorActionGroup;
+import org.eclipse.team.ui.sync.actions.RefreshAction;
+import org.eclipse.team.ui.sync.actions.SubscriberAction;
+import org.eclipse.team.ui.sync.actions.SyncInfoChangeTypeFilter;
+import org.eclipse.team.ui.sync.actions.SyncInfoDirectionFilter;
+import org.eclipse.team.ui.sync.actions.SyncInfoFilter;
+import org.eclipse.team.ui.sync.actions.SyncViewerShowPreferencesAction;
+import org.eclipse.team.ui.sync.actions.ToggleViewLayoutAction;
import org.eclipse.team.ui.sync.actions.workingsets.WorkingSetDropDownAction;
import org.eclipse.team.ui.sync.actions.workingsets.WorkingSetFilterActionGroup;
-import org.eclipse.ui.*;
-import org.eclipse.ui.internal.util.StatusLineContributionItem;
-import org.eclipse.ui.part.*;
+import org.eclipse.ui.IActionBars;
+import org.eclipse.ui.IWorkbenchActionConstants;
+import org.eclipse.ui.IWorkingSet;
+import org.eclipse.ui.PartInitException;
+import org.eclipse.ui.part.IPageBookViewPage;
+import org.eclipse.ui.part.IPageSite;
+import org.eclipse.ui.part.IShowInSource;
+import org.eclipse.ui.part.ShowInContext;
import org.eclipse.ui.views.navigator.ResourceSorter;
public class SubscriberSynchronizeViewPage implements IPageBookViewPage, IPropertyChangeListener {
@@ -39,7 +88,6 @@ public class SubscriberSynchronizeViewPage implements IPageBookViewPage, IProper
// the viewer type is switched.
private Composite composite = null;
private TextToolbarManager tbMgr;
- private StatusLineManager slMgr;
// Viewer type constants
private int layout;
@@ -73,8 +121,8 @@ public class SubscriberSynchronizeViewPage implements IPageBookViewPage, IProper
private ComparisonCriteriaActionGroup comparisonCriteria;
private Action collapseAll;
private Action expandAll;
-
private WorkingSetDropDownAction workingSetGroup;
+ private StatusLineContributionGroup statusLine;
/**
* Constructs a new SynchronizeView.
@@ -142,6 +190,8 @@ public class SubscriberSynchronizeViewPage implements IPageBookViewPage, IProper
};
Utils.initAction(expandAll, "action.expandAll."); //$NON-NLS-1$
+
+ statusLine = new StatusLineContributionGroup(view.getViewSite().getActionBars().getStatusLineManager(), this.input);
page.addPropertyChangeListener(this);
updateMode(page.getMode());
}
@@ -232,7 +282,7 @@ public class SubscriberSynchronizeViewPage implements IPageBookViewPage, IProper
protected void createViewer(Composite parent) {
tbMgr = new TextToolbarManager(SWT.FLAT | SWT.HORIZONTAL);
- tbMgr.createControl(parent);
+ //tbMgr.createControl(parent);
switch(layout) {
case TeamSubscriberParticipant.TREE_LAYOUT:
createTreeViewerPartControl(parent);
@@ -241,23 +291,6 @@ public class SubscriberSynchronizeViewPage implements IPageBookViewPage, IProper
createTableViewerPartControl(parent);
break;
}
- StatusLineContributionItem item1 = new StatusLineContributionItem("1", 20) {
- public void run() {}};
- StatusLineContributionItem item2 = new StatusLineContributionItem("2", 2) {
- public void run() {}};
- StatusLineContributionItem item3 = new StatusLineContributionItem("3", 2) {
- public void run() {}};
- StatusLineContributionItem item4 = new StatusLineContributionItem("4", 2) {
- public void run() {}};
- IStatusLineManager mgr = view.getViewSite().getActionBars().getStatusLineManager();
- item1.setText("1.2");
- item2.setText("1/3");
- item3.setText("5/6");
- item4.setText("Working Set: <None>");
- mgr.add(item1);
- mgr.add(item2);
- mgr.add(item3);
- mgr.add(item4);
viewer.setInput(input);
viewer.getControl().setFocus();
initializeListeners();
@@ -380,6 +413,7 @@ public class SubscriberSynchronizeViewPage implements IPageBookViewPage, IProper
*/
public void dispose() {
busyCursor.dispose();
+ statusLine.dispose();
}
/*
@@ -483,28 +517,30 @@ public class SubscriberSynchronizeViewPage implements IPageBookViewPage, IProper
*/
public void setActionBars(final IActionBars actionBars) {
if(actionBars != null) {
- IToolBarManager manager = actionBars.getToolBarManager();
- manager.add(comparisonCriteria);
+ IToolBarManager manager = actionBars.getToolBarManager();
manager.add(refreshAction);
- manager.add(new Separator(TeamSubscriberParticipant.MB_MODESGROUP));
+ manager.add(comparisonCriteria);
+ manager.add(new Separator());
manager.add(gotoNext);
manager.add(gotoPrevious);
manager.add(collapseAll);
+ manager.add(new Separator());
+ page.setActionsBars(actionBars, actionBars.getToolBarManager());
// drop down menu
IMenuManager menu = actionBars.getMenuManager();
MenuManager layoutMenu = new MenuManager(Policy.bind("action.layout.label")); //$NON-NLS-1$
layoutMenu.add(toggleLayoutTable);
layoutMenu.add(toggleLayoutTree);
+ workingSetGroup.fillContextMenu(menu);
menu.add(layoutMenu);
menu.add(new Separator());
menu.add(showPreferences);
}
// allow overrides
- tbMgr.add(workingSetGroup);
- tbMgr.add(new Separator());
- page.setActionsBars(actionBars, tbMgr);
+ //tbMgr.add(workingSetGroup);
+ //tbMgr.add(new Separator());
tbMgr.update(true);
}
@@ -527,20 +563,18 @@ public class SubscriberSynchronizeViewPage implements IPageBookViewPage, IProper
switchViewerType(((Integer)event.getNewValue()).intValue());
} else if(event.getProperty().equals(TeamSubscriberParticipant.P_SYNCVIEWPAGE_MODE)) {
updateMode(((Integer)event.getNewValue()).intValue());
- } else if(event.getProperty().equals(TeamSubscriberParticipant.P_SYNCVIEWPAGE_WORKINGSET)) {
- updateWorkingSet((IWorkingSet)event.getNewValue());
} else if(event.getProperty().equals(WorkingSetFilterActionGroup.CHANGE_WORKING_SET)) {
Object newValue = event.getNewValue();
if (newValue instanceof IWorkingSet) {
- page.setWorkingSet((IWorkingSet)newValue);
+ input.setWorkingSet((IWorkingSet)newValue);
} else if (newValue == null) {
- page.setWorkingSet(null);
+ input.setWorkingSet(null);
}
}
}
- private void updateWorkingSet(IWorkingSet set) {
- input.setWorkingSet(set);
+ public void setWorkingSet(IWorkingSet set) {
+ workingSetGroup.setWorkingSet(set);
}
private void updateMode(int mode) {
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/sync/pages/SynchronizePageDropDownAction.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/sync/pages/SynchronizePageDropDownAction.java
index 1315d2d22..5d330284f 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/sync/pages/SynchronizePageDropDownAction.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/sync/pages/SynchronizePageDropDownAction.java
@@ -99,7 +99,7 @@ public class SynchronizePageDropDownAction extends Action implements IMenuCreato
}
/* (non-Javadoc)
- * @see org.eclipse.ui.console.IConsoleListener#consolesAdded(org.eclipse.ui.console.IConsole[])
+ * @see org.eclipse.team.ui.sync.ISynchronizeParticipantListener#participantsAdded(org.eclipse.team.ui.sync.ISynchronizeParticipant[])
*/
public void participantsAdded(ISynchronizeParticipant[] consoles) {
Display display = TeamUIPlugin.getStandardDisplay();
@@ -111,11 +111,7 @@ public class SynchronizePageDropDownAction extends Action implements IMenuCreato
}
/* (non-Javadoc)
- *
- * Dispose the menu when a launch is removed, such that the actions in this
- * menu do not hang on to associated resources.
- *
- * @see org.eclipse.ui.console.IConsoleListener#consolesRemoved(org.eclipse.ui.console.IConsole[])
+ * @see org.eclipse.team.ui.sync.ISynchronizeParticipantListener#participantsRemoved(org.eclipse.team.ui.sync.ISynchronizeParticipant[])
*/
public void participantsRemoved(ISynchronizeParticipant[] consoles) {
Display display = TeamUIPlugin.getStandardDisplay();
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/sync/pages/SynchronizeViewWorkbenchPart.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/sync/pages/SynchronizeViewWorkbenchPart.java
index 0f8326365..1feb394fb 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/sync/pages/SynchronizeViewWorkbenchPart.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/sync/pages/SynchronizeViewWorkbenchPart.java
@@ -18,35 +18,35 @@ import org.eclipse.ui.IWorkbenchPart;
import org.eclipse.ui.IWorkbenchPartSite;
/**
- * Fake part to use as keys in page book for console pages
+ * Fake part to use as keys in page book for synchronize participants
*/
public class SynchronizeViewWorkbenchPart implements IWorkbenchPart {
- private ISynchronizeParticipant fConsole = null;
- private IWorkbenchPartSite fSite = null;
+ private ISynchronizeParticipant participant = null;
+ private IWorkbenchPartSite site = null;
/* (non-Javadoc)
* @see java.lang.Object#equals(java.lang.Object)
*/
public boolean equals(Object obj) {
return (obj instanceof SynchronizeViewWorkbenchPart) &&
- fConsole.equals(((SynchronizeViewWorkbenchPart)obj).fConsole);
+ participant.equals(((SynchronizeViewWorkbenchPart)obj).participant);
}
/* (non-Javadoc)
* @see java.lang.Object#hashCode()
*/
public int hashCode() {
- return fConsole.hashCode();
+ return participant.hashCode();
}
/**
- * Constructs a part for the given console that binds to the given
+ * Constructs a part for the given participant that binds to the given
* site
*/
- public SynchronizeViewWorkbenchPart(ISynchronizeParticipant console, IWorkbenchPartSite site) {
- fConsole = console;
- fSite = site;
+ public SynchronizeViewWorkbenchPart(ISynchronizeParticipant participant, IWorkbenchPartSite site) {
+ this.participant = participant;
+ this.site = site;
}
/* (non-Javadoc)
@@ -71,7 +71,7 @@ public class SynchronizeViewWorkbenchPart implements IWorkbenchPart {
* @see org.eclipse.ui.IWorkbenchPart#getSite()
*/
public IWorkbenchPartSite getSite() {
- return fSite;
+ return site;
}
/* (non-Javadoc)
@@ -115,11 +115,11 @@ public class SynchronizeViewWorkbenchPart implements IWorkbenchPart {
}
/**
- * Returns the console associated with this part.
+ * Returns the participant associated with this part.
*
- * @return console associated with this part
+ * @return participant associated with this part
*/
protected ISynchronizeParticipant getConsole() {
- return fConsole;
+ return participant;
}
} \ No newline at end of file
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/sync/views/SynchronizeViewNode.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/sync/views/SynchronizeViewNode.java
index 5269efc77..b209c80ad 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/sync/views/SynchronizeViewNode.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/sync/views/SynchronizeViewNode.java
@@ -125,11 +125,11 @@ public class SynchronizeViewNode implements IAdaptable, IActionFilter, ISynchron
return false;
}
TeamSubscriber subscriber = ((SynchronizeViewNode) target).getTeamSubscriber();
- String id = subscriber.getId().toString();
+ String qualifier = subscriber.getId().getQualifier();
if (name.equals("startsWith")) { //$NON-NLS-1$
- return id.startsWith(value);
+ return qualifier.startsWith(value);
} else if(name.equals("equals")) { //$NON-NLS-1$
- return id.equals(value);
+ return qualifier.equals(value);
}
return false;
}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/sync/AbstractSynchronizeParticipant.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/sync/AbstractSynchronizeParticipant.java
index 5e0c0001d..810e1cac5 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/sync/AbstractSynchronizeParticipant.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/sync/AbstractSynchronizeParticipant.java
@@ -29,7 +29,7 @@ public abstract class AbstractSynchronizeParticipant implements ISynchronizePart
protected IConfigurationElement configElement;
/**
- * Used to notify this console of lifecycle methods <code>init()</code>
+ * Used to notify this participant of lifecycle methods <code>init()</code>
* and <code>dispose()</code>.
*/
class Lifecycle implements ISynchronizeParticipantListener {
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/sync/ISynchronizeParticipantListener.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/sync/ISynchronizeParticipantListener.java
index 2351dd893..7b9325ff8 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/sync/ISynchronizeParticipantListener.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/sync/ISynchronizeParticipantListener.java
@@ -21,19 +21,19 @@ package org.eclipse.team.ui.sync;
public interface ISynchronizeParticipantListener {
/**
- * Notification the given consoles have been added to the console
+ * Notification the given participants have been added to the synchronize
* manager.
*
- * @param consoles added consoles
+ * @param participants added participants
*/
- public void participantsAdded(ISynchronizeParticipant[] synchronizeTargets);
+ public void participantsAdded(ISynchronizeParticipant[] participants);
/**
- * Notification the given consoles have been removed from the
- * console manager.
+ * Notification the given participants have been removed from the
+ * synchronize manager.
*
- * @param consoles removed consoles
+ * @param participants removed participants
*/
- public void participantsRemoved(ISynchronizeParticipant[] synchronizeTargets);
+ public void participantsRemoved(ISynchronizeParticipant[] participants);
}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/sync/TeamSubscriberParticipant.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/sync/TeamSubscriberParticipant.java
index 934b56fc7..2102bf971 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/sync/TeamSubscriberParticipant.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/sync/TeamSubscriberParticipant.java
@@ -103,7 +103,7 @@ public abstract class TeamSubscriberParticipant extends AbstractSynchronizeParti
}
public void setWorkingSet(IWorkingSet set) {
- firePropertyChange(this, P_SYNCVIEWPAGE_WORKINGSET, null, set);
+ page.setWorkingSet(set);
}
public IWorkingSet getWorkingSet() {
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/sync/actions/workingsets/WorkingSetDropDownAction.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/sync/actions/workingsets/WorkingSetDropDownAction.java
index 7f5748ef6..c1cc8692b 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/sync/actions/workingsets/WorkingSetDropDownAction.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/sync/actions/workingsets/WorkingSetDropDownAction.java
@@ -19,7 +19,6 @@ import org.eclipse.jface.action.IStatusLineManager;
import org.eclipse.jface.action.IToolBarManager;
import org.eclipse.jface.action.MenuManager;
import org.eclipse.jface.util.IPropertyChangeListener;
-import org.eclipse.jface.util.PropertyChangeEvent;
import org.eclipse.swt.widgets.Control;
import org.eclipse.swt.widgets.Menu;
import org.eclipse.swt.widgets.Shell;
@@ -30,22 +29,17 @@ import org.eclipse.ui.IActionBars;
import org.eclipse.ui.IKeyBindingService;
import org.eclipse.ui.IWorkingSet;
-public class WorkingSetDropDownAction extends Action implements IMenuCreator, IPropertyChangeListener {
+public class WorkingSetDropDownAction extends Action implements IMenuCreator {
- private ISynchronizeView fView;
private MenuManager fMenu;
private WorkingSetFilterActionGroup wsgroup;
- private IPropertyChangeListener workingSetUpdater;
public WorkingSetDropDownAction(Shell shell, IPropertyChangeListener workingSetUpdater, ISynchronizeView view, TeamSubscriberParticipant participant) {
- fView= view;
Utils.initAction(this, "action.workingSets."); //$NON-NLS-1$
IKeyBindingService kbs = view.getSite().getKeyBindingService();
setMenuCreator(this);
wsgroup = new WorkingSetFilterActionGroup(shell, workingSetUpdater, view, participant);
wsgroup.setMenuDynamic(true);
- participant.addPropertyChangeListener(this);
- updateWorkingSet(participant.getWorkingSet());
}
/* (non-Javadoc)
@@ -55,8 +49,6 @@ public class WorkingSetDropDownAction extends Action implements IMenuCreator, IP
if (fMenu != null) {
fMenu.dispose();
}
-
- fView= null;
}
/* (non-Javadoc)
@@ -111,25 +103,11 @@ public class WorkingSetDropDownAction extends Action implements IMenuCreator, IP
// do nothing - this is a menu
}
- /* (non-Javadoc)
- * @see org.eclipse.jface.util.IPropertyChangeListener#propertyChange(org.eclipse.jface.util.PropertyChangeEvent)
- */
- public void propertyChange(PropertyChangeEvent event) {
- if(event.getProperty().equals(TeamSubscriberParticipant.P_SYNCVIEWPAGE_WORKINGSET)) {
- Object newValue = event.getNewValue();
- if (newValue instanceof IWorkingSet) {
- updateWorkingSet((IWorkingSet)newValue);
- } else if (newValue == null) {
- updateWorkingSet(null);
- }
- }
+ public void setWorkingSet(IWorkingSet set) {
+ wsgroup.setWorkingSet(set);
}
- private void updateWorkingSet(IWorkingSet set) {
-// if (set != null) {
-// setText(set.getName());
-// } else if (set == null) {
-// setText(Policy.bind("action.workingSets.none"));
-// }
+ public void fillContextMenu(IMenuManager mgr) {
+ wsgroup.fillContextMenu(mgr);
}
}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/sync/actions/workingsets/WorkingSetFilterActionGroup.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/sync/actions/workingsets/WorkingSetFilterActionGroup.java
index cfc8791ed..cff52c816 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/sync/actions/workingsets/WorkingSetFilterActionGroup.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/sync/actions/workingsets/WorkingSetFilterActionGroup.java
@@ -53,10 +53,6 @@ public class WorkingSetFilterActionGroup extends ActionGroup {
private IMenuManager menuManager;
private IMenuListener menuListener;
- private ISynchronizeParticipant page;
-
- private ISynchronizeView view;
-
private boolean isMenuDynamic = false;
/**
@@ -67,8 +63,6 @@ public class WorkingSetFilterActionGroup extends ActionGroup {
* working set is set
*/
public WorkingSetFilterActionGroup(Shell shell, IPropertyChangeListener workingSetUpdater, ISynchronizeView view, ISynchronizeParticipant page) {
- this.view = view;
- this.page = page;
Assert.isNotNull(shell);
this.workingSetUpdater = workingSetUpdater;
@@ -163,6 +157,9 @@ public class WorkingSetFilterActionGroup extends ActionGroup {
clearWorkingSetAction.setEnabled(newWorkingSet != null);
editWorkingSetAction.setEnabled(newWorkingSet != null);
+ if(workingSet != null)
+ PlatformUI.getWorkbench().getWorkingSetManager().addRecentWorkingSet(newWorkingSet);
+
// Update viewer
if (workingSetUpdater != null) {
workingSetUpdater.propertyChange(

Back to the top