Examples of IWorkbench


Examples of org.eclipse.ui.IWorkbench

            }
        });
        try {
            doLaunch(mode, projectList);
        } catch (final CoreException e) {
            final IWorkbench workbench = PlatformUI.getWorkbench();
            final Shell shell = workbench.getActiveWorkbenchWindow().getShell();
            MessageDialog.openError(shell, "Error", e.getStatus().getMessage());
        }
    }
View Full Code Here

Examples of org.eclipse.ui.IWorkbench

            final IErlProject project = erlangEditor.getProject();
            if (project != null) {
                try {
                    doLaunch(mode, Lists.newArrayList(project));
                } catch (final CoreException e) {
                    final IWorkbench workbench = PlatformUI.getWorkbench();
                    final Shell shell = workbench.getActiveWorkbenchWindow().getShell();
                    MessageDialog.openError(shell, "Error", e.getStatus().getMessage());
                }
            }
        }
    }
View Full Code Here

Examples of org.eclipse.ui.IWorkbench

        return 0;
    }

    public static Collection<IEditorPart> getAllErlangEditors() {
        final List<IEditorPart> result = Lists.newArrayList();
        final IWorkbench workbench = ErlideUIPlugin.getDefault().getWorkbench();
        for (final IWorkbenchWindow i : workbench.getWorkbenchWindows()) {
            for (final IWorkbenchPage j : i.getPages()) {
                for (final IEditorReference editorReference : j.getEditorReferences()) {
                    final IEditorPart editorPart = editorReference.getEditor(false);
                    if (editorPart instanceof ErlangEditor) {
                        result.add(editorPart);
View Full Code Here

Examples of org.eclipse.ui.IWorkbench

    final ErlSearchQuery query = new ErlSearchQuery(pattern, scope, scopeDescription);
    boolean _canRunInBackground = query.canRunInBackground();
    if (_canRunInBackground) {
      NewSearchUI.runQueryInBackground(query);
    } else {
      IWorkbench _workbench = PlatformUI.getWorkbench();
      final IProgressService progressService = _workbench.getProgressService();
      final IStatus status = NewSearchUI.runQueryInForeground(progressService, query);
      boolean _matches = status.matches(((IStatus.ERROR + IStatus.INFO) + IStatus.WARNING));
      if (_matches) {
        ErrorDialog.openError(shell, "Search",
          ("Problems occurred while searching. " + "The affected files will be skipped."), status);
View Full Code Here

Examples of org.eclipse.ui.IWorkbench

        boolean _tripleNotEquals = (lruWorkingSetNames != null);
        if (_tripleNotEquals) {
          final Set<IWorkingSet> workingSets = new HashSet<IWorkingSet>(2);
          for (int j = 0; (j < lruWorkingSetNames.length); j++) {
            {
              IWorkbench _workbench = PlatformUI.getWorkbench();
              IWorkingSetManager _workingSetManager = _workbench.getWorkingSetManager();
              String _get = lruWorkingSetNames[j];
              final IWorkingSet workingSet = _workingSetManager.getWorkingSet(_get);
              boolean _tripleNotEquals_1 = (workingSet != null);
              if (_tripleNotEquals_1) {
                workingSets.add(workingSet);
View Full Code Here

Examples of org.eclipse.ui.IWorkbench

      }
    }
  }
 
  public static IWorkingSet[] queryWorkingSets() throws InterruptedException {
    IWorkbench _workbench = PlatformUI.getWorkbench();
    final IWorkbenchWindow activeWorkbenchWindow = _workbench.getActiveWorkbenchWindow();
    boolean _tripleEquals = (activeWorkbenchWindow == null);
    if (_tripleEquals) {
      return null;
    }
    final Shell shell = activeWorkbenchWindow.getShell();
    boolean _tripleEquals_1 = (shell == null);
    if (_tripleEquals_1) {
      return null;
    }
    IWorkbench _workbench_1 = PlatformUI.getWorkbench();
    IWorkingSetManager _workingSetManager = _workbench_1.getWorkingSetManager();
    final IWorkingSetSelectionDialog dialog = _workingSetManager.createWorkingSetSelectionDialog(shell, true);
    int _open = dialog.open();
    boolean _notEquals = (_open != Window.OK);
    if (_notEquals) {
      throw new InterruptedException();
View Full Code Here

Examples of org.eclipse.ui.IWorkbench

                provider = fPart.getSite();
            } else {
                provider = new IShellProvider() {
                    @Override
                    public Shell getShell() {
                        final IWorkbench workbench = PlatformUI.getWorkbench();
                        final IWorkbenchWindow window = workbench
                                .getActiveWorkbenchWindow();
                        return window == null ? null : window.getShell();
                    }
                };
            }
View Full Code Here

Examples of org.eclipse.ui.IWorkbench

     *
     * @return view which is shown
     */
    static public IViewPart showView(final String viewId) {

        final IWorkbench workbench = PlatformUI.getWorkbench();

        final IWorkbenchWindow window = workbench.getActiveWorkbenchWindow();
        try {
            final IViewPart view = window.getActivePage().showView(viewId);
            return view;
        } catch (final PartInitException e) {
            ErlLogger.error(e);
View Full Code Here

Examples of org.eclipse.ui.IWorkbench

     * @param secondaryID
     *            view secondary id, to handle multiple instances
     * @return view object
     */
    static public IViewPart showView(final String viewId, final String secondaryID) {
        final IWorkbench workbench = PlatformUI.getWorkbench();

        final IWorkbenchWindow window = workbench.getActiveWorkbenchWindow();
        try {
            final IViewPart view = window.getActivePage().showView(viewId, secondaryID,
                    IWorkbenchPage.VIEW_ACTIVATE);
            return view;
        } catch (final PartInitException e) {
View Full Code Here

Examples of org.eclipse.ui.IWorkbench

     *            view id
     * @param secondaryId
     *            secondary id of a view instance
     */
    static public void hideView(final String viewId, final String secondaryId) {
        final IWorkbench workbench = PlatformUI.getWorkbench();

        final IWorkbenchWindow window = workbench.getActiveWorkbenchWindow();
        IViewPart view;
        final IViewReference viewr = window.getActivePage().findViewReference(viewId,
                secondaryId);
        if (viewr != null) {
            view = viewr.getView(false);
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.