得到Appliaction workspace, Platform.asLocalURL(PRODUCT_BUNDLE.getEntry("")).getPath()).getAbsolutePath();
得到runtimeworkspace, Platform.getInstanceLocation().getURL().getPath();
通过EditorInput来得到工程的绝对路径:
((IFileEditorInput)input).getFile().getLocation().makeAbsolute().toFile().getAbsoluteFile().getParentFile();
通过父EditPart得到编辑器的方法(GEF):
IEditorPart editor = ((DefaultEditDomain)(parent.getViewer().getEditDomain())).getEditorPart();
在rcp中获取文件
最新推荐文章于 2018-02-02 11:06:00 发布