org.eclipse.ui.intro.IIntroManager Java Examples
The following examples show how to use
org.eclipse.ui.intro.IIntroManager.
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: TestedN4JSWorkspace.java From n4js with Eclipse Public License 1.0 | 6 votes |
@Override protected void starting(Description d) { name = d.getMethodName(); assertEmptyIndex(); IProject[] projects = IResourcesSetupUtil.root().getProjects(); if (projects.length != 0) { Assert.assertEquals(1, projects.length); Assert.assertEquals("RemoteSystemsTempFiles", projects[0].getName()); } if (PlatformUI.isWorkbenchRunning()) { final IIntroManager introManager = PlatformUI.getWorkbench().getIntroManager(); if (introManager.getIntro() != null) { Display.getDefault().asyncExec(() -> introManager.closeIntro(introManager.getIntro())); } } }
Example #2
Source File: KickStartNewProjectAction.java From solidity-ide with Eclipse Public License 1.0 | 6 votes |
@Override public void run(IIntroSite site, Properties params) { WorkspaceModifyOperation op = new WorkspaceModifyOperation() { @Override protected void execute(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException { IProject project = createProject(monitor); createExample(project); } }; try { PlatformUI.getWorkbench().getProgressService().run(true, true, op); final IIntroManager introManager = PlatformUI.getWorkbench().getIntroManager(); IIntroPart part = introManager.getIntro(); introManager.closeIntro(part); IWorkbenchPage page = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage(); IDE.openEditor(page, ResourcesPlugin.getWorkspace().getRoot().getFile(new Path("hello-world/greeter.sol"))); } catch (Exception e) { e.printStackTrace(); } }
Example #3
Source File: PlatformUtil.java From bonita-studio with GNU General Public License v2.0 | 6 votes |
public static void showIntroPart(IWorkbenchPage page) { final IIntroManager introManager = PlatformUI.getWorkbench().getIntroManager(); //colse intro to reload content if already opened hideIntroPart(); final IntroModelRoot model = IntroPlugin.getDefault().getIntroModelRoot(); if (model != null && introManager.getIntro() != null && ((CustomizableIntroPart) introManager.getIntro()).getControl() != null) { model.getPresentation().navigateHome(); } BonitaPerspectivesUtils.switchToPerspective("org.bonitasoft.studio.perspective.welcomePage"); page.setEditorAreaVisible(false); introManager.showIntro( page.getWorkbenchWindow(), false); page.setPartState(page.findViewReference("org.bonitasoft.studio.application.project.explorer"), IWorkbenchPage.STATE_RESTORED); }
Example #4
Source File: GetStartedAction.java From codewind-eclipse with Eclipse Public License 2.0 | 5 votes |
@Override public void run() { // Close the Eclipse welcome page IIntroManager manager = PlatformUI.getWorkbench().getIntroManager(); IIntroPart introPart = manager.getIntro(); if (introPart != null) { manager.closeIntro(introPart); } // Open the J2EE perspective try { IWorkbench workbench = PlatformUI.getWorkbench(); workbench.showPerspective("org.eclipse.jst.j2ee.J2EEPerspective", workbench.getActiveWorkbenchWindow()); } catch (Exception e) { Logger.logError("An error occurred trying to open the J2EE perspective", e); } // Open the Codewind welcome page IEditorPart part = OpenWelcomePageAction.openWelcomePage(); // Open the Codewind Explorer view ViewHelper.openCodewindExplorerViewNoExec(); // Make the welcome page the focus if (part != null) { IWorkbenchWindow window = PlatformUI.getWorkbench().getActiveWorkbenchWindow(); if (window != null) { IWorkbenchPage page = window.getActivePage(); if (page != null) { page.activate(part); } } } }
Example #5
Source File: AbstractWorkbenchTest.java From xtext-eclipse with Eclipse Public License 2.0 | 5 votes |
protected static void closeWelcomePage() throws InterruptedException { IIntroManager introManager = getWorkbench().getIntroManager(); IIntroPart intro = introManager.getIntro(); if (intro != null) { introManager.closeIntro(intro); } }
Example #6
Source File: TestedWorkspace.java From xtext-eclipse with Eclipse Public License 2.0 | 5 votes |
@Override protected void starting(Description d) { name = d.getMethodName(); assertEmptyIndex(); Assert.assertEquals(0, IResourcesSetupUtil.root().getProjects().length); if (PlatformUI.isWorkbenchRunning()) { final IIntroManager introManager = PlatformUI.getWorkbench().getIntroManager(); if (introManager.getIntro() != null) { Display.getDefault().asyncExec(()->introManager.closeIntro(introManager.getIntro())); } } }
Example #7
Source File: SarlExampleInstallerWizard.java From sarl with Apache License 2.0 | 5 votes |
/** Close the welcome page. */ protected static void closeWelcomePage() { final IIntroManager introManager = PlatformUI.getWorkbench().getIntroManager(); if (introManager != null) { final IIntroPart intro = introManager.getIntro(); if (intro != null) { introManager.closeIntro(intro); } } }
Example #8
Source File: StartupSaros.java From saros with GNU General Public License v2.0 | 5 votes |
private static void openSarosView() { IIntroManager m = PlatformUI.getWorkbench().getIntroManager(); IIntroPart i = m.getIntro(); /* * if there is a welcome screen, do not open the SarosView * because it would be maximized and hiding the workbench window. */ if (i == null) ViewUtils.openSarosView(); }
Example #9
Source File: PlatformUtil.java From bonita-studio with GNU General Public License v2.0 | 5 votes |
public static boolean isIntroOpen() { final IWorkbenchWindow window = PlatformUI.getWorkbench().getActiveWorkbenchWindow(); if (window != null) { final IWorkbenchPage activePage = window.getActivePage(); if (activePage != null) { for (final IViewReference vr : activePage.getViewReferences()) { if (vr.getId().equals(INTROVIEW_ID)) { return true; } } final IWorkbenchPart part = activePage.getActivePart(); if (part != null) { final IIntroManager introManager = PlatformUI.getWorkbench().getIntroManager(); if (introManager != null) { if (introManager.getIntro() != null) { return true; } else { final IViewPart view = activePage.findView(INTROVIEW_ID); return view != null; } } } } } return false; }
Example #10
Source File: GhidraDevStartup.java From ghidra with Apache License 2.0 | 4 votes |
@Override public void earlyStartup() { Job job = new Job(Activator.PLUGIN_ID + " startup") { @Override protected IStatus run(IProgressMonitor monitor) { monitor.beginTask("Initializing " + Activator.PLUGIN_ID, 2); // If we were launched from Ghidra, close the Eclipse welcome screen if present, // and make it so it never shows up again. if (Activator.getDefault().isLaunchedByGhidra()) { IIntroManager introManager = PlatformUI.getWorkbench().getIntroManager(); IIntroPart intro = introManager.getIntro(); if (intro != null) { Display.getDefault().syncExec(() -> introManager.closeIntro(intro)); } PlatformUI.getPreferenceStore().setValue( IWorkbenchPreferenceConstants.SHOW_INTRO, false); } // Ask the user (only once) for consent before listening on any ports boolean firstTimeConsent = false; if (!GhidraRootPreferences.requestedConsentToOpenPorts()) { firstTimeConsent = EclipseMessageUtils.showQuestionDialog( Activator.PLUGIN_ID + "User Consent", Activator.PLUGIN_ID + " opens ports to enable communication with Ghidra " + "for various features such as initiating script editing and symbol " + "lookup from Ghidra.\n\nDo you consent to the ports being opened?\n\n" + "If you do not consent now, you can enable these features at any " + "time in the " + Activator.PLUGIN_ID + " preferences."); GhidraRootPreferences.setOpenPortConsentRequest(true); } // Initialize the script editor ScriptEditorInitializer.init(firstTimeConsent); monitor.worked(1); // Initialize symbol lookup SymbolLookupInitializer.init(firstTimeConsent); monitor.worked(1); monitor.done(); return Status.OK_STATUS; } }; job.schedule(); }