`
alexgreenbar
  • 浏览: 85059 次
  • 性别: Icon_minigender_1
社区版块
存档分类
最新评论

load any resource from any installed plugin of Eclipse

阅读更多
one common solution for this like:

- this.getClass().getResources()

but this way force you have to put your resources into src directory of Eclipse, this won't work under situation: your plugin is a pure library plugin, i.e. it hasn't src directory at all and it's not a java project, which hasn't java nature in its .project file

A better solution I find is:
 Bundle myBundle = Platform.getBundle(MY_BUNDLE_ID);
 URL fileUrl = myBundle.getResource("/" + resourceName);


it support:
- your plugin can use any package style, say, as a jar, as a directory
- your resource can locate in src or just resource directory
分享到:
评论

相关推荐

    EhLib 9.1.024

    After installation, make sure the operability of all installed components. To do this, open the IDE, compile and launch a major demonstration project .\Demos\MainDemo\Project1_XE2.dpr Read next file ...

    eclipse Activiti 流程图创建缺少 emf jar

    Software being installed: Activiti Eclipse BPMN 2.0 Designer 5.18.0 (org.activiti.designer.feature.feature.group 5.18.0) Missing requirement: Activiti Eclipse BPMN 2.0 Designer 5.18.0 (org.activiti....

    Eclipse离线集成activiti所需jar('org.eclipse.emf 2.6.0' but it could not be found解决方案)

    requires 'org.eclipse.emf 2.6.0' but it could not be found),解决方法:将“离线解决方案”文件夹中的org.eclipse.emf 2.6.0的jar,拷贝到自己的eclipse的plugin文件夹下面,重启eclipse再次安装activiti插件就...

    Eclipse 安装flowable 插件出错,需要的jar包和 zip压缩包

    Software being installed: Flowable Eclipse BPMN 2.0 Designer 5.22.0 (org.flowable.designer.feature.feature.group 5.22.0) Missing requirement: Graphiti (Incubation) 0.13.1.v20160830-1309 (org....

    eclipse安装activiti报错(requires 'org.eclipse.emf 2.6.0' but it could not be found)

    Software being installed: Activiti Eclipse BPMN 2.0 Designer 5.18.0.201508100929 (org.activiti.designer.feature.feature.group 5.18.0.201508100929) Missing requirement: Activiti Eclipse BPMN 2.0 ...

    jenkins credentials-plugin1.11.hpi

    download from github,and have build it by: Run mvn clean package to create the plugin .hpi file. To install: 1. copy the resulting ./target/credentials.hpi file to the $JENKINS_HOME/plugins ...

    org.eclipse.jdt.core_3.6.1.v_A68_R36x_jar

    1.下载Eclipse plugin 补丁文件 org.eclipse.jdt.core_3.6.1.v_A68_R36x.jar: http://meiyoudao.download.csdn.net/ 2.将解压缩后的jar包 放到Eclipse的目录中的Plugin下面, 3.Android开发时代码提示卡死的问题...

    com.sysdeo.eclipse.tomcat_3.2.1

    To set a JDK as default JRE for Eclipse open the preference window : Window -> Preferences -> Java -> Installed JREs. This JRE must be a JDK (This is a Tomcat prerequisite). The plugin sets itself ...

    WordPress 3 Plugin Development Essentials.pdf

    Chapter 2: Anatomy of a Plugin 29 Deconstructing an existing plugin: "Hello Dolly" 29 Activating the plugin 29 Examining the hello.php file 30 Information header 30 Exercise—breaking the header ...

    Eclipse IDE PHP MacOS 64Bit

    Eclipse for PHP Developers该版本适合PHP开发者,集成了良好的PHP语言支持,Git客户端, Mylyn和JavaScript脚本编辑器, HTML, CSS和XML。

    eclipse安装activiti报错

    Software being installed: Activiti Eclipse BPMN 2.0 Designer 5.18.0.201508100929 (org.activiti.designer.feature.feature.group 5.18.0.201508100929) Missing requirement: Activiti Eclipse BPMN 2.0 ...

    The Launching Framework in Eclipse

    Eclipse is more of a tools platform than a tool itself, Eclipse's launching capabilities depend entirely on the current set of installed plug-ins. This article describes the framework available to ...

    Eclipse安装Activiti Designer插件

    一、环境 1、eclipse: Juno Service Release 2 2、Activiti Designer 5.14.1 二、Activiti Designer 5.14.1插件安装 ...把这四个文件拷贝到自己的eclipse的plugin文件夹下面,重启eclipse再次安装activiti插件就可以了

    Multiple SCMs Plugin 0.3 hpi

    Build Step: How to install Run mvn clean package to create the plugin .hpi file. To install: ... You have to restart Jenkins in order to find the pluing in the installed plugins list.

    eclipse安装Activiti-designer 所需jar包

    Software being installed: Activiti Eclipse BPMN 2.0 Designer 5.18.0.201508100929 (org.activiti.designer.feature.feature.group 5.18.0.201508100929) Missing requirement: Activiti Eclipse BPMN 2.0 ...

    使用Eclipse 进行Maven开发

    使用Eclipse 进行Maven开发,中文版

    eclipse-scala

    Scala is unusual because it is usually installed for each of your Scala projects rather than being installed system-wide. Both of the above options manage (via sbt) a specific Scala version per Scala...

    Eclipse安装Activiti Designer插件需要用到的环境

    Software being installed: Activiti Eclipse BPMN 2 0 Designer 5 12 0 org activiti designer feature feature group 5 8 0 Missing requirement: Activiti Eclipse BPMN 2 0 Designer 5 12 0 org activiti ...

    vbsedit Failed to load pdm.dll解决办法.

    vbsedit Failed to load pdm.dll解决办法. 带有详细的使用说明 安装 vbsedit 运行时 来提示vbsedit Failed to load pdm.dll 千辛万苦找到的 很好用的解决办法

    QuickLook3.7.0 + all plugs.rar

    Installed Msoffice QuickLook.Plugin.OfficeViewer.qlplugin用于在已安装Office的电脑上浏览Office; QuickLook.Plugin.OfficeViewer without msoffice.qlplugin用于在未安装Office的电脑上浏览Office; QuickLook....

Global site tag (gtag.js) - Google Analytics