Package org.eclipse.ui

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


  /*
   * @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

  /*
   * @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

    /* 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

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

    /* (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

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

    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

  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

      }
      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

Related Classes of org.eclipse.ui.IWorkbench

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.