Package org.eclipse.ui.internal.dialogs

Examples of org.eclipse.ui.internal.dialogs.SelectPerspectiveDialog


   * @throws ExecutionException
   *             If the perspective could not be opened.
   */
  private final void openOther(final IWorkbenchWindow activeWorkbenchWindow)
      throws ExecutionException {
    final SelectPerspectiveDialog dialog = new SelectPerspectiveDialog(
        activeWorkbenchWindow.getShell(), WorkbenchPlugin.getDefault()
            .getPerspectiveRegistry());
    dialog.open();
    if (dialog.getReturnCode() == Window.CANCEL) {
      return;
    }

    final IPerspectiveDescriptor descriptor = dialog.getSelection();
    if (descriptor != null) {
      openPerspective(descriptor.getId(), activeWorkbenchWindow);
    }
  }
View Full Code Here


    /* (non-Javadoc)
     * Show the "other" dialog, select a perspective, and run it. Pass on the selection
     * event should the meny need it.
     */
    void runOther(SelectionEvent event) {
        SelectPerspectiveDialog dlg = new SelectPerspectiveDialog(window
                .getShell(), reg);
        dlg.open();
        if (dlg.getReturnCode() == Window.CANCEL) {
      return;
    }
        IPerspectiveDescriptor desc = dlg.getSelection();
        if (desc != null) {
            run(desc, event);
        }
    }
View Full Code Here

     */
    public void run() {
        if (workbenchWindow == null) {
            return;
        }
        SelectPerspectiveDialog dlg = new SelectPerspectiveDialog(workbenchWindow
                .getShell(), workbenchWindow.getWorkbench().getPerspectiveRegistry());
        dlg.open();
        if (dlg.getReturnCode() == Window.CANCEL) {
      return;
    }
        IPerspectiveDescriptor desc = dlg.getSelection();
        if (desc != null) {
            try {
              IWorkbench workbench = workbenchWindow.getWorkbench();
        IAdaptable input = ((Workbench) workbench)
            .getDefaultPageInput();
View Full Code Here

TOP

Related Classes of org.eclipse.ui.internal.dialogs.SelectPerspectiveDialog

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.