Examples of SelectionDispatchAction


Examples of org.eclipse.dltk.ui.actions.SelectionDispatchAction

  private void registerActionsAsSelectionChangeListeners() {
    ISelectionProvider provider = fSite.getSelectionProvider();
    ISelection selection = provider.getSelection();
    for (int i = 0; i < fActions.length; i++) {
      SelectionDispatchAction action = fActions[i];
      action.update(selection);
      provider.addSelectionChangedListener(action);
    }
  }
View Full Code Here

Examples of org.eclipse.dltk.ui.actions.SelectionDispatchAction

   * (non-Javadoc) Method declared in ActionGroup
   */
  public void fillContextMenu(IMenuManager menu) {
    super.fillContextMenu(menu);
    for (int i = 0; i < fActions.length; i++) {
      SelectionDispatchAction action = fActions[i];
      menu.appendToGroup(ICommonMenuConstants.GROUP_EDIT, action);
    }
  }
View Full Code Here

Examples of org.eclipse.dltk.ui.actions.SelectionDispatchAction

    });
    ITextSelection textSelection = (ITextSelection) fEditor
        .getSelectionProvider().getSelection();

    for (Iterator iter = fEditorActions.iterator(); iter.hasNext();) {
      SelectionDispatchAction action = (SelectionDispatchAction) iter
          .next();
      action.update(textSelection);
    }
  }
View Full Code Here

Examples of org.eclipse.dltk.ui.actions.SelectionDispatchAction

  private void refactorMenuHidden(IMenuManager manager) {
    ITextSelection textSelection = (ITextSelection) fEditor
        .getSelectionProvider().getSelection();
    for (Iterator iter = fEditorActions.iterator(); iter.hasNext();) {
      SelectionDispatchAction action = (SelectionDispatchAction) iter
          .next();
      action.update(textSelection);
    }
  }
View Full Code Here

Examples of org.eclipse.jdt.ui.actions.SelectionDispatchAction

    }

    if ( realMethod != null && wordRegion != null )
    {
      SelectionDispatchAction dispatchAction = (SelectionDispatchAction) openAction;

      return new IHyperlink[]{new OpenMockedMethodHyperlink(dispatchAction, realMethod, wordRegion)};
    }

    return null;
View Full Code Here

Examples of org.eclipse.jdt.ui.actions.SelectionDispatchAction

      throw new RuntimeException("Didn't find place to paste source");
    }
    try {
      pastedJavaElements = new ArrayList<IJavaElement>();
      JavaCore.addElementChangedListener(this);
      SelectionDispatchAction pasteAction = getPasteAction();
      if (pasteAction == null) {
        throw new RuntimeException("Didn't find package explorer's paste action");
      }
      if (progressMonitor != null) {
        progressMonitor.subTask("Pasting test source");
      }
//      System.out.println("Pasting into " + selection + " (" + selection.size() + ")");
      pasteAction.run(selection);
      if (progressMonitor != null) {
        progressMonitor.worked(1);
      }
    } finally {
      getDisplay().asyncExec(new Runnable() {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.