diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/editor/CEditor.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/editor/CEditor.java
index f3a38dec86e..780fb0a3144 100644
--- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/editor/CEditor.java
+++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/editor/CEditor.java
@@ -26,6 +26,7 @@ import org.eclipse.cdt.internal.ui.text.CTextTools;
import org.eclipse.cdt.internal.ui.text.contentassist.ContentAssistPreference;
import org.eclipse.cdt.ui.CUIPlugin;
import org.eclipse.cdt.ui.IWorkingCopyManager;
+import org.eclipse.cdt.ui.actions.ShowInCViewAction;
import org.eclipse.core.resources.IFile;
import org.eclipse.core.resources.IMarker;
import org.eclipse.core.resources.IProject;
@@ -461,11 +462,16 @@ public class CEditor extends TextEditor implements ISelectionChangedListener, IS
action.setActionDefinitionId(ICEditorActionDefinitionIds.OPEN_DECL);
setAction("OpenDeclarations", action);
+ action = new ShowInCViewAction(this);
+ action.setActionDefinitionId(ICEditorActionDefinitionIds.OPEN_CVIEW);
+ setAction("ShowInCView", action); //$NON-NLS-1$
+
fFileSearchAction = new FileSearchAction(getSelectionProvider());
fFileSearchActionInWorkingSet = new FileSearchActionInWorkingSet(getSelectionProvider());
fSearchDialogAction = new SearchDialogAction(getSelectionProvider(), this);
+
}
public void editorContextMenuAboutToShow(IMenuManager menu) {
@@ -498,6 +504,7 @@ public class CEditor extends TextEditor implements ISelectionChangedListener, IS
addAction(menu, IContextMenuConstants.GROUP_GENERATE, "ContentAssistProposal"); //$NON-NLS-1$
addAction(menu, IContextMenuConstants.GROUP_GENERATE, "AddIncludeOnSelection"); //$NON-NLS-1$
addAction(menu, IContextMenuConstants.GROUP_GENERATE, "OpenDeclarations"); //$NON-NLS-1$
+ addAction(menu, IContextMenuConstants.GROUP_GENERATE, "ShowInCView"); //$NON-NLS-1$
}
public void setOutlinePageInput(CContentOutlinePage page, IEditorInput input) {
diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/editor/CEditorMessages.properties b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/editor/CEditorMessages.properties
index fbf2bed9683..125d6da781d 100644
--- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/editor/CEditorMessages.properties
+++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/editor/CEditorMessages.properties
@@ -13,6 +13,10 @@ AddIncludeOnSelection.error.message4=BadLocationException:
AddIncludeOnSelection.label=Add I&nclude@Ctrl+Shift+N
AddIncludeOnSelection.tooltip=Add Include Statement on Selection
+ShowInCView.description=Show the current resource in the C/C++ Projects view
+ShowInCView.label=Show in C/C++ Projects
+ShowInCView.tooltip=Show current resource in C/C++ Projects view
+
ClassFileEditor.error.invalid_input_message=Invalid input for Class File Editor
ClassFileMarkerAnnotationModel.error.isAcceptable=ClassFileMarkerAnnotationModel.isAcceptable
diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/editor/ICEditorActionDefinitionIds.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/editor/ICEditorActionDefinitionIds.java
index b5352ec1b1c..048beaf08e3 100644
--- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/editor/ICEditorActionDefinitionIds.java
+++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/editor/ICEditorActionDefinitionIds.java
@@ -1,7 +1,13 @@
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
+/**********************************************************************
+ * Copyright (c) 2002,2003 QNX Software Systems 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:
+ * QNX Software Systems - Initial API and implementation
+***********************************************************************/
package org.eclipse.cdt.internal.ui.editor;
@@ -49,9 +55,14 @@ public interface ICEditorActionDefinitionIds extends ITextEditorActionDefinition
public static final String TOGGLE_PRESENTATION= "org.eclipse.cdt.ui.edit.text.c.toggle.presentation"; //$NON-NLS-1$
/**
* Action definition ID of the open declaration action
- * (value "org.eclipse.cdt.ui.edit.text.java.toggle.presentation"
).
+ * (value "org.eclipse.cdt.ui.edit.opendecl"
).
*/
public static final String OPEN_DECL= "org.eclipse.cdt.ui.edit.opendecl"; //$NON-NLS-1$
-
+ /**
+ * Action definition ID of the show in C/C++ Projects View action
+ * (value "org.eclipse.cdt.ui.edit.opencview"
).
+ */
+ public static final String OPEN_CVIEW= "org.eclipse.cdt.ui.edit.opencview"; //$NON-NLS-1$
+
}