Sim*_*Kim 3 eclipse-3.4 eclipse-rcp
我想创建IFile接口来打开位于项目或工作区外的文件.
如何获得IFile接口?
问候,西蒙
http://wiki.eclipse.org/FAQ_How_do_I_open_an_editor_on_a_file_outside_the_workspace%3F
您可以创建链接资源:
IPath location = new Path(name);
IFile file = project.getFile(location.lastSegment());
file.createLink(location, IResource.NONE, null);
Run Code Online (Sandbox Code Playgroud)
或者,如果您可以使用EFS接口(从Eclipse 3.3开始),您可以使用它而不是IFile.