I am currently trying to compile programmatically generated Xtend classes. This is all part of an Eclipse plugin. This is what I do:
- Adding the Xtend dependencies programmatically to the target project (works).
- Creating programmatically some Xtend classes in the project with
IProject.getFolder()
,IFolder.getFile()
andIFile.create()
(JDT API). - Resfreshing the whole project with
IProject.refreshLocal(IResource.DEPTH_INFINITE, new NullProgressMonitor());
- Compiling the project with
IProject.build(IncrementalProjectBuilder.FULL_BUILD, new NullProgressMonitor());
Now, as a result, I can see the generated classes in the Eclipse IDE. The problem is, there are no generated Java classes for the Xtend classes in the xtend-gen folder.
When I now open one of the generated Xtend classes manually in the Eclipse IDE, it will trigger the compilation. Now I can see the generated Java classes for the Xtend classes.
But I need to do that programmatically. Without opening one Xtend class manually. How can I do that? What is the problem here? Why am I not triggering the Xtend compilation?