摘要:
弄了好几天,终于弄出来了。为了实现根据import递归扫描文本,必须获得绝对路径。IEditorPart editor = Activator.getDefault().getWorkbench().getActiveWorkbenchWindow().getActivePage().getActiveEditor();IEditorInput input = editor.getEditorInput(); if (input instanceof IFileEditorInput) { IFile file = ((IFileEditorInput)input).getFile(); S. 阅读全文