Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDani Megert2010-11-22 08:38:22 -0500
committerDani Megert2010-11-22 08:38:22 -0500
commit6c1a5f5112e555479c81792e81eecfeee5efca37 (patch)
tree4c7e5a80ced7b781d336d603a872e3a4163f3292
parent742369fe8c1fa67f67768a2f8c294b9f866157e9 (diff)
downloadeclipse.platform.team-6c1a5f5112e555479c81792e81eecfeee5efca37.tar.gz
eclipse.platform.team-6c1a5f5112e555479c81792e81eecfeee5efca37.tar.xz
eclipse.platform.team-6c1a5f5112e555479c81792e81eecfeee5efca37.zip
Fixed bug 330797: Consistency: Put 'Remove from View' at end of menu group
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/TeamUIPlugin.java7
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/RemoveFromViewAction.java3
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/NavigationActionGroup.java9
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/RemoveFromViewAction.java12
4 files changed, 22 insertions, 9 deletions
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/TeamUIPlugin.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/TeamUIPlugin.java
index 749746ac0..9466fb2fc 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/TeamUIPlugin.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/TeamUIPlugin.java
@@ -70,6 +70,13 @@ public class TeamUIPlugin extends AbstractUIPlugin {
// manages synchronize participants
private SynchronizeManager synchronizeManager;
+
+ /**
+ * ID of the 'Remove from View' action.
+ * Value: <code>"org.eclipse.team.internal.ui.RemoveFromView"</code>
+ */
+ public static final String REMOVE_FROM_VIEW_ACTION_ID = "org.eclipse.team.internal.ui.RemoveFromView"; //$NON-NLS-1$
+
/**
* Creates a new TeamUIPlugin.
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/RemoveFromViewAction.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/RemoveFromViewAction.java
index 16df151b8..2d04acf69 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/RemoveFromViewAction.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/RemoveFromViewAction.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2006 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -36,6 +36,7 @@ public class RemoveFromViewAction extends ResourceModelParticipantAction {
public RemoveFromViewAction(ISynchronizePageConfiguration configuration) {
super(null, configuration);
Utils.initAction(this, "action.removeFromView."); //$NON-NLS-1$
+ setId(TeamUIPlugin.REMOVE_FROM_VIEW_ACTION_ID);
}
/* (non-Javadoc)
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/NavigationActionGroup.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/NavigationActionGroup.java
index 580365a02..c630ab8da 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/NavigationActionGroup.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/NavigationActionGroup.java
@@ -14,6 +14,7 @@ import org.eclipse.compare.ICompareNavigator;
import org.eclipse.jface.action.*;
import org.eclipse.jface.viewers.AbstractTreeViewer;
import org.eclipse.jface.viewers.Viewer;
+import org.eclipse.team.internal.ui.TeamUIPlugin;
import org.eclipse.team.internal.ui.Utils;
import org.eclipse.team.internal.ui.synchronize.actions.ExpandAllAction;
import org.eclipse.team.internal.ui.synchronize.actions.NavigateAction;
@@ -58,7 +59,13 @@ public class NavigationActionGroup extends SynchronizePageActionGroup {
}
}
public void fillContextMenu(IMenuManager manager) {
- appendToGroup(manager, ISynchronizePageConfiguration.NAVIGATE_GROUP, expandAllAction);
+ if (manager == null || expandAllAction == null)
+ return;
+
+ if (manager.find(TeamUIPlugin.REMOVE_FROM_VIEW_ACTION_ID) != null)
+ manager.insertBefore(TeamUIPlugin.REMOVE_FROM_VIEW_ACTION_ID, expandAllAction);
+ else
+ appendToGroup(manager, ISynchronizePageConfiguration.NAVIGATE_GROUP, expandAllAction);
}
public void fillActionBars(IActionBars actionBars) {
IToolBarManager manager = actionBars.getToolBarManager();
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/RemoveFromViewAction.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/RemoveFromViewAction.java
index e79f01260..c3d4546c1 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/RemoveFromViewAction.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/RemoveFromViewAction.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2006 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -23,19 +23,17 @@ import org.eclipse.team.core.synchronize.SyncInfoSet;
import org.eclipse.team.internal.core.subscribers.WorkingSetFilteredSyncInfoCollector;
import org.eclipse.team.internal.ui.*;
import org.eclipse.team.internal.ui.synchronize.SubscriberParticipantPage;
-import org.eclipse.team.ui.synchronize.ISynchronizePage;
-import org.eclipse.team.ui.synchronize.ISynchronizePageConfiguration;
-import org.eclipse.team.ui.synchronize.SynchronizeModelAction;
-import org.eclipse.team.ui.synchronize.SynchronizeModelOperation;
+import org.eclipse.team.ui.synchronize.*;
/**
- * Remove the selected elemements from the page
+ * Remove the selected elements from the page
*/
public class RemoveFromViewAction extends SynchronizeModelAction {
-
+
public RemoveFromViewAction(ISynchronizePageConfiguration configuration) {
super(null, configuration);
Utils.initAction(this, "action.removeFromView."); //$NON-NLS-1$
+ setId(TeamUIPlugin.REMOVE_FROM_VIEW_ACTION_ID);
}
/* (non-Javadoc)

Back to the top