开发者

Including and referencing a XSL file in Eclipse plugin build

I am developing my first plugin for eclipse. I'd like to include somehow an XSLT file in the build so I can use it in plugin source code.

For example, my plugin adds a new option in right-click menu for XML files: "Do XSL Transformation". After clicking that option I want my plugin to perform a XSL transformation on selected file using o开发者_开发技巧ne specific file.

So the question is, how to include the XSL file in plugin build, and how to reference it in plugin code?


The post is a bit old, but since I struggled a bit on that one... Here are the steps I followed :

Add the xsl file (or whatever file) in your project.

In build.properties, include the xsl file.

In any class, access your file with the following code :

InpuStream xslIS = this.getClass().getRessourceAsStream("/myXSLFile");
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜