public static void saveState(IMemento memento, InternalClassFileEditorInput input) { IClassFile c= input.getClassFile(); memento.putString(KEY, c.getHandleIdentifier()); } }
@Override public IPath getPath() { if (fPath == null) fPath= writeToTempFile(fClassFile); return fPath; }
private static IEditorInput getEditorInput(IJavaElement element) { while (element != null) { if (element instanceof ICompilationUnit) { ICompilationUnit unit= ((ICompilationUnit) element).getPrimary(); IResource resource= unit.getResource(); if (resource instanceof IFile) return new FileEditorInput((IFile) resource); } if (element instanceof IClassFile) return new InternalClassFileEditorInput((IClassFile) element); element= element.getParent(); } return null; }
private static IEditorInput getEditorInput(IJavaElement element) { while (element != null) { if (element instanceof ICompilationUnit) { ICompilationUnit unit= ((ICompilationUnit) element).getPrimary(); IResource resource= unit.getResource(); if (resource instanceof IFile) return new FileEditorInput((IFile) resource); } if (element instanceof IClassFile) return new InternalClassFileEditorInput((IClassFile) element); element= element.getParent(); } return null; }
private static IEditorInput getEditorInput(IJavaElement element) throws JavaModelException { while (element != null) { if (element instanceof ICompilationUnit) { ICompilationUnit unit= ((ICompilationUnit) element).getPrimary(); IResource resource= unit.getResource(); if (resource instanceof IFile) return new FileEditorInput((IFile) resource); } if (element instanceof IClassFile) return new InternalClassFileEditorInput((IClassFile) element); element= element.getParent(); } return null; }
public static void saveState(IMemento memento, InternalClassFileEditorInput input) { IClassFile c= input.getClassFile(); memento.putString(KEY, c.getHandleIdentifier()); } }
@Override public IPath getPath() { if (fPath == null) fPath= writeToTempFile(fClassFile); return fPath; }
private IEditorPart showWithReuse(Object element, IWorkbenchPage wbPage) throws JavaModelException, PartInitException { IFile file= getFile(element); if (file != null) { String editorID= getEditorID(file); return showInEditor(wbPage, new FileEditorInput(file), editorID); } else { IClassFile cf= getClassFile(element); if (cf != null) return showInEditor(wbPage, new InternalClassFileEditorInput(cf), JavaUI.ID_CF_EDITOR); } return null; }
public static void saveState(IMemento memento, InternalClassFileEditorInput input) { IClassFile c= input.getClassFile(); memento.putString(KEY, c.getHandleIdentifier()); } }
protected IEditorInput getEditorInput(IJavaElement element) throws JavaModelException { while (element != null) { switch (element.getElementType()) { case IJavaElement.COMPILATION_UNIT : { ICompilationUnit cu = (ICompilationUnit) element; if (cu.isWorkingCopy()) cu = cu.getPrimary(); IResource resource = cu.getUnderlyingResource(); if (resource.getType() == IResource.FILE) return new FileEditorInput((IFile) resource); break; } case IJavaElement.CLASS_FILE : return new InternalClassFileEditorInput((IClassFile) element); } element = element.getParent(); } return null; }
if (jsc.isBinary()) { IClassFile file= jsc.getClassFile(); IEditorInput editorInput= new InternalClassFileEditorInput(file); document= getDocument(JavaPlugin.getDefault().getClassFileDocumentProvider(), editorInput); if (document.getLength() == 0)
if (jsc.isBinary()) { IClassFile file= jsc.getClassFile(); IEditorInput editorInput= new InternalClassFileEditorInput(file); document= getDocument(JavaPlugin.getDefault().getClassFileDocumentProvider(), editorInput); if (document.getLength() == 0)
if (jsc.isBinary()) { IClassFile file= jsc.getClassFile(); IEditorInput editorInput= new InternalClassFileEditorInput(file); document= getDocument(JavaPlugin.getDefault().getClassFileDocumentProvider(), editorInput); if (document.getLength() == 0)