Eclipse插件开发中File和IFile的转换
2018-03-25 16:50
260 查看
(1) File转IFile第一种方法:IFile[] ifile = ResourcesPlugin.getWorkspace().getRoot().findFilesForLocationURI(file.toURI());第二种方法:String filepath =file.getPath();IProject proj =ResourcesPlugin.getWorkspace().getRoot().getProject(projName);String path =filepath.substring(proj.getLocation().toString().length() + 1);IFile file =proj.getFile(path); (2) IFile转FileFile file = ifile.getLocation().toFile;或者File = newFile(ifile.getLocation().toOSString);
相关文章推荐
- Eclipse插件开发----------File转换为IFile
- IFile 与 File 的转换(org.eclipse.core.resources.IFile)
- Eclipse在插件开发中对话框FileDialog、DirectoryDialog、ContainerSelectionDialog的整理
- Eclipse插件开发中对于外部Jar包和类文件引用的处理(彻底解决插件开发中的NoClassDefFoundError问题)
- 配置ext4.1的eclipse的开发环境,主要是spket插件的使用
- Eclipse工具插件开发之Table表格上控件刷新的问题
- eclipse插件开发流程
- rcp(插件开发)org.eclipse.ui.menus-可以添加在视图上
- 为Eclipse开发工具安装Svn插件
- Eclipse 插件开发 - 实现外部程序修改文件后刷新功能
- 基于Eclipse的web开发实践之安装spring插件
- Eclipse插件开发(一)swt/jface在线安装版本路径
- 开发工具:eclipse 插件集锦
- Eclipse插件开发HelloWorld篇
- 让开发自动化: 用 Eclipse 插件提高代码质量
- eclipse开发插件
- Eclipse 插件开发
- 【Eclipse提高开发速度-插件篇】安装多语言Propertys编辑工具
- Eclipse插件开发 获取Workspace下所有的项目