Package org.eclipse.jst.pagedesigner.editors

Examples of org.eclipse.jst.pagedesigner.editors.SimpleGraphicalEditor$ContextMenuListener


    }

    if (htmlEditor == null)
      return;

    SimpleGraphicalEditor graphicalEditor = (SimpleGraphicalEditor) htmlEditor
        .getDesignViewer();
    IWorkbenchPartSite site = htmlEditor.getSite();
    if (site instanceof IEditorSite) {
      IActionBars actionBars = ((IEditorSite) site).getActionBars();

      if (enabled) {
        // // we always let the text editor to handle UNDO and REDO
        // actionBars.setGlobalActionHandler(ITextEditorActionConstants.UNDO,
        // textEditor
        // .getAction(ITextEditorActionConstants.UNDO));
        // actionBars.setGlobalActionHandler(ITextEditorActionConstants.REDO,
        // textEditor
        // .getAction(ITextEditorActionConstants.REDO));
        // lium: the above behavior changed, since we now use
        // DesignerUndoRedoAction.
        // see comments in DesignerUndoRedoAction
        actionBars.setGlobalActionHandler(
            ITextEditorActionConstants.UNDO, graphicalEditor
                .getAction(IWorkbenchCommandConstants.EDIT_UNDO));
        actionBars.setGlobalActionHandler(
            ITextEditorActionConstants.REDO, graphicalEditor
                .getAction(IWorkbenchCommandConstants.EDIT_REDO));

        // cut/copy/paste is delegated to design actions
        actionBars
            .setGlobalActionHandler(
                ITextEditorActionConstants.DELETE,
                graphicalEditor
                    .getAction(IWorkbenchCommandConstants.EDIT_DELETE));
        actionBars.setGlobalActionHandler(
            ITextEditorActionConstants.CUT, graphicalEditor
                .getAction(IWorkbenchCommandConstants.EDIT_CUT));
        actionBars.setGlobalActionHandler(
            ITextEditorActionConstants.COPY, graphicalEditor
                .getAction(IWorkbenchCommandConstants.EDIT_COPY));
        actionBars
            .setGlobalActionHandler(
                ITextEditorActionConstants.PASTE,
                graphicalEditor
                    .getAction(IWorkbenchCommandConstants.EDIT_PASTE));
      } else {
        actionBars.setGlobalActionHandler(
            ITextEditorActionConstants.UNDO, null);
        actionBars.setGlobalActionHandler(
View Full Code Here

TOP

Related Classes of org.eclipse.jst.pagedesigner.editors.SimpleGraphicalEditor$ContextMenuListener

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.