Examples of IWorkbench


Examples of org.eclipse.ui.IWorkbench

      if (_or) {
        final IU iu = ((IU) model);
        Location _location = iu.getLocation();
        final String uri = _location.getUri();
        TargetPlatformActivator _instance = TargetPlatformActivator.getInstance();
        IWorkbench _workbench = _instance.getWorkbench();
        final IWorkbenchWindow window = _workbench.getActiveWorkbenchWindow();
        Shell _shell = window.getShell();
        Display _display = _shell.getDisplay();
        final IRunnableWithProgress op = this.versionProposalRunnable(uri, iu, prefix, _display, context, acceptor);
        window.run(false, true, op);
      }
View Full Code Here

Examples of org.eclipse.ui.IWorkbench

    /**
     * Shows the duplicates view.
     */
    public static void showDuplicatesView() {
        final IWorkbench workbench = PlatformUI.getWorkbench();

        final IWorkbenchWindow window = workbench.getActiveWorkbenchWindow();
        try {

            @SuppressWarnings("unused")
            final IViewPart view = window.getActivePage().showView(duplicatedView);

View Full Code Here

Examples of org.eclipse.ui.IWorkbench

    /**
     * Hide the duplicates view.
     */
    public static void closeDuplicatesView() {
        final IWorkbench workbench = PlatformUI.getWorkbench();

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

Examples of org.eclipse.ui.IWorkbench

    public ScrolledPageContent(final Composite parent, final int style) {
        super(parent, style);

        setFont(parent.getFont());
        final IWorkbench workbench = PlatformUI.getWorkbench();
        final Display display = workbench.getDisplay();

        fToolkit = new FormToolkit(display);

        setExpandHorizontal(true);
        setExpandVertical(true);
View Full Code Here

Examples of org.eclipse.ui.IWorkbench

    }

    @Override
    public void runtimeRemoved(final IBackend b) {
        ErlLogger.debug("$$ removed backend " + b.getName());
        final IWorkbench workbench = PlatformUI.getWorkbench();
        final Display display = workbench.getDisplay();
        display.asyncExec(new Runnable() {

            @Override
            public void run() {
                // PopupDialog.showBalloon("Backend notification", "Removed "
View Full Code Here

Examples of org.eclipse.ui.IWorkbench

                }
                return Status.OK_STATUS;
            }

            public List<IEditorReference> getWorkbenchEditorReferences() {
                final IWorkbench workbench = PlatformUI.getWorkbench();
                final IWorkbenchPage[] pages = workbench.getActiveWorkbenchWindow()
                        .getPages();
                final List<IEditorReference> editorRefs = Lists.newArrayList();
                for (final IWorkbenchPage page : pages) {
                    for (final IEditorReference ref : page.getEditorReferences()) {
                        editorRefs.add(ref);
View Full Code Here

Examples of org.eclipse.ui.IWorkbench

        this.commandId = commandId;
    }

    @Override
    public void widgetSelected(final SelectionEvent e) {
        final IWorkbench workbench = PlatformUI.getWorkbench();
        final IHandlerService handlerService = (IHandlerService) workbench
                .getService(IHandlerService.class);
        try {
            handlerService.executeCommand(commandId, null);
        } catch (final Exception ex) {
            throw new RuntimeException(commandId + " not found");
View Full Code Here

Examples of org.eclipse.ui.IWorkbench

                erl = true;
                break;
            }
        }
        if (erl) {
            final IWorkbench workbench = PlatformUI.getWorkbench();
            final IWorkbenchWindow activeWorkbenchWindow = workbench
                    .getActiveWorkbenchWindow();
            if (activeWorkbenchWindow != null) {
                final IWorkbenchPage activePage = activeWorkbenchWindow.getActivePage();
                try {
                    activePage.showView(CONSOLE_VIEW_ID);
View Full Code Here

Examples of org.eclipse.ui.IWorkbench

        try {
            file.refreshLocal(IResource.DEPTH_ZERO, null);
        } catch (final CoreException e) {
        }

        final IWorkbench wbench = PlatformUI.getWorkbench();
        final IWorkbenchPage page = wbench.getActiveWorkbenchWindow().getActivePage();
        final IEditorDescriptor desc = PlatformUI.getWorkbench().getEditorRegistry()
                .getDefaultEditor(file.getName());
        try {
            page.openEditor(new FileEditorInput(file), desc.getId());
        } catch (final PartInitException e) {
View Full Code Here

Examples of org.eclipse.ui.IWorkbench

    private void openInBrowser(final IFile file) {
        if (file == null) {
            return;
        }
        final IWorkbench wbench = PlatformUI.getWorkbench();
        final IWorkbenchBrowserSupport browserSupport = wbench.getBrowserSupport();
        try {
            file.refreshLocal(IResource.DEPTH_ZERO, null);
        } catch (final CoreException e1) {
        }
        if (file.exists() && file.isAccessible()) {
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.