mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-29 19:45:01 +02:00
Bug 255688, allow certain editor actions to be overridden
This commit is contained in:
parent
81d07380ea
commit
4e56e53d05
3 changed files with 19 additions and 8 deletions
|
@ -206,9 +206,9 @@ public abstract class AbstractCModelOutlinePage extends Page implements IContent
|
|||
private IncludeGroupingAction fIncludeGroupingAction;
|
||||
private ToggleLinkingAction fToggleLinkingAction;
|
||||
private ActionGroup fMemberFilterActionGroup;
|
||||
private SelectionSearchGroup fSelectionSearchGroup;
|
||||
private ActionGroup fSelectionSearchGroup;
|
||||
private ActionGroup fRefactoringActionGroup;
|
||||
private OpenViewActionGroup fOpenViewActionGroup;
|
||||
private ActionGroup fOpenViewActionGroup;
|
||||
/**
|
||||
* Custom filter action group.
|
||||
* @since 3.0
|
||||
|
@ -516,7 +516,7 @@ public abstract class AbstractCModelOutlinePage extends Page implements IContent
|
|||
* return an ActionGroup contributing search actions or
|
||||
* <code>null</code> if search is not supported
|
||||
*/
|
||||
protected SelectionSearchGroup createSearchActionGroup() {
|
||||
protected ActionGroup createSearchActionGroup() {
|
||||
// default: no search action group
|
||||
return null;
|
||||
}
|
||||
|
@ -525,7 +525,7 @@ public abstract class AbstractCModelOutlinePage extends Page implements IContent
|
|||
* @return an OpenViewActionGroup contributing open view actions or
|
||||
* <code>null</code> if open view actions are not wanted
|
||||
*/
|
||||
protected OpenViewActionGroup createOpenViewActionGroup() {
|
||||
protected ActionGroup createOpenViewActionGroup() {
|
||||
// default: no open view action group
|
||||
return null;
|
||||
}
|
||||
|
|
|
@ -109,12 +109,12 @@ public class CContentOutlinePage extends AbstractCModelOutlinePage {
|
|||
}
|
||||
|
||||
@Override
|
||||
protected SelectionSearchGroup createSearchActionGroup() {
|
||||
protected ActionGroup createSearchActionGroup() {
|
||||
return new SelectionSearchGroup(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected OpenViewActionGroup createOpenViewActionGroup() {
|
||||
protected ActionGroup createOpenViewActionGroup() {
|
||||
OpenViewActionGroup ovag= new OpenViewActionGroup(this, getEditor());
|
||||
ovag.setEnableIncludeBrowser(true);
|
||||
return ovag;
|
||||
|
|
|
@ -2141,10 +2141,10 @@ public class CEditor extends TextEditor implements ISelectionChangedListener, IC
|
|||
setAction("OpenMacroExplorer", action); //$NON-NLS-1$*/
|
||||
|
||||
//Assorted action groupings
|
||||
fSelectionSearchGroup = new SelectionSearchGroup(this);
|
||||
fSelectionSearchGroup = createSelectionSearchGroup();
|
||||
fTextSearchGroup= new TextSearchGroup(this);
|
||||
fRefactoringActionGroup= new CRefactoringActionGroup(this, ITextEditorActionConstants.GROUP_EDIT);
|
||||
fOpenInViewGroup= new OpenViewActionGroup(this);
|
||||
fOpenInViewGroup= createOpenViewActionGroup();
|
||||
fGenerateActionGroup= new GenerateActionGroup(this, ITextEditorActionConstants.GROUP_EDIT);
|
||||
|
||||
action = getAction(ITextEditorActionConstants.SHIFT_RIGHT);
|
||||
|
@ -2159,6 +2159,17 @@ public class CEditor extends TextEditor implements ISelectionChangedListener, IC
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
protected ActionGroup createSelectionSearchGroup() {
|
||||
return new SelectionSearchGroup(this);
|
||||
}
|
||||
|
||||
protected ActionGroup createOpenViewActionGroup() {
|
||||
return new OpenViewActionGroup(this);
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @see org.eclipse.ui.texteditor.AbstractTextEditor#editorContextMenuAboutToShow(org.eclipse.jface.action.IMenuManager)
|
||||
*/
|
||||
|
|
Loading…
Add table
Reference in a new issue