精彩的人生

好好工作,好好生活

BlogJava 首页 新随笔 联系 聚合 管理
  147 Posts :: 0 Stories :: 250 Comments :: 0 Trackbacks

在rcp中获取文件:

    得到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();

posted on 2005-12-13 11:51 hopeshared 阅读(1050) 评论(0)  编辑  收藏 所属分类: Eclipse

只有注册用户登录后才能发表评论。


网站导航: