Skip to main content
summaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorAlain Magloire2004-03-28 21:34:48 -0500
committerAlain Magloire2004-03-28 21:34:48 -0500
commit58513148c21399914be89fb2e64fa63554517663 (patch)
tree91dcdb960759faf5aa9e55c054214307651e9aa4 /core
parent99f00cebcd3ea72a2a8d7027772d5ac40da24669 (diff)
downloadorg.eclipse.cdt-58513148c21399914be89fb2e64fa63554517663.tar.gz
org.eclipse.cdt-58513148c21399914be89fb2e64fa63554517663.tar.xz
org.eclipse.cdt-58513148c21399914be89fb2e64fa63554517663.zip
Provide the action "show selected element"
Diffstat (limited to 'core')
-rw-r--r--core/org.eclipse.cdt.ui/ChangeLog6
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/editor/CEditorActionContributor.java10
2 files changed, 16 insertions, 0 deletions
diff --git a/core/org.eclipse.cdt.ui/ChangeLog b/core/org.eclipse.cdt.ui/ChangeLog
index 3bf8d625de..c394c8fea7 100644
--- a/core/org.eclipse.cdt.ui/ChangeLog
+++ b/core/org.eclipse.cdt.ui/ChangeLog
@@ -1,3 +1,9 @@
+2004-03-28 Alain Magloire
+
+ Provide a global hook for the action "Show Selected element"
+
+ * src/org/eclipse/cdt/internal/ui/editor/CEditorActionContributor.java
+
2004-03-26 Alain Magloire
Keep the order of the sourceroots when sorting the CElements.
diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/editor/CEditorActionContributor.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/editor/CEditorActionContributor.java
index 8aefb01a69..689edbbef0 100644
--- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/editor/CEditorActionContributor.java
+++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/editor/CEditorActionContributor.java
@@ -17,10 +17,12 @@ import org.eclipse.jface.text.ITextOperationTarget;
import org.eclipse.jface.viewers.ISelectionChangedListener;
import org.eclipse.jface.viewers.ISelectionProvider;
import org.eclipse.jface.viewers.SelectionChangedEvent;
+import org.eclipse.ui.IActionBars;
import org.eclipse.ui.IEditorPart;
import org.eclipse.ui.IWorkbenchActionConstants;
import org.eclipse.ui.editors.text.TextEditorActionContributor;
import org.eclipse.ui.texteditor.ITextEditor;
+import org.eclipse.ui.texteditor.ITextEditorActionDefinitionIds;
import org.eclipse.ui.texteditor.RetargetTextEditorAction;
import org.eclipse.ui.texteditor.TextEditorAction;
@@ -156,6 +158,14 @@ public class CEditorActionContributor extends TextEditorActionContributor {
}
/**
+ * @see org.eclipse.ui.part.EditorActionBarContributor#init(IActionBars)
+ */
+ public void init(IActionBars bars) {
+ super.init(bars);
+ bars.setGlobalActionHandler(ITextEditorActionDefinitionIds.TOGGLE_SHOW_SELECTED_ELEMENT_ONLY, fTogglePresentation);
+ }
+
+ /**
* @see EditorActionBarContributor#contributeToToolBar(IToolBarManager)
*/
public void contributeToToolBar(IToolBarManager tbm) {

Back to the top