`
favor
  • 浏览: 142138 次
  • 性别: Icon_minigender_1
  • 来自: 上海
社区版块
存档分类
最新评论

eclipse plugin path

阅读更多
从插件中获得绝对路径:
      
AaaaPlugin.getDefault().getStateLocation().makeAbsolute().toFile().getAbsolutePath());


通过文件得到Project:
IProject project = ((IFile)o).getProject();


通过文件得到全路径:
String path = ((IFile)o).getLocation().makeAbsolute().toFile().getAbsolutePath();


得到整个Workspace的根:
IWorkspaceRoot root = ResourcesPlugin.getWorkspace().getRoot();


从根来查找资源:
IResource resource = root.findMember(new Path(containerName));


从Bundle来查找资源:
Bundle bundle = Platform.getBundle(pluginId);
URL fullPathString = BundleUtility.find(bundle, filePath);


得到Appliaction workspace:
Platform.asLocalURL(PRODUCT_BUNDLE.getEntry("")).getPath()).getAbsolutePath();

得到runtimeworkspace:

Platform.getInstanceLocation().getURL().getPath();


从编辑器来获得编辑文件
IEditorPart editor = ((DefaultEditDomain)(parent.getViewer().getEditDomain())).getEditorPart();
IEditorInput input = editor.getEditorInput();
if(input instanceof IFileEditorInput){
  IFile file = ((IFileEditorInput)input).getFile();
}
分享到:
评论

相关推荐

    hadoop-eclipse-plugin-2.10.0.jar

    Eclipse集成Hadoop2.10.0的插件,使用`ant`对hadoop的jar包进行打包并...- `hadoop2x-eclipse-plugin-master/src/contrib/eclipse-plugin/build.xml` 开源源地址: https://github.com/winghc/hadoop2x-eclipse-plugin

    eclipse maven3 plugin.zip

    直接离线安装eclipse中的maven插件,在你的eclipse安装...在文件中添加:path=D:\eclipse\myplugins\maven,保存并关闭maven.txt,并将后缀改为maven.link,重启eclipse,打开windows-->Preferences,查看死否安装成功

    eclipse-maven3-plugin Maven插件离线安装包

    eclipse-maven3-plugin.7z 解压缩到 plugins 目录下 3. 在 links 目录下创建一个maven.link(名字可以随便取,但必须是.link结尾的文件)文件 打开并输入:path= D:/Development/eclipse-JavaEE/eclipse/plugins...

    hadoop-eclipse-plugin-1.1.2.jar

    首先将 ${HADOOP_HOME}\src\contrib 下面的 build-contrib.xml 复制到 ${HADOOP_HOME}\src\contrib\eclipse-plugin 下面 然后修改 build-contrib.xml文件 ${basedir}"/> ${root}/../../../"/> 改成 ...

    hadoop-eclipse-plugin-2.6.0.jar程序文件

    2.change the hadoop_home and path to point to hadoop 2.6.0 3.include one more jar file htrace-core-3.0.4.jar compared with previous versions. Tested with eclipse-jee-luna-R-win32-x86_64. Any problem,...

    m2maven is a plugin for maven

    To install m2eclipse, use the following Eclipse update site to install the core of the m2eclipse plugin. This Core update site contains a single component: "Maven Integration for Eclipse (Required)". ...

    joc eclipse plugin

    注2:如果在Eclipse中找不到Jocky插件,请删除 Eclipse安装目录/configuration/org.eclipse.update 文件夹 (Maybe an eclipse bug?)。 2.4 如何使用符号保留指令 除了在命令行用 -scramble 参数控制符号混淆...

    apache-maven-3.2.5+eclipse-maven3-plugin插件

    2、在maven.link文件中指向maven插件:path=..mypluginmaven3 3、从新启动eclipse,window-首选项,找到maven标签进行设置 4.apache-mave-3.25可以配合JDK1.6+Tomcat6.0使用.本人亲测,现在就用这,很好用。

    maven插件和eclipse集成

    path = C:\\Jared\\WeChat\\soft\\eclipse-jee-indigo-SR2-win32-x86_64\\eclipse\\mavenPlugin,这里填写自己eclipse安装目录地址,你把它换成你的,这个参数的意思就是告诉eclipse插件包的地址,启动的时候自动...

    eclipse插件mvaen2打包

    2012-5-7maven2插件打包,方便下想本地安装的同志。 1.下载解压 2.eclipse plugin install path = file://{解压位置}/maven2

    Eclipse(MyEclipse)离线插件安装工具

    Use:java -jar instPlug4MyEclipse.jar PluginPath eclipsePath 如:java -jar instPlug4MyEclipse.jar D:/ADT-18.0.0 D:/myeclipse10 重启myeclipse安装成功。 Eclipse(MyEclipse)离线插件安装工具 Version:0.1.1...

    maven2 的eclipse插件

    插件安装时,我们只需在eclipse根目录下新建一个【links】目录,然后在里面创建【.link】扩展名的文件,在里面写上类似于【path=F:\\IDE\\eclipsePlugin\\maven2】这样的配置信息,不就可以统一管理我们自己的插件了...

    eclipse常用插件汇总(最新)续

    但是,缺点就是新下载的插件PlugIn放在了原始的Eclipse的PlugIn目录下,一大堆,乱死你:( 利用EasyExplorer插件可以在Eclipse用Explorer打开资源文件所在的文件夹。其它配置是在这里Windows => Preferences => ...

    eclipse离线安装maven插件包工具下载

    在 links 目录下创建一个 maven.txt(名字可以随便取),打开并输入:path=D:\\IDE\\HELIOS\\eclipse\\myplugins\\maven(请参照上面对应你的 maven 插件) 4. 保存关闭 maven.txt,并将后缀改成 maven.link,重启...

    hadoop-eclipse-plugin-0.20.2-cdh3u4.jar

    在Windows下连接远程Hadoop集群时,注意本地要安装cygwin,并将cygwin/bin目录设置到PATH,以便程序能使用chmod命令。 另,Hadoop Eclipse插件只能连接相应版本的Hadoop集群,例如,本插件只能连接hadoop-0.20.2-cdh...

    hadoop1.1.2 eclipse 插件

    在用eclipse 搭建hadoop插件时,apache不会提供插件,插件必须自己编译并且声称jar包。...复制D:\hadoop-1.1.2\contrib\eclipse-plugin\hadoop-eclipse-plugin-1.1.2.jar 到 eclipse安装目录/plugins/ 下。

    flex eclipse插件和subclipse插件 冲突

    ,重启eclipse即可同时识别subclipse和flex eclipse plugin 插件。 总结: 当我对插件都采用links安装方式时,两种都正常工作,但当subclipse采取另外一种安装方式时,就会有冲突, 还有正常情况下删除D:\eclipse\...

    Mercurial的Eclipse插件

    插件安装时,我们只需在eclipse根目录下新建一个【links】目录,然后在里面创建【.link】扩展名的文件,在里面写上类似于【path=F:\\IDE\\eclipsePlugin\\MercurialEclipse\MercurialEclipse1.5】这样的配置信息,不...

    eclipse手动安装axis2插件

    eclipse手动安装axis2插件步骤: 1、解压缩附件放到eclipse的dropins目录下 2、dropins目录下新建xxx.link文件,编辑该文件写入所在路径,如path=C:\\sts-3.9.4.RELEASE\\dropins 3、重启eclipse

    eclipse maven插件

    在你的 eclipse 安装的根目录下创建两个文件夹:links,mavenPlugins(文件夹名称可自定义),把eclipse-maven3-plugin.7z解压后的features和plugins文件夹放到mavenPlugins文件夹下(必须如此,注意解压后文件夹的...

Global site tag (gtag.js) - Google Analytics