|How to find files paths/names in project running with Xtend [message #714059]
||Tue, 09 August 2011 17:53
Registered: July 2011
I'm using Xtend to generate some code.
But my question does not exactly concerns code generation, but some other things within an Eclipse Application running with my DSL and code generator.
My generator needs some information contained in a kind of configuration file.
I manage to access and process this file by writing its path and name in a String variable within the generator's Main.java
This works for testing, but not more than that.
So, considering there's an Eclipse running with my generator, I would like to search within the current project directory, in order to find out the file paths and names contained in it.
Since this configuration file must be anyway imported (it is pre-processed by another plugin before I use it), being able to find it in my project would be a reasonable solution.
I tried doing something in this direction http://www.java-tips.org/java-se-tips/java.io/list-the-names-of-all-files-in-a-particular-dire.html
in the Main.java or in the .xtend, but it has returned the eclipse path, not the path of the current project.
I believe that the solution should not be a big issue, but neither am I an experienced programmer...
Many thanks in advance,
Powered by FUDForum
. Page generated in 0.02082 seconds