@Override public void run() { try { IDE.openEditor(activePage, resource, true); } catch (PartInitException e) { JavaPlugin.log(e); } } });
@Override public void run() { try { IDE.openEditor(activePage, file, true); } catch (PartInitException e) { JavaPlugin.log(e); } } });
@Override public void run() { try { IDE.openEditor(activePage, resource, true); } catch (PartInitException e) { JavaPlugin.log(e); } } });
public void run() { try { IDE.openEditor(activePage, resource, true); } catch (PartInitException e) { JavaPlugin.log(e); } } });
public void run() { final IWorkbenchPage page = workbench.getActiveWorkbenchWindow().getActivePage(); try { IDE.openEditor(page, file, true); } catch (final PartInitException e) { logger.error(e.getMessage(), e); } } });
protected void jumpToMarker(IMarker marker) throws CoreException { // RISK Untested IWorkbenchPage page = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage(); IDE.openEditor(page, marker); }
public void run() { IWorkbenchPage page = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage(); try { IDE.openEditor(page, javaFile, true); } catch (PartInitException e) { } } });
public void run() { IWorkbenchPage page = PlatformUI.getWorkbench() .getActiveWorkbenchWindow().getActivePage(); try { IDE.openEditor(page, file, true); } catch (PartInitException e) { } } });
private static IEditorPart openInEditor(IFile file, boolean activate) throws PartInitException { if (file == null) throwPartInitException(TeamUIMessages.SynchronizeView_fileMustNotBeNull); IWorkbenchPage p = TeamUIPlugin.getActivePage(); if (p == null) throwPartInitException(TeamUIMessages.SynchronizeView_noActiveWorkbenchPage); IEditorPart editorPart = IDE.openEditor(p, file, activate); return editorPart; }
protected static IEditorPart openEditor(IFile file) { final IWorkbenchPage page = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage(); try { return IDE.openEditor(page, file); } catch (PartInitException e) { return null; } } }
public void run() { IWorkbenchPage page = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage(); try { IDE.openEditor(page, file, true); } catch(PartInitException e) { } } });
public void run() { IWorkbenchPage page = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage(); try { IDE.openEditor(page, file, editorId); } catch (PartInitException e) { } } });
public static void openImage(String value, String definingPluginId) { IResource resource = getImageResource(value, definingPluginId); try { if (resource != null && resource instanceof IFile) IDE.openEditor(PDEPlugin.getActivePage(), (IFile) resource, true); else MessageDialog.openWarning(PDEPlugin.getActiveWorkbenchShell(), PDEUIMessages.AboutSection_open, PDEUIMessages.AboutSection_warning); // } catch (PartInitException e) { } }
private static IEditorPart openInEditor(IFile file, boolean activate) throws PartInitException { if (file == null) throwPartInitException(JavaEditorMessages.EditorUtility_file_must_not_be_null); IWorkbenchPage p= JavaPlugin.getActivePage(); if (p == null) throwPartInitException(JavaEditorMessages.EditorUtility_no_active_WorkbenchPage); IEditorPart editorPart= IDE.openEditor(p, file, activate); initializeHighlightRange(editorPart); return editorPart; }
public static IEditorPart openEditor(IWorkbenchPage page, IFileRevision revision, IProgressMonitor monitor) throws CoreException { IStorage file = revision.getStorage(monitor); if (file instanceof IFile) { //if this is the current workspace file, open it return IDE.openEditor(page, (IFile)file, OpenStrategy.activateOnOpen()); } else { FileRevisionEditorInput fileRevEditorInput = FileRevisionEditorInput.createEditorInputFor(revision, monitor); IEditorPart part = openEditor(page, fileRevEditorInput); return part; } }
private static IEditorPart openInEditor(IFile file, boolean activate) throws PartInitException { if (file == null) throwPartInitException(JavaEditorMessages.EditorUtility_file_must_not_be_null); IWorkbenchPage p= JavaPlugin.getActivePage(); if (p == null) throwPartInitException(JavaEditorMessages.EditorUtility_no_active_WorkbenchPage); IEditorPart editorPart= IDE.openEditor(p, file, activate); initializeHighlightRange(editorPart); return editorPart; }
private static IEditorPart openInEditor(IFile file, boolean activate) throws PartInitException { if (file == null) throwPartInitException(JavaEditorMessages.EditorUtility_file_must_not_be_null); IWorkbenchPage p= JavaPlugin.getActivePage(); if (p == null) throwPartInitException(JavaEditorMessages.EditorUtility_no_active_WorkbenchPage); IEditorPart editorPart= IDE.openEditor(p, file, activate); initializeHighlightRange(editorPart); return editorPart; }
protected void showMatch(Match match, int offset, int length, boolean activate) throws PartInitException { IFile file= (IFile) match.getElement(); IWorkbenchPage wbPage= UIPlugin.getActivePage(); IEditorPart editor= IDE.openEditor(wbPage, (IFile) match.getElement(), activate); if (offset != 0 && length != 0) { if (editor instanceof ITextEditor) { ITextEditor textEditor= (ITextEditor) editor; textEditor.selectAndReveal(offset, length); } else if (editor != null) { showWithMarker(editor, file, offset, length); } } }
public void open() { IWorkbenchWindow window = PlatformUI.getWorkbench().getActiveWorkbenchWindow(); IWorkbenchPage activePage = window.getActivePage(); try { IDE.openEditor(activePage, file); } catch (PartInitException e) { WikiTextUiPlugin.getDefault().log(e); MessageDialog.openError(window.getShell(), Messages.MarkupHyperlinkDetector_unexpectedError, NLS.bind(Messages.MarkupHyperlinkDetector_openException, file.getName(), e.getMessage())); } } }
protected IEditorPart openDefaultEditor(IStorage storage, URI uri) throws PartInitException { XtextReadonlyEditorInput editorInput = new XtextReadonlyEditorInput(storage); IWorkbenchPage page = getWorkbench().getActiveWorkbenchWindow().getActivePage(); return IDE.openEditor(page, editorInput, PlatformUI.getWorkbench().getEditorRegistry().getDefaultEditor( uri.lastSegment()).getId()); }