Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » [SOLVED] XtextBuilder issue with a created project from existing model
[SOLVED] XtextBuilder issue with a created project from existing model [message #1737723] Tue, 12 July 2016 09:02 Go to next message
Belqassim Djafer is currently offline Belqassim DjaferFriend
Messages: 10
Registered: August 2014
Junior Member
Hello everyone,

I have created a new Xtext project from an existing model with the extension "cf_app".

I have created also a generator for this model by using xtend, but this generator is never started when I edit a cf_app model in runtime.

When debugging I see that org.eclipse.xtext.resource.IResourceServiceProvider.Registry.getExtensionToFactoryMap() doesn't contain the extension of my model "cf_app".

My language configuration :

language = StandardLanguage {
			name = "..."
			fileExtensions = "cf_app"
			referencedResource = "platform:/resource/...model/cofluent.genmodel"
			fragment = ecore2xtext.Ecore2XtextValueConverterServiceFragment2 auto-inject {}

			fragment = org.eclipse.xtext.generator.adapter.FragmentAdapter {
				fragment = org.eclipse.xtext.generator.ecore2xtext.FormatterFragment {}
			}

			serializer = {
				generateStub = false
			}
			
			// generator API
			fragment = generator.GeneratorFragment2 {
				generateJavaMain = true
			}
		}


FYI: I have no compilation errors.

[Updated on: Fri, 29 July 2016 08:43]

Report message to a moderator

Re: XtextBuilder issue with a created project from existing model [message #1737778 is a reply to message #1737723] Tue, 12 July 2016 19:54 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14664
Registered: July 2009
Senior Member
This is generally hard to answer?

Did you check for warnings is development eclipse ( specially on build.properties and plugin.xml)
Did you check host Osgi console if the yourdsl.ui plugin is properly activated.
Did you change the file extension in the workflow?
Does the log contain anything?


Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: XtextBuilder issue with a created project from existing model [message #1737839 is a reply to message #1737778] Wed, 13 July 2016 12:37 Go to previous messageGo to next message
Belqassim Djafer is currently offline Belqassim DjaferFriend
Messages: 10
Registered: August 2014
Junior Member
Hi Christian,

mydsl.ui plugin is loaded and I haven't errors (or warning in manifests, plugin.xml or properties files). The erro log contains nothing also.

After debugging, I see the "cf_app" extension in the Registry when the resource is open for the first time (runtime startup). But after editing the resource, the extension "cf_app" doesn't appear in the registry.

Thanks
Re: XtextBuilder issue with a created project from existing model [message #1737840 is a reply to message #1737839] Wed, 13 July 2016 12:42 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14664
Registered: July 2009
Senior Member
do you have any customizations? e.g. what did you implement in your generator?
can you share a complete small example?


Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: XtextBuilder issue with a created project from existing model [message #1738038 is a reply to message #1737840] Fri, 15 July 2016 09:50 Go to previous messageGo to next message
Belqassim Djafer is currently offline Belqassim DjaferFriend
Messages: 10
Registered: August 2014
Junior Member
In my configuration I had the error "Problem during instantiation of org.eclipse.xtend.lib.annotations.FinalFieldsConstructorProcessor" in MydslUiModule classe when using @FinalFieldsConstructor annotation, this is why I created manually my constroctor.
Re: XtextBuilder issue with a created project from existing model [message #1738528 is a reply to message #1738038] Wed, 20 July 2016 14:40 Go to previous message
Belqassim Djafer is currently offline Belqassim DjaferFriend
Messages: 10
Registered: August 2014
Junior Member
The problem was in my launch config, I set the Program to run variable to "org.eclipse.sdk.ide" instead another product and it works fine.

Thank you.
Previous Topic:referencing existing ecore-model from xtext
Next Topic:Serialize cross-reference in stand-alone mode
Goto Forum:
  


Current Time: Mon Apr 15 23:23:27 GMT 2024

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

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

Back to the top