@Override public ICompilationUnit getWorkingCopy(IEditorInput input) { return getWorkingCopy(input, true); }
private static ITypeRoot getEditorInputJavaElement(IEditorInput editorInput, boolean primaryOnly) { if (editorInput == null) return null; ICompilationUnit cu= JavaPlugin.getDefault().getWorkingCopyManager().getWorkingCopy(editorInput, primaryOnly); if (cu != null) return cu; IJavaElement je= editorInput.getAdapter(IJavaElement.class); if (je instanceof ITypeRoot) return (ITypeRoot)je; return null; }
private ISourceReference getSourceReference() { IEditorInput input= fEditor.getEditorInput(); if (input instanceof IClassFileEditorInput) { return ((IClassFileEditorInput)input).getClassFile(); } else { return JavaPlugin.getDefault().getWorkingCopyManager().getWorkingCopy(input); } }
private static IJavaElement getEditorInput(JavaEditor editor) { IEditorInput input= editor.getEditorInput(); if (input instanceof IClassFileEditorInput) return ((IClassFileEditorInput)input).getClassFile(); return JavaPlugin.getDefault().getWorkingCopyManager().getWorkingCopy(input); }
private IJavaProject getProject() { IEditorInput editorInput= fSharedState.fEditor.getEditorInput(); ICompilationUnit unit= JavaPlugin.getDefault().getWorkingCopyManager().getWorkingCopy(editorInput); if (unit != null) return unit.getJavaProject(); return null; }
private IJavaProject getProject() { IEditorInput editorInput= fSharedState.fEditor.getEditorInput(); ICompilationUnit unit= JavaPlugin.getDefault().getWorkingCopyManager().getWorkingCopy(editorInput); if (unit != null) return unit.getJavaProject(); return null; }
private IJavaProject getProject() { IEditorInput editorInput= fSharedState.fEditor.getEditorInput(); ICompilationUnit unit= JavaPlugin.getDefault().getWorkingCopyManager().getWorkingCopy(editorInput); if (unit != null) return unit.getJavaProject(); return null; }
private ISourceReference getSourceReference() { IEditorInput input= fEditor.getEditorInput(); if (input instanceof IClassFileEditorInput) { return ((IClassFileEditorInput)input).getClassFile(); } else { return JavaPlugin.getDefault().getWorkingCopyManager().getWorkingCopy(input); } }
private static IJavaElement getEditorInput(JavaEditor editor) { IEditorInput input= editor.getEditorInput(); if (input instanceof IClassFileEditorInput) return ((IClassFileEditorInput)input).getClassFile(); return JavaPlugin.getDefault().getWorkingCopyManager().getWorkingCopy(input); }
private IJavaElement getEditorInput() { final IEditorInput input= fEditor.getEditorInput(); if (input instanceof IClassFileEditorInput) { IClassFileEditorInput extended= (IClassFileEditorInput) input; return extended.getClassFile(); } return JavaPlugin.getDefault().getWorkingCopyManager().getWorkingCopy(input); }
protected ICodeAssist getCodeAssist() { if (fEditor != null) { IEditorInput input= fEditor.getEditorInput(); if (input instanceof IClassFileEditorInput) { IClassFileEditorInput cfeInput= (IClassFileEditorInput) input; return cfeInput.getClassFile(); } WorkingCopyManager manager= JavaPlugin.getDefault().getWorkingCopyManager(); return manager.getWorkingCopy(input, false); } return null; }
private ISourceReference getSourceReference() { IEditorInput input= fEditor.getEditorInput(); if (input instanceof IClassFileEditorInput) { return ((IClassFileEditorInput)input).getClassFile(); } else { return JavaPlugin.getDefault().getWorkingCopyManager().getWorkingCopy(input); } }
protected ICodeAssist getCodeAssist() { if (fEditor != null) { IEditorInput input= fEditor.getEditorInput(); if (input instanceof IClassFileEditorInput) { IClassFileEditorInput cfeInput= (IClassFileEditorInput) input; return cfeInput.getClassFile(); } WorkingCopyManager manager= JavaPlugin.getDefault().getWorkingCopyManager(); return manager.getWorkingCopy(input, false); } return null; }
private static IJavaElement getEditorInput(JavaEditor editor) { IEditorInput input= editor.getEditorInput(); if (input instanceof IClassFileEditorInput) return ((IClassFileEditorInput)input).getClassFile(); return JavaPlugin.getDefault().getWorkingCopyManager().getWorkingCopy(input); }
private IJavaElement getInputJavaElement(ITextEditor editor) { IEditorInput editorInput= editor.getEditorInput(); if (editorInput instanceof IClassFileEditorInput) return ((IClassFileEditorInput)editorInput).getClassFile(); if (editor instanceof CompilationUnitEditor) return JavaPlugin.getDefault().getWorkingCopyManager().getWorkingCopy(editorInput); return null; }
protected ICodeAssist getCodeAssist() { if (fEditor != null) { IEditorInput input= fEditor.getEditorInput(); if (input instanceof IClassFileEditorInput) { IClassFileEditorInput cfeInput= (IClassFileEditorInput) input; return cfeInput.getClassFile(); } WorkingCopyManager manager= JavaPlugin.getDefault().getWorkingCopyManager(); return manager.getWorkingCopy(input, false); } return null; }
private IType[] getTypes() throws JavaModelException { IEditorInput input= fEditor.getEditorInput(); if (input instanceof IClassFileEditorInput) { return new IType[] { ((IClassFileEditorInput)input).getClassFile().getType() }; } else { return JavaPlugin.getDefault().getWorkingCopyManager().getWorkingCopy(input).getAllTypes(); } }
private IType[] getTypes() throws JavaModelException { IEditorInput input= fEditor.getEditorInput(); if (input instanceof IClassFileEditorInput) { IClassFile classFile= ((IClassFileEditorInput)input).getClassFile(); if (classFile instanceof IOrdinaryClassFile) return new IType[] { ((IOrdinaryClassFile) classFile).getType() }; return new IType[0]; } else { return JavaPlugin.getDefault().getWorkingCopyManager().getWorkingCopy(input).getAllTypes(); } }
private IType[] getTypes() throws JavaModelException { IEditorInput input= fEditor.getEditorInput(); if (input instanceof IClassFileEditorInput) { return new IType[] { ((IClassFileEditorInput)input).getClassFile().getType() }; } else { return JavaPlugin.getDefault().getWorkingCopyManager().getWorkingCopy(input).getAllTypes(); } }
private IJavaElement getEditorInputJavaElement() { if (getEditor() instanceof CompilationUnitEditor) return JavaPlugin.getDefault().getWorkingCopyManager().getWorkingCopy(getEditor().getEditorInput()); else if (getEditor() instanceof ClassFileEditor) { IEditorInput editorInput= getEditor().getEditorInput(); if (editorInput instanceof IClassFileEditorInput) return ((IClassFileEditorInput)editorInput).getClassFile(); } return null; }