Eclipse 获得插件工作区文件夹路径

String projectRoot = Platform.getInstanceLocation().getURL().getPath();

 

IFile file = (IFile) PlatformUI.getWorkbench()
                    .getActiveWorkbenchWindow().getActivePage()
                    .getActiveEditor().getEditorInput().getAdapter(IFile.class);
IProject project = file.getProject();

 

 ...

posted @ 2010-04-22 14:49  huazhi  阅读(86)  评论(0)    收藏  举报