colorThemeManager.applyTheme(selectedThemeName); for (IEditorInput editorInput : editorsToReopen.keySet()) activePage.openEditor(editorInput, editorsToReopen.get(editorInput));
@Override public void postWindowOpen() { IWorkbenchPage page = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage(); try { page.openEditor(editorInput, editorId); } catch (PartInitException e) { // Handle the exception here } }
protected IEditorPart openEditor(ProcIdentifier proc, IWorkbenchPage page) throws PartInitException { return page.openEditor(new ProcEditorInput(proc), RoutineEditor.EDITOR_ID); }
protected IEditorPart openEditor(ProcIdentifier proc, IWorkbenchPage page) throws PartInitException { return page.openEditor(new ProcEditorInput(proc), RoutineEditor.EDITOR_ID); }
File file= new File( path ); IWorkbenchPage page = window.getActivePage(); IStorage storage = new FileStorage(file); IStorageEditorInput input = new XMLInput( storage ); try { page.openEditor(input, "Your ID"); } catch (PartInitException e) { MessageDialog.openError(window.getShell(), "", path); }
private static IEditorPart openInEditor(IEditorInput input, String editorID, boolean activate) throws PartInitException { Assert.isNotNull(input); Assert.isNotNull(editorID); IWorkbenchPage p= JavaPlugin.getActivePage(); if (p == null) throwPartInitException(JavaEditorMessages.EditorUtility_no_active_WorkbenchPage); IEditorPart editorPart= p.openEditor(input, editorID, activate); initializeHighlightRange(editorPart); return editorPart; }
private static IEditorPart openInEditor(IEditorInput input, String editorID, boolean activate) throws PartInitException { Assert.isNotNull(input); Assert.isNotNull(editorID); IWorkbenchPage p= JavaPlugin.getActivePage(); if (p == null) throwPartInitException(JavaEditorMessages.EditorUtility_no_active_WorkbenchPage); IEditorPart editorPart= p.openEditor(input, editorID, activate); initializeHighlightRange(editorPart); return editorPart; }
public static IEditorPart openEditor(IEditorInput input) { if (input != null) { try { return PDEPlugin.getActivePage().openEditor(input, IPDEUIConstants.MANIFEST_EDITOR_ID); } catch (PartInitException e) { PDEPlugin.logException(e); } } return null; }
private static IEditorPart openInEditor(IEditorInput input, String editorID, boolean activate) throws PartInitException { Assert.isNotNull(input); Assert.isNotNull(editorID); IWorkbenchPage p= JavaPlugin.getActivePage(); if (p == null) throwPartInitException(JavaEditorMessages.EditorUtility_no_active_WorkbenchPage); IEditorPart editorPart= p.openEditor(input, editorID, activate); initializeHighlightRange(editorPart); return editorPart; }
private static IEditorPart openInEditor(IEditorInput input, String editorID) throws PartInitException { if (input != null) { IWorkbenchPage p = J2EEUIPlugin.getActiveWorkbenchWindow().getActivePage(); if (p != null) return p.openEditor(input, editorID, true); } return null; } }
public static boolean openSchema(IFile file) { if (file != null && file.exists()) { IEditorInput input = new FileEditorInput(file); try { return PDEPlugin.getActivePage().openEditor(input, IPDEUIConstants.SCHEMA_EDITOR_ID) != null; } catch (PartInitException e) { } } return false; }
private void handleOpenStorage(IStorage obj) { IWorkbenchPage page = PDEPlugin.getActivePage(); IEditorInput input = new JarEntryEditorInput(obj); try { page.openEditor(input, DEFAULT_EDITOR_ID); } catch (PartInitException e) { PDEPlugin.logException(e); } }
private void openSchemaFile(final IFile file) { final IWorkbenchWindow ww = PDEPlugin.getActiveWorkbenchWindow(); Display d = ww.getShell().getDisplay(); d.asyncExec(() -> { try { String editorId = IPDEUIConstants.SCHEMA_EDITOR_ID; ww.getActivePage().openEditor(new FileEditorInput(file), editorId); } catch (PartInitException e) { PDEPlugin.logException(e); } }); }
private void openSchemaFile(final IFile file) { final IWorkbenchWindow ww = PDEPlugin.getActiveWorkbenchWindow(); Display d = ww.getShell().getDisplay(); d.asyncExec(() -> { try { String editorId = IPDEUIConstants.SCHEMA_EDITOR_ID; ww.getActivePage().openEditor(new FileEditorInput(file), editorId); } catch (PartInitException e) { PDEPlugin.logException(e); } }); }
@Override public void run() { IWorkbenchPage page1 = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage(); try { page1.openEditor(new FileEditorInput(file), "taeconfigurator.editors.MultiPageEditor"); } catch (PartInitException e) { } } });
public void open() { IWorkbenchPage page = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage(); try { page.openEditor(new FileEditorInput(file), "taeconfigurator.editors.MultiPageEditor"); } catch (PartInitException e) { e.printStackTrace(); } }
@Override public void run() { IWorkbenchPage page = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage(); try { page.openEditor(new FileEditorInput(ffile), "taeconfigurator.editors.MultiPageEditor"); //$NON-NLS-1$ } catch (PartInitException e) { throw new InternalErrorCDE("unexpected exception"); } } });
@Override public void run() { IWorkbenchPage page = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage(); try { page.openEditor(new FileEditorInput(ffile), "org.eclipse.ui.DefaultTextEditor"); //$NON-NLS-1$ } catch (PartInitException e) { throw new InternalErrorCDE("unexpected exception"); } } });
public static void handleOpen ( final IWorkbenchPage page, final String connectionId, final String factoryId, final String configurationId ) { try { page.openEditor ( new ConfigurationEditorInput ( connectionId, factoryId, configurationId ), MultiConfigurationEditor.EDITOR_ID, true ); } catch ( final PartInitException e ) { StatusManager.getManager ().handle ( e.getStatus () ); } } }
protected void openEditor(IFile file) throws PartInitException { IWorkbenchPage page = getWorkbench().getActiveWorkbenchWindow().getActivePage(); IEditorDescriptor defaultEditor = getWorkbench().getEditorRegistry().getDefaultEditor(file.getFullPath().toString()); page.openEditor (new FileEditorInput(file), defaultEditor == null ? "org.eclipse.emf.codegen.ecore.genmodel.presentation.GenModelEditorID" : defaultEditor.getId()); } }