JvmTypesAwareResourceSetInitializer - how to do? [message #1453157] |
Sun, 26 October 2014 13:49 |
|
Hi,
i am using Xtext 2.6.2 and i'd like to use the JvmTypesAwareResourceSetInitializer instead of JavaProjectResourceSetInitializer.
Tried different ways but can not do so. The JavaProjectResourceSetInitializer is provided as a SharedStateContribution and adding a binding to my Ui-Module has no effect.
I also tried to create my own SharedStateContribution. But i'd like to replace the JavaProjectResourceSetInitializer by the JvmTypesAwareResourceSetInitializer.
For now, i did not find a way to do so.
Another way would be to provide my own XtextResourceSetProvider. But i am looking for a way to avoid doing so.
Thanks a lot for your hints.
Florian Pirchner
|
|
|
|
Re: JvmTypesAwareResourceSetInitializer - how to do? [message #1454418 is a reply to message #1453206] |
Tue, 28 October 2014 11:14 |
|
Hi Sebastian,
i could figure out, that JvmTypes are resolved by TypeReferences during installDerived-State.
The ResourceSet does not have a registered "java"-protocol resource factory. If i pass a "java:/..." resource URL to the resourceSet's #getEObject, a XMLResource is returned.
Right now i try to solve following issues:
- Properly integrate Xtext with Sirius-Diagram. We need to load some datatypes (our dsl) to the Sirius-XtextResourceSet eagerly.
- Following the cache idea from "Mark Christiaens" to cache resources. We have dsls that are referencing each other heavily. And loading takes a lot of time, since every loaded resource will cause model inferring, scoping,... transitively for all referenced resources. So i extended the cache idea and also added the derived state model and the jvmAssociations to cache. In that special case i need to resolve the "java"-protocoll during build by the XtextResourceSet. For now i do not have an answer whether my approach will work. But first results are really fine
Yesterday i could properly add the "java"-protocol resourceFactory to XtextResourceInitializer. I used a SharedStateContribution.
Thanks, Flo
|
|
|
Powered by
FUDForum. Page generated in 0.03538 seconds