我需要在IJavaElement
变量中存储一个方法。我有实现方法的文件路径和方法的标题。
这就是我所拥有的:
IFileStore fileStore = EFS.getLocalFileSystem().getStore(fileToOpen.toURI());
IWorkbenchPage page = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();
IEditorPart editor =IDE.openEditorOnFileStore(page, fileStore);
ICompilationUnit root = (ICompilationUnit) EditorUtility.getEditorInputJavaElement(editor, false);
问候。