org.eclipse.ui.progress.IProgressConstants Java Examples
The following examples show how to use
org.eclipse.ui.progress.IProgressConstants.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: PythonPerspectiveFactory.java From Pydev with Eclipse Public License 1.0 | 6 votes |
/** * @param layout * @param editorArea */ public void defineLayout(IPageLayout layout) { String editorArea = layout.getEditorArea(); IFolderLayout topLeft = layout.createFolder("topLeft", IPageLayout.LEFT, (float) 0.26, editorArea); //$NON-NLS-1$ topLeft.addView("org.python.pydev.navigator.view"); IFolderLayout outputfolder = layout.createFolder("bottom", IPageLayout.BOTTOM, (float) 0.75, editorArea); //$NON-NLS-1$ //outputfolder.addView(IPageLayout.ID_PROBLEM_VIEW); outputfolder.addPlaceholder(NewSearchUI.SEARCH_VIEW_ID); outputfolder.addPlaceholder(IConsoleConstants.ID_CONSOLE_VIEW); outputfolder.addPlaceholder(IPageLayout.ID_BOOKMARKS); outputfolder.addPlaceholder(IProgressConstants.PROGRESS_VIEW_ID); //Add the outline only if we're not using the minimap. if (!MinimapOverviewRulerPreferencesPage.getShowMinimapContents()) { layout.addView(IPageLayout.ID_OUTLINE, IPageLayout.RIGHT, (float) 0.75, editorArea); } }
Example #2
Source File: AbstractJob.java From tlaplus with MIT License | 6 votes |
/** * Called when the job is finished. */ protected void doFinish() { // setProperty(IProgressConstants.ICON_PROPERTY, image); if (AbstractJob.isModal(this)) { Display.getDefault().asyncExec(new Runnable() { public void run() { getJobCompletedAction().run(); } }); } else { setProperty(IProgressConstants.KEEP_PROPERTY, Boolean.TRUE); setProperty(IProgressConstants.ACTION_PROPERTY, getJobCompletedAction()); } }
Example #3
Source File: TypeScriptPerspectiveFactory.java From typescript.java with MIT License | 6 votes |
@Override public void createInitialLayout(IPageLayout layout) { String editorArea = layout.getEditorArea(); IFolderLayout left = layout.createFolder("left", IPageLayout.LEFT, (float) 0.25, editorArea); //$NON-NLS-1$ left.addView(IPageLayout.ID_PROJECT_EXPLORER); left.addPlaceholder(IPageLayout.ID_RES_NAV); IFolderLayout bottom = layout.createFolder("bottom", IPageLayout.BOTTOM, (float) 0.75, editorArea); //$NON-NLS-1$ bottom.addView("org.eclipse.tm.terminal.view.ui.TerminalsView"); bottom.addView(IPageLayout.ID_PROBLEM_VIEW); bottom.addPlaceholder(TemplatesView.ID); bottom.addPlaceholder(NewSearchUI.SEARCH_VIEW_ID); bottom.addPlaceholder(IConsoleConstants.ID_CONSOLE_VIEW); bottom.addPlaceholder(IPageLayout.ID_BOOKMARKS); bottom.addPlaceholder(IProgressConstants.PROGRESS_VIEW_ID); bottom.addPlaceholder(IPageLayout.ID_TASK_LIST); bottom.addPlaceholder(IPageLayout.ID_PROP_SHEET); layout.addView(IPageLayout.ID_OUTLINE, IPageLayout.RIGHT, (float) 0.75, editorArea); }
Example #4
Source File: FeatureUpdateManager.java From gwt-eclipse-plugin with Eclipse Public License 1.0 | 6 votes |
protected void addDownloadJob(DownloadJob downloadJob) { if (downloadJob != null) { // This is a non-user job, so make sure that it has no presence in the // Progress View downloadJob.setSystem(true); downloadJob.addJobChangeListener(removeJobOnCompleteListener); // If the job returns an ERROR status, make sure that it does not show // a modal dialog with the ERROR information; we want a silent failure downloadJob.setProperty( IProgressConstants.NO_IMMEDIATE_ERROR_PROMPT_PROPERTY, true); synchronized (downloadJobs) { downloadJob.schedule(); downloadJobs.add(downloadJob); } } }
Example #5
Source File: NegotiationHandler.java From saros with GNU General Public License v2.0 | 6 votes |
public OutgoingInvitationJob(OutgoingSessionNegotiation negotiation) { super( MessageFormat.format( Messages.NegotiationHandler_inviting_user, getNickname(negotiation.getPeer()), negotiation.getPeer().getRAW())); this.negotiation = negotiation; this.peer = negotiation.getPeer().getBase(); setUser(true); setProperty(IProgressConstants.KEEP_PROPERTY, Boolean.TRUE); setProperty( IProgressConstants.ICON_PROPERTY, ImageManager.getImageDescriptor("/icons/elcl16/session_tsk.png")); }
Example #6
Source File: OutgoingFileTransferJob.java From saros with GNU General Public License v2.0 | 5 votes |
public OutgoingFileTransferJob(JID jid, File file) { super("File Transfer", jid); setProperty(IProgressConstants.KEEP_PROPERTY, Boolean.TRUE); this.file = file; SarosPluginContext.initComponent(this); }
Example #7
Source File: CloudSdkModifyJob.java From google-cloud-eclipse with Apache License 2.0 | 5 votes |
@VisibleForTesting MessageConsoleStream createNewMessageConsole() { MessageConsole console = MessageConsoleUtilities.getMessageConsole( Messages.getString("configuring.cloud.sdk"), // $NON-NLS-1$ null /* imageDescriptor */); setProperty(IProgressConstants.ACTION_PROPERTY, new ShowConsoleViewAction(console)); return console.newMessageStream(); }
Example #8
Source File: EclipseHttpJob.java From http4e with Apache License 2.0 | 5 votes |
public EclipseHttpJob( long duration, boolean lock, /*boolean failure,*/ boolean indeterminate/*, boolean reschedule, long rescheduleWait*/) { super("http4e loading.."); this.duration = duration; // this.failure = failure; this.unknown = indeterminate; // this.reschedule = reschedule; // this.rescheduleWait = rescheduleWait; if (lock) setRule(ResourcesPlugin.getWorkspace().getRoot()); setProperty(IProgressConstants.KEEP_PROPERTY, Boolean.valueOf("true")); setProperty(IProgressConstants.KEEPONE_PROPERTY, Boolean.valueOf("true")); schedule(10); }
Example #9
Source File: InstallFeaturesCommandHandler.java From developer-studio with Apache License 2.0 | 5 votes |
@Override public Object execute(ExecutionEvent arg0) throws ExecutionException { Job updateJob = new UpdateCheckerJob(updateManager); updateJob.schedule(); updateJob.addJobChangeListener(new UpdateCheckerJobListener( updateManager, ActiveTab.ALL_FEATURES, false)); try { PlatformUI.getWorkbench().getActiveWorkbenchWindow() .getActivePage().showView(IProgressConstants.PROGRESS_VIEW_ID); } catch (PartInitException e) { log.error(e); } return null; }
Example #10
Source File: NegotiationHandler.java From saros with GNU General Public License v2.0 | 5 votes |
public OutgoingProjectJob(AbstractOutgoingResourceNegotiation outgoingProjectNegotiation) { super(Messages.NegotiationHandler_sharing_project); negotiation = outgoingProjectNegotiation; peer = negotiation.getPeer().getBase(); setUser(true); setProperty(IProgressConstants.KEEP_PROPERTY, Boolean.TRUE); setProperty( IProgressConstants.ICON_PROPERTY, ImageManager.getImageDescriptor("/icons/invites.png")); }
Example #11
Source File: JavaBrowsingPerspectiveFactory.java From Eclipse-Postfix-Code-Completion with Eclipse Public License 1.0 | 5 votes |
private void createVerticalLayout(IPageLayout layout) { String relativePartId= IPageLayout.ID_EDITOR_AREA; int relativePos= IPageLayout.LEFT; IPlaceholderFolderLayout placeHolderLeft= layout.createPlaceholderFolder("left", IPageLayout.LEFT, (float)0.25, IPageLayout.ID_EDITOR_AREA); //$NON-NLS-1$ placeHolderLeft.addPlaceholder(JavaUI.ID_TYPE_HIERARCHY); placeHolderLeft.addPlaceholder(IPageLayout.ID_OUTLINE); placeHolderLeft.addPlaceholder(JavaUI.ID_PACKAGES); placeHolderLeft.addPlaceholder(JavaPlugin.ID_RES_NAV); placeHolderLeft.addPlaceholder(IPageLayout.ID_PROJECT_EXPLORER); if (shouldShowProjectsView()) { layout.addView(JavaUI.ID_PROJECTS_VIEW, IPageLayout.LEFT, (float)0.25, IPageLayout.ID_EDITOR_AREA); relativePartId= JavaUI.ID_PROJECTS_VIEW; relativePos= IPageLayout.BOTTOM; } if (shouldShowPackagesView()) { layout.addView(JavaUI.ID_PACKAGES_VIEW, relativePos, (float)0.25, relativePartId); relativePartId= JavaUI.ID_PACKAGES_VIEW; relativePos= IPageLayout.BOTTOM; } layout.addView(JavaUI.ID_TYPES_VIEW, relativePos, (float)0.33, relativePartId); layout.addView(JavaUI.ID_MEMBERS_VIEW, IPageLayout.BOTTOM, (float)0.50, JavaUI.ID_TYPES_VIEW); IPlaceholderFolderLayout placeHolderBottom= layout.createPlaceholderFolder("bottom", IPageLayout.BOTTOM, (float)0.75, IPageLayout.ID_EDITOR_AREA); //$NON-NLS-1$ placeHolderBottom.addPlaceholder(IPageLayout.ID_PROBLEM_VIEW); placeHolderBottom.addPlaceholder(NewSearchUI.SEARCH_VIEW_ID); placeHolderBottom.addPlaceholder(IConsoleConstants.ID_CONSOLE_VIEW); placeHolderBottom.addPlaceholder(IPageLayout.ID_BOOKMARKS); placeHolderBottom.addPlaceholder(JavaUI.ID_SOURCE_VIEW); placeHolderBottom.addPlaceholder(JavaUI.ID_JAVADOC_VIEW); placeHolderBottom.addPlaceholder(IProgressConstants.PROGRESS_VIEW_ID); }
Example #12
Source File: JavaBrowsingPerspectiveFactory.java From Eclipse-Postfix-Code-Completion with Eclipse Public License 1.0 | 5 votes |
private void createHorizontalLayout(IPageLayout layout) { String relativePartId= IPageLayout.ID_EDITOR_AREA; int relativePos= IPageLayout.TOP; if (shouldShowProjectsView()) { layout.addView(JavaUI.ID_PROJECTS_VIEW, IPageLayout.TOP, (float)0.25, IPageLayout.ID_EDITOR_AREA); relativePartId= JavaUI.ID_PROJECTS_VIEW; relativePos= IPageLayout.RIGHT; } if (shouldShowPackagesView()) { layout.addView(JavaUI.ID_PACKAGES_VIEW, relativePos, (float)0.25, relativePartId); relativePartId= JavaUI.ID_PACKAGES_VIEW; relativePos= IPageLayout.RIGHT; } layout.addView(JavaUI.ID_TYPES_VIEW, relativePos, (float)0.33, relativePartId); layout.addView(JavaUI.ID_MEMBERS_VIEW, IPageLayout.RIGHT, (float)0.50, JavaUI.ID_TYPES_VIEW); IPlaceholderFolderLayout placeHolderLeft= layout.createPlaceholderFolder("left", IPageLayout.LEFT, (float)0.25, IPageLayout.ID_EDITOR_AREA); //$NON-NLS-1$ placeHolderLeft.addPlaceholder(JavaUI.ID_TYPE_HIERARCHY); placeHolderLeft.addPlaceholder(IPageLayout.ID_OUTLINE); placeHolderLeft.addPlaceholder(JavaUI.ID_PACKAGES); placeHolderLeft.addPlaceholder(JavaPlugin.ID_RES_NAV); placeHolderLeft.addPlaceholder(IPageLayout.ID_PROJECT_EXPLORER); IPlaceholderFolderLayout placeHolderBottom= layout.createPlaceholderFolder("bottom", IPageLayout.BOTTOM, (float)0.75, IPageLayout.ID_EDITOR_AREA); //$NON-NLS-1$ placeHolderBottom.addPlaceholder(IPageLayout.ID_PROBLEM_VIEW); placeHolderBottom.addPlaceholder(NewSearchUI.SEARCH_VIEW_ID); placeHolderBottom.addPlaceholder(IConsoleConstants.ID_CONSOLE_VIEW); placeHolderBottom.addPlaceholder(IPageLayout.ID_BOOKMARKS); placeHolderBottom.addPlaceholder(JavaUI.ID_SOURCE_VIEW); placeHolderBottom.addPlaceholder(JavaUI.ID_JAVADOC_VIEW); placeHolderBottom.addPlaceholder(IProgressConstants.PROGRESS_VIEW_ID); }
Example #13
Source File: LapseView.java From lapse-plus with GNU General Public License v3.0 | 5 votes |
public SlicingFromSinkJob(String name, LapseView view) { super(name); this.view = view; setProperty(IProgressConstants.ACTION_PROPERTY, new Action("Pop up a dialog") { public void run() { MessageDialog.openInformation(getSite().getShell(), "Goto Action", "The job can have an action associated with it"); } }); }
Example #14
Source File: UpdateFeaturesCommandHandler.java From developer-studio with Apache License 2.0 | 5 votes |
@Override public Object execute(ExecutionEvent arg0) throws ExecutionException { Job updateJob = new UpdateCheckerJob(updateManager); updateJob.schedule(); updateJob.addJobChangeListener(new UpdateCheckerJobListener( updateManager, ActiveTab.UPDATE_FEATURES, false)); try { PlatformUI.getWorkbench().getActiveWorkbenchWindow() .getActivePage().showView(IProgressConstants.PROGRESS_VIEW_ID); } catch (PartInitException e) { log.error(e); } return null; }
Example #15
Source File: IncomingFileTransferJob.java From saros with GNU General Public License v2.0 | 4 votes |
public IncomingFileTransferJob(XMPPFileTransferRequest request, File file) { super("File Transfer", request.getContact().getBareJid()); setProperty(IProgressConstants.KEEP_PROPERTY, Boolean.TRUE); this.request = request; this.file = file; }
Example #16
Source File: JavaHierarchyPerspectiveFactory.java From Eclipse-Postfix-Code-Completion with Eclipse Public License 1.0 | 4 votes |
public void createInitialLayout(IPageLayout layout) { String editorArea = layout.getEditorArea(); IFolderLayout folder= layout.createFolder("left", IPageLayout.LEFT, (float)0.25, editorArea); //$NON-NLS-1$ folder.addView(JavaUI.ID_TYPE_HIERARCHY); folder.addPlaceholder(IPageLayout.ID_OUTLINE); folder.addPlaceholder(JavaUI.ID_PACKAGES); folder.addPlaceholder(JavaPlugin.ID_RES_NAV); folder.addPlaceholder(IPageLayout.ID_PROJECT_EXPLORER); IPlaceholderFolderLayout outputfolder= layout.createPlaceholderFolder("bottom", IPageLayout.BOTTOM, (float)0.75, editorArea); //$NON-NLS-1$ outputfolder.addPlaceholder(IPageLayout.ID_PROBLEM_VIEW); outputfolder.addPlaceholder(NewSearchUI.SEARCH_VIEW_ID); outputfolder.addPlaceholder(IConsoleConstants.ID_CONSOLE_VIEW); outputfolder.addPlaceholder(IPageLayout.ID_BOOKMARKS); outputfolder.addPlaceholder(JavaUI.ID_SOURCE_VIEW); outputfolder.addPlaceholder(JavaUI.ID_JAVADOC_VIEW); outputfolder.addPlaceholder(IProgressConstants.PROGRESS_VIEW_ID); layout.addActionSet(IDebugUIConstants.LAUNCH_ACTION_SET); layout.addActionSet(JavaUI.ID_ACTION_SET); layout.addActionSet(JavaUI.ID_ELEMENT_CREATION_ACTION_SET); // views - java layout.addShowViewShortcut(JavaUI.ID_PACKAGES); layout.addShowViewShortcut(JavaUI.ID_TYPE_HIERARCHY); layout.addShowViewShortcut(NewSearchUI.SEARCH_VIEW_ID); // views - debugging layout.addShowViewShortcut(IConsoleConstants.ID_CONSOLE_VIEW); // views - standard workbench layout.addShowViewShortcut(IPageLayout.ID_OUTLINE); layout.addShowViewShortcut(IPageLayout.ID_PROBLEM_VIEW); layout.addShowViewShortcut(JavaPlugin.ID_RES_NAV); layout.addShowViewShortcut(IPageLayout.ID_TASK_LIST); layout.addShowViewShortcut(IProgressConstants.PROGRESS_VIEW_ID); layout.addShowViewShortcut(IPageLayout.ID_PROJECT_EXPLORER); layout.addShowViewShortcut(TemplatesView.ID); layout.addShowViewShortcut("org.eclipse.pde.runtime.LogView"); //$NON-NLS-1$ layout.addNewWizardShortcut("org.eclipse.jdt.ui.wizards.JavaProjectWizard"); //$NON-NLS-1$ layout.addNewWizardShortcut("org.eclipse.jdt.ui.wizards.NewPackageCreationWizard"); //$NON-NLS-1$ layout.addNewWizardShortcut("org.eclipse.jdt.ui.wizards.NewClassCreationWizard"); //$NON-NLS-1$ layout.addNewWizardShortcut("org.eclipse.jdt.ui.wizards.NewInterfaceCreationWizard"); //$NON-NLS-1$ layout.addNewWizardShortcut("org.eclipse.jdt.ui.wizards.NewEnumCreationWizard"); //$NON-NLS-1$ layout.addNewWizardShortcut("org.eclipse.jdt.ui.wizards.NewAnnotationCreationWizard"); //$NON-NLS-1$ layout.addNewWizardShortcut("org.eclipse.jdt.ui.wizards.NewSourceFolderCreationWizard"); //$NON-NLS-1$ layout.addNewWizardShortcut("org.eclipse.jdt.ui.wizards.NewSnippetFileCreationWizard"); //$NON-NLS-1$ layout.addNewWizardShortcut("org.eclipse.jdt.ui.wizards.NewJavaWorkingSetWizard"); //$NON-NLS-1$ layout.addNewWizardShortcut("org.eclipse.ui.wizards.new.folder");//$NON-NLS-1$ layout.addNewWizardShortcut("org.eclipse.ui.wizards.new.file");//$NON-NLS-1$ layout.addNewWizardShortcut("org.eclipse.ui.editors.wizards.UntitledTextFileWizard");//$NON-NLS-1$ // 'Window' > 'Open Perspective' contributions layout.addPerspectiveShortcut(JavaUI.ID_PERSPECTIVE); layout.addPerspectiveShortcut(JavaUI.ID_BROWSING_PERSPECTIVE); layout.addPerspectiveShortcut(IDebugUIConstants.ID_DEBUG_PERSPECTIVE); }
Example #17
Source File: PatListeContentProvider.java From elexis-3-core with Eclipse Public License 1.0 | 4 votes |
@Override public Object[] getElements(Object inputElement){ if (bValid || bUpdating) { return pats; } if (pfilter != null) { pats = new String[] { Messages.PatListeContentProvider_LoadingData }; ((TableViewer) commonViewer.getViewerWidget()).setItemCount(1); } if (!CoreHub.acl.request(AccessControlDefaults.PATIENT_DISPLAY)) { return new Object[0]; } Job job = new Job(Messages.PatListeContentProvider_LoadingPatients) { @Override protected IStatus run(IProgressMonitor monitor){ monitor.beginTask(Messages.PatListeContentProvider_LoadPatients, IProgressMonitor.UNKNOWN); if (pfilter != null) { if (pfilter.aboutToStart() == false) { return Status.CANCEL_STATUS; } } // perform actual loading syncRefresh(); monitor.done(); return Status.OK_STATUS; } }; job.setPriority(Job.SHORT); job.setUser(false); bUpdating = true; IWorkbenchSiteProgressService siteService = (IWorkbenchSiteProgressService) site.getSite().getAdapter( IWorkbenchSiteProgressService.class); siteService.schedule(job, 0, true); job.setProperty(IProgressConstants.ICON_PROPERTY, Images.IMG_AUSRUFEZ_ROT.getImage()); return pats; }
Example #18
Source File: UpdateManager.java From developer-studio with Apache License 2.0 | 4 votes |
/** * Install selected features in to developer studio. Note: call * {@link #setSelectedFeaturesToInstall(List) setSelectedFeaturesToInstall} * first. * * @param monitor */ public void installSelectedFeatures(IProgressMonitor monitor) { SubMonitor progress = SubMonitor.convert(monitor, Messages.UpdateManager_32, 2); URI[] repos = new URI[] { getDevStudioReleaseSite() }; session = new ProvisioningSession(p2Agent); installOperation = new InstallOperation(session, selectedFeatures); installOperation.getProvisioningContext().setArtifactRepositories(repos); installOperation.getProvisioningContext().setMetadataRepositories(repos); IStatus status = installOperation.resolveModal(progress.newChild(1)); if (status.getSeverity() == IStatus.CANCEL || progress.isCanceled()) { throw new OperationCanceledException(); } else if (status.getSeverity() == IStatus.ERROR) { String message = status.getChildren()[0].getMessage(); log.error(Messages.UpdateManager_33 + message); UpdateMetaFileReaderJob.promptUserError(message, Messages.UpdateManager_33); } else { ProvisioningJob provisioningJob = installOperation.getProvisioningJob(progress.newChild(1)); if (provisioningJob != null) { provisioningJob.addJobChangeListener(new JobChangeAdapter() { @Override public void done(IJobChangeEvent arg0) { Display.getDefault().syncExec(new Runnable() { @Override public void run() { boolean restart = MessageDialog.openQuestion(Display.getDefault().getActiveShell(), Messages.UpdateManager_34, Messages.UpdateManager_35 + Messages.UpdateManager_36); if (restart) { PlatformUI.getWorkbench().restart(); } } }); } }); provisioningJob.schedule(); Display.getDefault().syncExec(new Runnable() { @Override public void run() { try { PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage() .showView(IProgressConstants.PROGRESS_VIEW_ID); } catch (PartInitException e) { log.error(e); } } }); } else { log.error(Messages.UpdateManager_37); } } }
Example #19
Source File: UpdateManager.java From developer-studio with Apache License 2.0 | 4 votes |
/** * Install selected updates in to developer studio. Note: call * {@link #setSelectedUpdates(List) setSelectedUpdates} first. * * @param monitor */ public void installSelectedUpdates(IProgressMonitor monitor) { SubMonitor progress = SubMonitor.convert(monitor, Messages.UpdateManager_26, 2); URI[] repos = new URI[] { getDevStudioUpdateSite() }; session = new ProvisioningSession(p2Agent); updateOperation = new UpdateOperation(session); updateOperation.getProvisioningContext().setArtifactRepositories(repos); updateOperation.getProvisioningContext().setMetadataRepositories(repos); updateOperation.setSelectedUpdates(selectedUpdates); IStatus status = updateOperation.resolveModal(progress.newChild(1)); if (status.getSeverity() == IStatus.CANCEL) { throw new OperationCanceledException(); } else if (status.getSeverity() == IStatus.ERROR) { String message = status.getChildren()[0].getMessage(); UpdateMetaFileReaderJob.promptUserError(message, Messages.UpdateManager_27); log.error(Messages.UpdateManager_27 + message); } else { final ProvisioningJob provisioningJob = updateOperation.getProvisioningJob(progress.newChild(1)); if (provisioningJob != null) { provisioningJob.addJobChangeListener(new JobChangeAdapter() { @Override public void done(IJobChangeEvent arg0) { Display.getDefault().syncExec(new Runnable() { @Override public void run() { boolean restart = MessageDialog.openQuestion(Display.getDefault().getActiveShell(), Messages.UpdateManager_28, Messages.UpdateManager_29 + Messages.UpdateManager_30); if (restart) { PlatformUI.getWorkbench().restart(); } } }); } }); provisioningJob.schedule(); Display.getDefault().syncExec(new Runnable() { @Override public void run() { try { PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage() .showView(IProgressConstants.PROGRESS_VIEW_ID); } catch (PartInitException e) { log.error(e); } } }); } else { log.error(Messages.UpdateManager_31); } } }
Example #20
Source File: SARLPerspectiveFactory.java From sarl with Apache License 2.0 | 4 votes |
@Override public void createInitialLayout(IPageLayout layout) { final String editorArea = layout.getEditorArea(); final IFolderLayout folder = layout.createFolder("left", IPageLayout.LEFT, //$NON-NLS-1$ LEFT_PANEL_RATIO, editorArea); //folder.addView(JavaUI.ID_PACKAGES); folder.addView(SARLPackageExplorerPart.ID_PACKAGES); folder.addPlaceholder(JavaUI.ID_TYPE_HIERARCHY); folder.addPlaceholder(IPageLayout.ID_PROJECT_EXPLORER); final IFolderLayout outputfolder = layout.createFolder("bottom", IPageLayout.BOTTOM, //$NON-NLS-1$ BOTTOM_PANEL_RATIO, editorArea); outputfolder.addView(IPageLayout.ID_PROBLEM_VIEW); outputfolder.addView(IConsoleConstants.ID_CONSOLE_VIEW); outputfolder.addView(IPageLayout.ID_TASK_LIST); outputfolder.addPlaceholder(JavaUI.ID_JAVADOC_VIEW); outputfolder.addPlaceholder(JavaUI.ID_SOURCE_VIEW); outputfolder.addPlaceholder(NewSearchUI.SEARCH_VIEW_ID); outputfolder.addPlaceholder(IPageLayout.ID_BOOKMARKS); outputfolder.addPlaceholder(IProgressConstants.PROGRESS_VIEW_ID); final IFolderLayout outlineFolder = layout.createFolder("right", IPageLayout.RIGHT, //$NON-NLS-1$ RIGHT_PANEL_RATIO, editorArea); outlineFolder.addView(IPageLayout.ID_OUTLINE); layout.addActionSet(IDebugUIConstants.LAUNCH_ACTION_SET); layout.addActionSet(JavaUI.ID_ACTION_SET); layout.addActionSet(JavaUI.ID_ELEMENT_CREATION_ACTION_SET); layout.addActionSet(IPageLayout.ID_NAVIGATE_ACTION_SET); // views - java layout.addShowViewShortcut(JavaUI.ID_PACKAGES); layout.addShowViewShortcut(JavaUI.ID_TYPE_HIERARCHY); layout.addShowViewShortcut(JavaUI.ID_SOURCE_VIEW); // views - search layout.addShowViewShortcut(NewSearchUI.SEARCH_VIEW_ID); // views - debugging layout.addShowViewShortcut(IConsoleConstants.ID_CONSOLE_VIEW); // views - standard workbench layout.addShowViewShortcut(IPageLayout.ID_OUTLINE); layout.addShowViewShortcut(IPageLayout.ID_PROBLEM_VIEW); layout.addShowViewShortcut(IPageLayout.ID_TASK_LIST); layout.addShowViewShortcut(IProgressConstants.PROGRESS_VIEW_ID); layout.addShowViewShortcut(IPageLayout.ID_PROJECT_EXPLORER); layout.addShowViewShortcut("org.eclipse.pde.runtime.LogView"); //$NON-NLS-1$ // new actions - Java project creation wizard layout.addNewWizardShortcut("io.sarl.eclipse.wizard.newSarlProject"); //$NON-NLS-1$ layout.addNewWizardShortcut("io.sarl.eclipse.wizard.newSarlScript"); //$NON-NLS-1$ layout.addNewWizardShortcut("io.sarl.eclipse.wizard.newSarlAgent"); //$NON-NLS-1$ layout.addNewWizardShortcut("io.sarl.eclipse.wizard.newSarlBehavior"); //$NON-NLS-1$ layout.addNewWizardShortcut("io.sarl.eclipse.wizard.newSarlCapacity"); //$NON-NLS-1$ layout.addNewWizardShortcut("io.sarl.eclipse.wizard.newSarlEvent"); //$NON-NLS-1$ layout.addNewWizardShortcut("io.sarl.eclipse.wizard.newSarlSkill"); //$NON-NLS-1$ layout.addNewWizardShortcut("io.sarl.eclipse.wizard.newSarlClass"); //$NON-NLS-1$ layout.addNewWizardShortcut("io.sarl.eclipse.wizard.newSarlInterface"); //$NON-NLS-1$ layout.addNewWizardShortcut("io.sarl.eclipse.wizard.newSarlEnumeration"); //$NON-NLS-1$ layout.addNewWizardShortcut("io.sarl.eclipse.wizard.newSarlAnnotation"); //$NON-NLS-1$ layout.addNewWizardShortcut("org.eclipse.jdt.ui.wizards.NewEnumCreationWizard"); //$NON-NLS-1$ layout.addNewWizardShortcut("org.eclipse.jdt.ui.wizards.NewPackageCreationWizard"); //$NON-NLS-1$ layout.addNewWizardShortcut("org.eclipse.jdt.ui.wizards.NewSourceFolderCreationWizard"); //$NON-NLS-1$ layout.addNewWizardShortcut("org.eclipse.ui.wizards.new.folder"); //$NON-NLS-1$ layout.addNewWizardShortcut("org.eclipse.ui.wizards.new.file"); //$NON-NLS-1$ layout.addNewWizardShortcut("org.eclipse.ui.editors.wizards.UntitledTextFileWizard"); //$NON-NLS-1$ // 'Window' > 'Open Perspective' contributions //--- Add the SARL debug perspective layout.addPerspectiveShortcut(SARLEclipseConfig.ID_SARL_DEBUG_PERSPECTIVE); //--- Add the Java perspectives layout.addPerspectiveShortcut(JavaUI.ID_PERSPECTIVE); layout.addPerspectiveShortcut(JavaUI.ID_BROWSING_PERSPECTIVE); //--- Add the Debug perspectives layout.addPerspectiveShortcut(IDebugUIConstants.ID_DEBUG_PERSPECTIVE); }
Example #21
Source File: JavaBrowsingPerspectiveFactory.java From Eclipse-Postfix-Code-Completion with Eclipse Public License 1.0 | 4 votes |
public void createInitialLayout(IPageLayout layout) { if (stackBrowsingViewsVertically()) createVerticalLayout(layout); else createHorizontalLayout(layout); // action sets layout.addActionSet(IDebugUIConstants.LAUNCH_ACTION_SET); layout.addActionSet(JavaUI.ID_ACTION_SET); layout.addActionSet(JavaUI.ID_ELEMENT_CREATION_ACTION_SET); layout.addActionSet(IPageLayout.ID_NAVIGATE_ACTION_SET); // views - java layout.addShowViewShortcut(JavaUI.ID_TYPE_HIERARCHY); layout.addShowViewShortcut(JavaUI.ID_PACKAGES); layout.addShowViewShortcut(JavaUI.ID_PROJECTS_VIEW); layout.addShowViewShortcut(JavaUI.ID_PACKAGES_VIEW); layout.addShowViewShortcut(JavaUI.ID_TYPES_VIEW); layout.addShowViewShortcut(JavaUI.ID_MEMBERS_VIEW); layout.addShowViewShortcut(JavaUI.ID_SOURCE_VIEW); layout.addShowViewShortcut(JavaUI.ID_JAVADOC_VIEW); layout.addShowViewShortcut(TemplatesView.ID); // views - search layout.addShowViewShortcut(NewSearchUI.SEARCH_VIEW_ID); // views - debugging layout.addShowViewShortcut(IConsoleConstants.ID_CONSOLE_VIEW); // views - standard workbench layout.addShowViewShortcut(IPageLayout.ID_OUTLINE); layout.addShowViewShortcut(IPageLayout.ID_PROBLEM_VIEW); layout.addShowViewShortcut(JavaPlugin.ID_RES_NAV); layout.addShowViewShortcut(IPageLayout.ID_TASK_LIST); layout.addShowViewShortcut(IProgressConstants.PROGRESS_VIEW_ID); layout.addShowViewShortcut(IPageLayout.ID_PROJECT_EXPLORER); layout.addShowViewShortcut("org.eclipse.pde.runtime.LogView"); //$NON-NLS-1$ // new actions - Java project creation wizard layout.addNewWizardShortcut("org.eclipse.jdt.ui.wizards.JavaProjectWizard"); //$NON-NLS-1$ layout.addNewWizardShortcut("org.eclipse.jdt.ui.wizards.NewPackageCreationWizard"); //$NON-NLS-1$ layout.addNewWizardShortcut("org.eclipse.jdt.ui.wizards.NewClassCreationWizard"); //$NON-NLS-1$ layout.addNewWizardShortcut("org.eclipse.jdt.ui.wizards.NewInterfaceCreationWizard"); //$NON-NLS-1$ layout.addNewWizardShortcut("org.eclipse.jdt.ui.wizards.NewEnumCreationWizard"); //$NON-NLS-1$ layout.addNewWizardShortcut("org.eclipse.jdt.ui.wizards.NewAnnotationCreationWizard"); //$NON-NLS-1$ layout.addNewWizardShortcut("org.eclipse.jdt.ui.wizards.NewSourceFolderCreationWizard"); //$NON-NLS-1$ layout.addNewWizardShortcut("org.eclipse.jdt.ui.wizards.NewSnippetFileCreationWizard"); //$NON-NLS-1$ layout.addNewWizardShortcut("org.eclipse.jdt.ui.wizards.NewJavaWorkingSetWizard"); //$NON-NLS-1$ layout.addNewWizardShortcut("org.eclipse.ui.wizards.new.folder");//$NON-NLS-1$ layout.addNewWizardShortcut("org.eclipse.ui.wizards.new.file");//$NON-NLS-1$ layout.addNewWizardShortcut("org.eclipse.ui.editors.wizards.UntitledTextFileWizard");//$NON-NLS-1$ // 'Window' > 'Open Perspective' contributions layout.addPerspectiveShortcut(JavaUI.ID_PERSPECTIVE); layout.addPerspectiveShortcut(IDebugUIConstants.ID_DEBUG_PERSPECTIVE); }
Example #22
Source File: JavaPerspectiveFactory.java From Eclipse-Postfix-Code-Completion with Eclipse Public License 1.0 | 4 votes |
public void createInitialLayout(IPageLayout layout) { String editorArea = layout.getEditorArea(); IFolderLayout folder= layout.createFolder("left", IPageLayout.LEFT, (float)0.25, editorArea); //$NON-NLS-1$ folder.addView(JavaUI.ID_PACKAGES); folder.addPlaceholder(JavaUI.ID_TYPE_HIERARCHY); folder.addPlaceholder(JavaPlugin.ID_RES_NAV); folder.addPlaceholder(IPageLayout.ID_PROJECT_EXPLORER); IFolderLayout outputfolder= layout.createFolder("bottom", IPageLayout.BOTTOM, (float)0.75, editorArea); //$NON-NLS-1$ outputfolder.addView(IPageLayout.ID_PROBLEM_VIEW); outputfolder.addView(JavaUI.ID_JAVADOC_VIEW); outputfolder.addView(JavaUI.ID_SOURCE_VIEW); outputfolder.addPlaceholder(NewSearchUI.SEARCH_VIEW_ID); outputfolder.addPlaceholder(IConsoleConstants.ID_CONSOLE_VIEW); outputfolder.addPlaceholder(IPageLayout.ID_BOOKMARKS); outputfolder.addPlaceholder(IProgressConstants.PROGRESS_VIEW_ID); IFolderLayout outlineFolder = layout.createFolder("right", IPageLayout.RIGHT, (float)0.75, editorArea); //$NON-NLS-1$ outlineFolder.addView(IPageLayout.ID_OUTLINE); outlineFolder.addPlaceholder(TemplatesView.ID); layout.addActionSet(IDebugUIConstants.LAUNCH_ACTION_SET); layout.addActionSet(JavaUI.ID_ACTION_SET); layout.addActionSet(JavaUI.ID_ELEMENT_CREATION_ACTION_SET); layout.addActionSet(IPageLayout.ID_NAVIGATE_ACTION_SET); // views - java layout.addShowViewShortcut(JavaUI.ID_PACKAGES); layout.addShowViewShortcut(JavaUI.ID_TYPE_HIERARCHY); layout.addShowViewShortcut(JavaUI.ID_SOURCE_VIEW); layout.addShowViewShortcut(JavaUI.ID_JAVADOC_VIEW); // views - search layout.addShowViewShortcut(NewSearchUI.SEARCH_VIEW_ID); // views - debugging layout.addShowViewShortcut(IConsoleConstants.ID_CONSOLE_VIEW); // views - standard workbench layout.addShowViewShortcut(IPageLayout.ID_OUTLINE); layout.addShowViewShortcut(IPageLayout.ID_PROBLEM_VIEW); layout.addShowViewShortcut(JavaPlugin.ID_RES_NAV); layout.addShowViewShortcut(IPageLayout.ID_TASK_LIST); layout.addShowViewShortcut(IProgressConstants.PROGRESS_VIEW_ID); layout.addShowViewShortcut(IPageLayout.ID_PROJECT_EXPLORER); layout.addShowViewShortcut(TemplatesView.ID); layout.addShowViewShortcut("org.eclipse.pde.runtime.LogView"); //$NON-NLS-1$ // new actions - Java project creation wizard layout.addNewWizardShortcut("org.eclipse.jdt.ui.wizards.JavaProjectWizard"); //$NON-NLS-1$ layout.addNewWizardShortcut("org.eclipse.jdt.ui.wizards.NewPackageCreationWizard"); //$NON-NLS-1$ layout.addNewWizardShortcut("org.eclipse.jdt.ui.wizards.NewClassCreationWizard"); //$NON-NLS-1$ layout.addNewWizardShortcut("org.eclipse.jdt.ui.wizards.NewInterfaceCreationWizard"); //$NON-NLS-1$ layout.addNewWizardShortcut("org.eclipse.jdt.ui.wizards.NewEnumCreationWizard"); //$NON-NLS-1$ layout.addNewWizardShortcut("org.eclipse.jdt.ui.wizards.NewAnnotationCreationWizard"); //$NON-NLS-1$ layout.addNewWizardShortcut("org.eclipse.jdt.ui.wizards.NewSourceFolderCreationWizard"); //$NON-NLS-1$ layout.addNewWizardShortcut("org.eclipse.jdt.ui.wizards.NewSnippetFileCreationWizard"); //$NON-NLS-1$ layout.addNewWizardShortcut("org.eclipse.jdt.ui.wizards.NewJavaWorkingSetWizard"); //$NON-NLS-1$ layout.addNewWizardShortcut("org.eclipse.ui.wizards.new.folder");//$NON-NLS-1$ layout.addNewWizardShortcut("org.eclipse.ui.wizards.new.file");//$NON-NLS-1$ layout.addNewWizardShortcut("org.eclipse.ui.editors.wizards.UntitledTextFileWizard");//$NON-NLS-1$ // 'Window' > 'Open Perspective' contributions layout.addPerspectiveShortcut(JavaUI.ID_BROWSING_PERSPECTIVE); layout.addPerspectiveShortcut(IDebugUIConstants.ID_DEBUG_PERSPECTIVE); }
Example #23
Source File: CloudSdkModifyJobTest.java From google-cloud-eclipse with Apache License 2.0 | 4 votes |
@Test public void testShowConsoleActionPropertyIfConsoleCreated() { Job job = new FakeModifyJob(null /* no console stream given */); Object actionProperty = job.getProperty(IProgressConstants.ACTION_PROPERTY); assertTrue(actionProperty instanceof ShowConsoleViewAction); }
Example #24
Source File: CloudSdkModifyJobTest.java From google-cloud-eclipse with Apache License 2.0 | 4 votes |
@Test public void testNoActionPropertyIfConsoleGiven() { Job job = new FakeModifyJob(mock(MessageConsoleStream.class)); Object actionProperty = job.getProperty(IProgressConstants.ACTION_PROPERTY); assertNull(actionProperty); }