mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-30 12:25:35 +02:00
Add editor context menu marker for debug actions
This commit is contained in:
parent
c444dbe646
commit
4aad19fb50
2 changed files with 14 additions and 1 deletions
|
@ -1,5 +1,5 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2006 IBM Corporation and others.
|
||||
* Copyright (c) 2006, 2007 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
|
||||
|
@ -130,5 +130,10 @@ public interface IContextMenuConstants {
|
|||
* Pop-up menu: name of group for properties actions (value <code>"group.properties"</code>).
|
||||
*/
|
||||
public static final String GROUP_PROPERTIES= ICommonMenuConstants.GROUP_PROPERTIES;
|
||||
|
||||
/**
|
||||
* Pop-up menu: name of group for debug actions (value <code>"group.debug"</code>).
|
||||
*/
|
||||
public static final String GROUP_DEBUG= "group.debug"; //$NON-NLS-1$
|
||||
}
|
||||
|
||||
|
|
|
@ -34,6 +34,7 @@ import org.eclipse.jface.action.IAction;
|
|||
import org.eclipse.jface.action.IMenuManager;
|
||||
import org.eclipse.jface.action.IStatusLineManager;
|
||||
import org.eclipse.jface.action.MenuManager;
|
||||
import org.eclipse.jface.action.Separator;
|
||||
import org.eclipse.jface.preference.IPreferenceStore;
|
||||
import org.eclipse.jface.text.BadLocationException;
|
||||
import org.eclipse.jface.text.BadPositionCategoryException;
|
||||
|
@ -113,6 +114,7 @@ import org.eclipse.ui.actions.ActionContext;
|
|||
import org.eclipse.ui.actions.ActionGroup;
|
||||
import org.eclipse.ui.dnd.IDragAndDropService;
|
||||
import org.eclipse.ui.editors.text.TextEditor;
|
||||
import org.eclipse.ui.navigator.ICommonMenuConstants;
|
||||
import org.eclipse.ui.part.EditorActionBarContributor;
|
||||
import org.eclipse.ui.part.IShowInSource;
|
||||
import org.eclipse.ui.part.IShowInTargetList;
|
||||
|
@ -1932,7 +1934,13 @@ public class CEditor extends TextEditor implements ISelectionChangedListener, IC
|
|||
* @see org.eclipse.ui.texteditor.AbstractTextEditor#editorContextMenuAboutToShow(org.eclipse.jface.action.IMenuManager)
|
||||
*/
|
||||
public void editorContextMenuAboutToShow(IMenuManager menu) {
|
||||
// marker for contributions to the top
|
||||
menu.add(new GroupMarker(ICommonMenuConstants.GROUP_TOP));
|
||||
// separator for debug related actions (similar to ruler context menu)
|
||||
menu.add(new Separator(IContextMenuConstants.GROUP_DEBUG));
|
||||
|
||||
super.editorContextMenuAboutToShow(menu);
|
||||
|
||||
// remove shift actions added by base class
|
||||
menu.remove(ITextEditorActionConstants.SHIFT_LEFT);
|
||||
menu.remove(ITextEditorActionConstants.SHIFT_RIGHT);
|
||||
|
|
Loading…
Add table
Reference in a new issue