X-Git-Url: http://secure.phpeclipse.com diff --git a/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/phpeditor/BasicJavaEditorActionContributor.java b/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/phpeditor/BasicJavaEditorActionContributor.java index a6504c8..1ef9980 100644 --- a/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/phpeditor/BasicJavaEditorActionContributor.java +++ b/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/phpeditor/BasicJavaEditorActionContributor.java @@ -15,9 +15,9 @@ import java.util.Iterator; import java.util.List; import java.util.ResourceBundle; +import net.sourceforge.phpdt.internal.ui.actions.FoldingActionGroup; import net.sourceforge.phpdt.ui.IContextMenuConstants; import net.sourceforge.phpdt.ui.actions.GotoMatchingBracketAction; -import net.sourceforge.phpdt.ui.actions.PHPdtActionConstants; import org.eclipse.jface.action.IMenuManager; import org.eclipse.jface.action.IStatusLineManager; @@ -48,16 +48,16 @@ public class BasicJavaEditorActionContributor extends BasicTextEditorActionContr // private RetargetTextEditorAction fOpenStructure; // private RetargetTextEditorAction fOpenHierarchy; - private RetargetAction fRetargetShowJavaDoc; - private RetargetTextEditorAction fShowJavaDoc; +// private RetargetAction fRetargetShowJavaDoc; +// private RetargetTextEditorAction fShowJavaDoc; // private RetargetTextEditorAction fStructureSelectEnclosingAction; // private RetargetTextEditorAction fStructureSelectNextAction; // private RetargetTextEditorAction fStructureSelectPreviousAction; // private RetargetTextEditorAction fStructureSelectHistoryAction; -// private RetargetTextEditorAction fGotoNextMemberAction; -// private RetargetTextEditorAction fGotoPreviousMemberAction; + private RetargetTextEditorAction fGotoNextMemberAction; + private RetargetTextEditorAction fGotoPreviousMemberAction; // // private RetargetTextEditorAction fRemoveOccurrenceAnnotationsAction; @@ -66,9 +66,9 @@ public class BasicJavaEditorActionContributor extends BasicTextEditorActionContr ResourceBundle b= PHPEditorMessages.getResourceBundle(); - fRetargetShowJavaDoc= new RetargetAction(PHPdtActionConstants.SHOW_JAVA_DOC, PHPEditorMessages.getString("ShowJavaDoc.label")); //$NON-NLS-1$ - fRetargetShowJavaDoc.setActionDefinitionId(PHPEditorActionDefinitionIds.SHOW_JAVADOC); - markAsPartListener(fRetargetShowJavaDoc); +// fRetargetShowJavaDoc= new RetargetAction(PHPdtActionConstants.SHOW_JAVA_DOC, PHPEditorMessages.getString("ShowJavaDoc.label")); //$NON-NLS-1$ +// fRetargetShowJavaDoc.setActionDefinitionId(net.sourceforge.phpdt.ui.actions.PHPEditorActionDefinitionIds.SHOW_JAVADOC); +// markAsPartListener(fRetargetShowJavaDoc); // actions that are "contributed" to editors, they are considered belonging to the active editor fTogglePresentation= new TogglePresentationAction(); @@ -80,8 +80,8 @@ public class BasicJavaEditorActionContributor extends BasicTextEditorActionContr fGotoMatchingBracket= new RetargetTextEditorAction(b, "GotoMatchingBracket."); //$NON-NLS-1$ fGotoMatchingBracket.setActionDefinitionId(PHPEditorActionDefinitionIds.GOTO_MATCHING_BRACKET); - fShowJavaDoc= new RetargetTextEditorAction(b, "ShowJavaDoc."); //$NON-NLS-1$ - fShowJavaDoc.setActionDefinitionId(PHPEditorActionDefinitionIds.SHOW_JAVADOC); +// fShowJavaDoc= new RetargetTextEditorAction(b, "ShowJavaDoc."); //$NON-NLS-1$ +// fShowJavaDoc.setActionDefinitionId(net.sourceforge.phpdt.ui.actions.PHPEditorActionDefinitionIds.SHOW_JAVADOC); // fShowOutline= new RetargetTextEditorAction(PHPEditorMessages.getResourceBundle(), "ShowOutline."); //$NON-NLS-1$ // fShowOutline.setActionDefinitionId(PHPEditorActionDefinitionIds.SHOW_OUTLINE); @@ -101,10 +101,10 @@ public class BasicJavaEditorActionContributor extends BasicTextEditorActionContr // fStructureSelectHistoryAction= new RetargetTextEditorAction(b, "StructureSelectHistory."); //$NON-NLS-1$ // fStructureSelectHistoryAction.setActionDefinitionId(PHPEditorActionDefinitionIds.SELECT_LAST); // -// fGotoNextMemberAction= new RetargetTextEditorAction(b, "GotoNextMember."); //$NON-NLS-1$ -// fGotoNextMemberAction.setActionDefinitionId(PHPEditorActionDefinitionIds.GOTO_NEXT_MEMBER); -// fGotoPreviousMemberAction= new RetargetTextEditorAction(b, "GotoPreviousMember."); //$NON-NLS-1$ -// fGotoPreviousMemberAction.setActionDefinitionId(PHPEditorActionDefinitionIds.GOTO_PREVIOUS_MEMBER); + fGotoNextMemberAction= new RetargetTextEditorAction(b, "GotoNextMember."); //$NON-NLS-1$ + fGotoNextMemberAction.setActionDefinitionId(PHPEditorActionDefinitionIds.GOTO_NEXT_MEMBER); + fGotoPreviousMemberAction= new RetargetTextEditorAction(b, "GotoPreviousMember."); //$NON-NLS-1$ + fGotoPreviousMemberAction.setActionDefinitionId(PHPEditorActionDefinitionIds.GOTO_PREVIOUS_MEMBER); // // fRemoveOccurrenceAnnotationsAction= new RetargetTextEditorAction(b, "RemoveOccurrenceAnnotations."); //$NON-NLS-1$ // fRemoveOccurrenceAnnotationsAction.setActionDefinitionId(PHPEditorActionDefinitionIds.REMOVE_OCCURRENCE_ANNOTATIONS); @@ -131,7 +131,7 @@ public class BasicJavaEditorActionContributor extends BasicTextEditorActionContr // bars.setGlobalActionHandler(ITextEditorActionConstants.PREVIOUS, fPreviousAnnotation); bars.setGlobalActionHandler(ITextEditorActionDefinitionIds.TOGGLE_SHOW_SELECTED_ELEMENT_ONLY, fTogglePresentation); - bars.setGlobalActionHandler(PHPdtActionConstants.SHOW_JAVA_DOC, fShowJavaDoc); +// bars.setGlobalActionHandler(PHPdtActionConstants.SHOW_JAVA_DOC, fShowJavaDoc); } /* @@ -155,7 +155,7 @@ public class BasicJavaEditorActionContributor extends BasicTextEditorActionContr // structureSelection.add(fStructureSelectHistoryAction); // editMenu.appendToGroup(IContextMenuConstants.GROUP_OPEN, structureSelection); - editMenu.appendToGroup(IContextMenuConstants.GROUP_GENERATE, fRetargetShowJavaDoc); +// editMenu.appendToGroup(IContextMenuConstants.GROUP_GENERATE, fRetargetShowJavaDoc); } // IMenuManager navigateMenu= menu.findMenuUsingPath(IWorkbenchActionConstants.M_NAVIGATE); @@ -167,8 +167,8 @@ public class BasicJavaEditorActionContributor extends BasicTextEditorActionContr IMenuManager gotoMenu= menu.findMenuUsingPath("navigate/goTo"); //$NON-NLS-1$ if (gotoMenu != null) { gotoMenu.add(new Separator("additions2")); //$NON-NLS-1$ -// gotoMenu.appendToGroup("additions2", fGotoPreviousMemberAction); //$NON-NLS-1$ -// gotoMenu.appendToGroup("additions2", fGotoNextMemberAction); //$NON-NLS-1$ + gotoMenu.appendToGroup("additions2", fGotoPreviousMemberAction); //$NON-NLS-1$ + gotoMenu.appendToGroup("additions2", fGotoNextMemberAction); //$NON-NLS-1$ gotoMenu.appendToGroup("additions2", fGotoMatchingBracket); //$NON-NLS-1$ } } @@ -194,7 +194,7 @@ public class BasicJavaEditorActionContributor extends BasicTextEditorActionContr // fNextAnnotation.setEditor(textEditor); fGotoMatchingBracket.setAction(getAction(textEditor, GotoMatchingBracketAction.GOTO_MATCHING_BRACKET)); - fShowJavaDoc.setAction(getAction(textEditor, "ShowJavaDoc")); //$NON-NLS-1$ +// fShowJavaDoc.setAction(getAction(textEditor, "ShowJavaDoc")); //$NON-NLS-1$ // fShowOutline.setAction(getAction(textEditor, IJavaEditorActionDefinitionIds.SHOW_OUTLINE)); // fOpenHierarchy.setAction(getAction(textEditor, IJavaEditorActionDefinitionIds.OPEN_HIERARCHY)); // fOpenStructure.setAction(getAction(textEditor, IJavaEditorActionDefinitionIds.OPEN_STRUCTURE)); @@ -208,10 +208,12 @@ public class BasicJavaEditorActionContributor extends BasicTextEditorActionContr // fGotoPreviousMemberAction.setAction(getAction(textEditor, GoToNextPreviousMemberAction.PREVIOUS_MEMBER)); // fRemoveOccurrenceAnnotationsAction.setAction(getAction(textEditor, "RemoveOccurrenceAnnotations")); //$NON-NLS-1$ - if (part instanceof PHPEditor) { PHPEditor javaEditor= (PHPEditor) part; javaEditor.getActionGroup().fillActionBars(getActionBars()); + FoldingActionGroup foldingActions= javaEditor.getFoldingActionGroup(); + if (foldingActions != null) + foldingActions.updateActionBars(); } }