I want to access all resources from my DSL files.
If I change a file, the resorces which are passed to the generator are only the recources of the actual file and the dependent file.
But I need all resources in my workspace.
How can I achieve this?
we want to generate one configuration-file.
This file includes several configuration-components.
Every component can be modelled with a DSL.
Use-Cases:
If I generate one component, the configuration-file includes only the data from the specific configuration-component.
Another usecase is to make a change on one component, but I want to generate the complete configuration-file including all unchanged components and the changed component.
The first usecase works out-of-the-box.
The second one is my problem.
but as i said before: the index gives you access to all resourcedescriptions.
and these to resources or objects of a certain type .
i dont know what you need in hands to generate your stuff.
I know about the link you mentioned. I tried this several weeks ago. I got a problem, that I wasn't able to export the Xtext Pugins (you sopported me: http://www.eclipse.org/forums/index.php/m/1081490/#msg_1081490). So overriding the BuilderParticipant doesn't work for me. Unfortunately I can't find the reason for my Problem.
If I try to access the Index, I get only the descriptions from the actual resource and all its depending resources. That's not what I want.
I want to access all resources in the complete workspace with a specific type, not only one resouce, from which the generator is called.
I realized, that after the start of the DSL-Editor for all dsl-actefacts the generator is called with the complete set of all resources in the workspace. But this action is only sometimes done (I think, if the Xtext-Builder realizes, that a complete refrsh and build is necessary). But I want to use a comparable funtionality.
Do you have another idea to achieve this?
if you inject IResourceDescriptions and ask if for org.eclipse.xtext.resource.IResourceDescriptions.getAllResourceDescriptions()
you should get all resources.
or you call getExportedObjectsByType(EClass) to get all IEObjectDescriptions of a certain type.