Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » GMF (Graphical Modeling Framework) » Get a file location in Eclipse Plugin
Get a file location in Eclipse Plugin [message #559813] Sun, 19 September 2010 06:40
No real name is currently offline No real nameFriend
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 ?
Previous Topic:One RectangleFigure grouping several Compartments
Next Topic:Newbie question
Goto Forum:
  


Current Time: Sat Sep 21 17:11:50 GMT 2024

Powered by FUDForum. Page generated in 0.02796 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top