Examples of IWorkbench


Examples of org.eclipse.ui.IWorkbench

      _refPath = _markerAnnotation.getMarker().getAttribute(ReferenceValidator.ATTRIBUTE_MISSING_REFERENCE_PATH, "");
      _portletNameToCreate = portletNameToCreate;
    }

    public void apply(IDocument document) {
      IWorkbench workbench = Plugin.getDefault().getWorkbench();
   
      NewWGAPortlet wizard = new NewWGAPortlet();
      wizard.setDefaultPortletName(_portletNameToCreate);
      IEditorPart editorPart = workbench.getActiveWorkbenchWindow().getActivePage().getActiveEditor();
      if (editorPart != null && editorPart.getEditorInput() instanceof FileEditorInput) {
        FileEditorInput input = (FileEditorInput) editorPart.getEditorInput();
        wizard.init(workbench, new SingleStructuredSelection(input.getFile().getParent()));
        WizardDialog dialog = new WizardDialog(workbench.getActiveWorkbenchWindow().getShell(), wizard);
        dialog.open();
      }       
    }
View Full Code Here

Examples of org.eclipse.ui.IWorkbench

  /*
   * @see org.eclipse.equinox.app.IApplication#stop()
   */
  public void stop() {
    final IWorkbench workbench = PlatformUI.getWorkbench();
    if (workbench == null)
      return;

    final Display display = workbench.getDisplay();
    display.syncExec(new Runnable() {
      public void run() {
        if (!display.isDisposed())
          workbench.close();
      }
    });
  }
View Full Code Here

Examples of org.eclipse.ui.IWorkbench

  /*
   * @see org.eclipse.equinox.app.IApplication#stop()
   */
  public void stop() {
    final IWorkbench workbench = PlatformUI.getWorkbench();
    if (workbench == null)
      return;

    final Display display = workbench.getDisplay();
    display.syncExec(new Runnable() {
      public void run() {
        if (!display.isDisposed())
          workbench.close();
      }
    });
  }
View Full Code Here

Examples of org.eclipse.ui.IWorkbench

    /* Show Key Bindings */
    helpMenu.add(new Separator());
    helpMenu.add(new Action(Messages.ApplicationActionBarAdvisor_SHOW_KEY_BINDINGS) {
      @Override
      public void run() {
        IWorkbench workbench = PlatformUI.getWorkbench();
        IBindingService bindingService = (IBindingService) workbench.getService(IBindingService.class);
        bindingService.openKeyAssistDialog();
      }
    });

    helpMenu.add(new Separator());
View Full Code Here

Examples of org.eclipse.ui.IWorkbench

public class ProseRunViewTest extends TestCase {

    protected ProseRunView view;

    protected IWorkbenchPage getPage() {
        IWorkbench workbench = PlatformUI.getWorkbench();
        IWorkbenchWindow window = workbench.getActiveWorkbenchWindow();
        return window.getActivePage();
    }
View Full Code Here

Examples of org.eclipse.ui.IWorkbench

    /* (non-Javadoc)
     * @see org.eclipse.equinox.app.IApplication#stop()
     */
  public void stop() {
    final IWorkbench workbench = PlatformUI.getWorkbench();
    if (workbench == null)
      return;
    final Display display = workbench.getDisplay();
    display.syncExec(new Runnable() {
      public void run() {
        if (!display.isDisposed())
          workbench.close();
      }
    });
  }
View Full Code Here

Examples of org.eclipse.ui.IWorkbench

public class Startup implements IStartup {

  @Override
  public void earlyStartup() {
    final IWorkbench workbench = PlatformUI.getWorkbench();
    workbench.getDisplay().asyncExec(new Runnable() {
      public void run() {
        IWorkbenchWindow window = workbench.getActiveWorkbenchWindow();
        if (window != null) {
          TabKeyHandler.setup(window.getActivePage());
        }
      }
    });
View Full Code Here

Examples of org.eclipse.ui.IWorkbench

    public synchronized static void enableVariablesViewActions()
    {
        initActionIdToPreferenceKey();
           
        IWorkbench workbench = PlatformUI.getWorkbench();
        IWorkbenchWindow[] window = workbench.getWorkbenchWindows();
        for (int i = 0; i < window.length; i++)
        {
            final IWorkbenchPage page = window[i].getActivePage();
            if (page != null) Display.getDefault().asyncExec(new EnableVariablesViewActions(page));
        }
View Full Code Here

Examples of org.eclipse.ui.IWorkbench

  private static IFile getFile(IEditorPart editorPart) {
    return ((IFileEditorInput) editorPart.getEditorInput()).getFile();
  }

  private static IWorkbenchPage getCurrentPage() {
    IWorkbench wb = PlatformUI.getWorkbench();
    IWorkbenchWindow win = wb.getActiveWorkbenchWindow();
    IWorkbenchPage page = win.getActivePage();
    return page;
  }
View Full Code Here

Examples of org.eclipse.ui.IWorkbench

      }
      if (_or) {
        final Location location = ((Location) model);
        final String uri = location.getUri();
        TargetPlatformActivator _instance = TargetPlatformActivator.getInstance();
        IWorkbench _workbench = _instance.getWorkbench();
        final IWorkbenchWindow window = _workbench.getActiveWorkbenchWindow();
        final IRunnableWithProgress _function = new IRunnableWithProgress() {
          public void run(final IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
            Shell _shell = window.getShell();
            Display _display = _shell.getDisplay();
            ReadAndDispatchProgressMonitorWrapper _readAndDispatchProgressMonitorWrapper = new ReadAndDispatchProgressMonitorWrapper(monitor, _display);
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.