I am writing a small framework to handle asychron calls. To show how the framework works, I created a showcase. Inside the showcase I want to show the code (from the Java source files) and and what will happen when the code is executed. Something similar to the GWT Showcase.
To show the code, I use an IncrementalGenerator to read the java source files and generate the code for a widget to represent the code. To do that, I used the same code to read the Java filed as I did before in other projects.
It looks like that:
InputStream in = classLoader.getResourceAsStream(path);
if (in == null) {
logger.log(TreeLogger.ERROR, "Resource not found: " + path);
throw new UnableToCompleteException();
}
where path is the relative path of the file I want to read. In case of SuperDevMode the InputStream is always null. I also tried to work with the old Generator class but this did not work also. It looks like the files are not available inside the classpath when the generator is executed in case the code server is started.
I tried the same code with Dev-Mode-Plugin and it works fine!
so, how can I access the Java source files of a project inside an IncrementalGenerator using SuperDevMode?
I use GWT 2.6.1, IntelliJ v13.1 Ultimate.
Thanks in advance