Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » How to programmatically force indexing of new EO/Res? (Creating EObjectDescription)
How to programmatically force indexing of new EO/Res? (Creating EObjectDescription) [message #1289834] Wed, 09 April 2014 17:36
Michael Vorburger is currently offline Michael VorburgerFriend
Messages: 100
Registered: July 2009
Senior Member
Aloha Xtextians,

consider (JUST AN EXAMPLE), what does one have to do to avoid that causing the exception copy/pasted below?

I do understand what it's telling me - there is no EObjectDescription, which is normal because the Xtext Builder has not yet had a chance to run to index the Greeting b which was JUST created. We still need it to work Wink though - so how does one programmatically request, say on the line 27 in the middle there, to "hey buddy, now plz dig that Greeting b (more likely its containing Resource) so that I can ref. it" ?

Thank you!!

0 [Worker-1] ERROR org.eclipse.xtext.builder.BuilderParticipant - Error during compilation of 'platform:/resource/Models/some.mydsl'.
java.lang.RuntimeException: No EObjectDescription could be found in Scope Greeting.anotherGreeting for Greeting'b'
Semantic Object: Greeting'a'
at org.eclipse.xtext.serializer.diagnostic.ISerializationDiagnostic$ExceptionThrowingAcceptor.accept(
at org.eclipse.xtext.serializer.tokens.CrossReferenceSerializer.getCrossReferenceNameFromScope(
at org.eclipse.xtext.serializer.tokens.CrossReferenceSerializer.serializeCrossRef(
at org.eclipse.xtext.serializer.acceptor.SequenceFeeder.getToken(
at org.eclipse.xtext.serializer.acceptor.SequenceFeeder.accept(
at org.eclipse.xtext.serializer.sequencer.BacktrackingSemanticSequencer.accept(
at org.eclipse.xtext.serializer.sequencer.BacktrackingSemanticSequencer.createSequence(
at org.xtext.example.mydsl.serializer.MyDslSemanticSequencer.sequence_Greeting(
at org.xtext.example.mydsl.serializer.MyDslSemanticSequencer.createSequence(
at org.eclipse.xtext.serializer.impl.Serializer.serialize(
at org.eclipse.xtext.serializer.impl.Serializer.serialize(
at org.eclipse.xtext.serializer.impl.Serializer.serialize(
at org.eclipse.xtext.resource.XtextResource.doSave(
at org.xtext.example.mydsl.generator.MyDslGenerator.serialize(
at org.xtext.example.mydsl.generator.MyDslGenerator.doGenerate(
at org.eclipse.xtext.builder.BuilderParticipant.handleChangedContents(
Previous Topic:Supporting a complex languge
Next Topic:Couldn't resolve reference to .....
Goto Forum:

Current Time: Sun Oct 23 01:26:45 GMT 2016

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

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