Get a file location in Eclipse Plugin [message #559813] |
Sun, 19 September 2010 06:40 |
No real name Messages: 1 Registered: September 2010 |
Junior Member |
|
|
I am trying to build a graphical interface to generate java code using GEF flow example as the base. To append/edit the java file I want to read a file within the project and do something on it.
For example the file is located under : Project testplugin
and path : com/flow/FlowMain.java
I want to programmatically read this file and add some code in it. What I trying is :
String base = Platform.getBundle(config.getPluginId()).getEntry("/").toString();
String relativeUri = "com/flow/FlowMain.java"; File f = new File(base+relativeUri);
This obviously fails because the value of "base+relativeUri" returns : entry://1079.fwk5184781/com/flow/FlowMain.java
So how do I go about getting the complete file path from within the plugin ?
|
|
|
Powered by
FUDForum. Page generated in 0.02796 seconds