Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » JvmTypesAwareResourceSetInitializer - how to do?
JvmTypesAwareResourceSetInitializer - how to do? [message #1453157] Sun, 26 October 2014 13:49 Go to next message
Florian Pirchner is currently offline Florian PirchnerFriend
Messages: 94
Registered: July 2009
Member

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 #1453206 is a reply to message #1453157] Sun, 26 October 2014 15:42 Go to previous messageGo to next message
Sebastian Zarnekow is currently offline Sebastian ZarnekowFriend
Messages: 3118
Registered: July 2009
Senior Member
Hi Flo,

why do you want to replace the JavaProjectResourceSetInitializer?
What problem do you want to solve in the first place?

Best,
Sebastian
--
Looking for professional support for Xtext, Xtend or Eclipse Modeling?
Go visit: http://xtext.itemis.com
Re: JvmTypesAwareResourceSetInitializer - how to do? [message #1454418 is a reply to message #1453206] Tue, 28 October 2014 11:14 Go to previous message
Florian Pirchner is currently offline Florian PirchnerFriend
Messages: 94
Registered: July 2009
Member

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 Smile

Yesterday i could properly add the "java"-protocol resourceFactory to XtextResourceInitializer. I used a SharedStateContribution.

Thanks, Flo
Previous Topic:Export Eclipse Plugins
Next Topic:Custom xtext formatter
Goto Forum:
  


Current Time: Fri Apr 26 21:12:53 GMT 2024

Powered by FUDForum. Page generated in 0.03538 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top