1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-04-29 19:45:01 +02:00

2004-12-21 Alain Magloire

We use TogglePresentation action definition ID rather the one
	define in the CDT, since now the platfrom defines one.
	* src/org/eclipse/cdt/internal/ui/editor/CContentOutlinePage.java
	* src/org/eclipse/cdt/internal/ui/editor/CEditorActionContributor.java
	* src/org/eclipse/cdt/internal/ui/editor/ICEditorActionDefinitionIds.java
	* src/org/eclipse/cdt/internal/ui/editor/ToggglePresentationAction.java
This commit is contained in:
Alain Magloire 2004-12-21 20:38:06 +00:00
parent 4a8b57d0ab
commit 3d65d89fd7
5 changed files with 13 additions and 10 deletions

View file

@ -1,3 +1,11 @@
2004-12-21 Alain Magloire
We use TogglePresentation action definition ID rather the one
define in the CDT, since now the platfrom defines one.
* src/org/eclipse/cdt/internal/ui/editor/CContentOutlinePage.java
* src/org/eclipse/cdt/internal/ui/editor/CEditorActionContributor.java
* src/org/eclipse/cdt/internal/ui/editor/ICEditorActionDefinitionIds.java
* src/org/eclipse/cdt/internal/ui/editor/ToggglePresentationAction.java
2004-12-21 Alain Magloire
Fix PR 81635 patch form Przemek
* src/org/eclipse/cdt/internal/ui/editor/CEditor.java

View file

@ -51,6 +51,7 @@ import org.eclipse.ui.actions.ActionGroup;
import org.eclipse.ui.help.WorkbenchHelp;
import org.eclipse.ui.part.IPageSite;
import org.eclipse.ui.part.Page;
import org.eclipse.ui.texteditor.ITextEditorActionDefinitionIds;
import org.eclipse.ui.views.contentoutline.IContentOutlinePage;
public class CContentOutlinePage extends Page implements IContentOutlinePage, ISelectionChangedListener {
@ -263,7 +264,7 @@ public class CContentOutlinePage extends Page implements IContentOutlinePage, IS
site.setSelectionProvider(treeViewer);
IActionBars bars= site.getActionBars();
bars.setGlobalActionHandler(ICEditorActionDefinitionIds.TOGGLE_PRESENTATION, fTogglePresentation);
bars.setGlobalActionHandler(ITextEditorActionDefinitionIds.TOGGLE_SHOW_SELECTED_ELEMENT_ONLY, fTogglePresentation);
fSelectionSearchGroup = new SelectionSearchGroup(this);
fRefactoringActionGroup = new RefactoringActionGroup(this, null);

View file

@ -118,7 +118,7 @@ public class CEditorActionContributor extends TextEditorActionContributor {
// actions that are "contributed" to editors, they are considered belonging to the active editor
fTogglePresentation= new TogglePresentationAction();
fTogglePresentation.setActionDefinitionId(ICEditorActionDefinitionIds.TOGGLE_PRESENTATION);
fTogglePresentation.setActionDefinitionId(ITextEditorActionDefinitionIds.TOGGLE_SHOW_SELECTED_ELEMENT_ONLY);
//fToggleTextHover= new ToggleTextHoverAction();
@ -175,8 +175,6 @@ public class CEditorActionContributor extends TextEditorActionContributor {
public void contributeToToolBar(IToolBarManager tbm) {
super.contributeToToolBar(tbm);
tbm.add(new Separator());
tbm.add(fTogglePresentation);
//tbm.add(fToggleTextHover);
tbm.add(fNextError);
tbm.add(fPreviousError);
}

View file

@ -63,11 +63,6 @@ public interface ICEditorActionDefinitionIds extends ITextEditorActionDefinition
*/
public static final String ADD_INCLUDE= "org.eclipse.cdt.ui.edit.text.c.add.include"; //$NON-NLS-1$
/**
* Action definition ID of the toggle presentation toolbar button action
* (value <code>"org.eclipse.cdt.ui.edit.text.java.toggle.presentation"</code>).
*/
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 <code>"org.eclipse.cdt.ui.edit.opendecl"</code>).

View file

@ -23,6 +23,7 @@ import org.eclipse.jface.util.PropertyChangeEvent;
import org.eclipse.ui.help.WorkbenchHelp;
import org.eclipse.ui.texteditor.ITextEditor;
import org.eclipse.ui.texteditor.ITextEditorActionDefinitionIds;
import org.eclipse.ui.texteditor.TextEditorAction;
@ -42,7 +43,7 @@ public class TogglePresentationAction extends TextEditorAction implements IPrope
super(CEditorMessages.getResourceBundle(), "TogglePresentation.", null); //$NON-NLS-1$
CPluginImages.setImageDescriptors(this, CPluginImages.T_LCL, CPluginImages.IMG_MENU_SEGMENT_EDIT);
setToolTipText(CEditorMessages.getString("TogglePresentation.tooltip")); //$NON-NLS-1$
setActionDefinitionId(ICEditorActionDefinitionIds.TOGGLE_PRESENTATION);
setActionDefinitionId(ITextEditorActionDefinitionIds.TOGGLE_SHOW_SELECTED_ELEMENT_ONLY);
WorkbenchHelp.setHelp(this, ICHelpContextIds.TOGGLE_PRESENTATION_ACTION);
update();
}