Skip to main content



      Home
Home » Modeling » TMF (Xtext) » Language A accessing B language during code generation
Language A accessing B language during code generation [message #1787591] Tue, 29 May 2018 14:30 Go to next message
Eclipse UserFriend
Hi guys,
I have two Eclipse xtext languages, project A and project B, each one with a grammar.
Language B is a code generation complement for language A.
Language A starts the code generation and it must call some methods in language B to help the work (I do Eclipse Extension Points to solve this). After, language B starts its code generation, based on elements defined in language A.

All works fine when the two plug-ins are executed in Eclipse IDE.

But it fails when running in continuous integration with Maven because Maven cannot access the extension points and so some files aren't generated as in Eclipse IDE.

Some hint about the right way for how language A can access language B during the code generation?

Some hint about how language A can access language B during the code generation without Eclipse extension points? Or there is another way to achieve this?

Thanks,
Márcio Koch.
Re: Language A accessing B language during code generation [message #1787592 is a reply to message #1787591] Tue, 29 May 2018 14:47 Go to previous messageGo to next message
Eclipse UserFriend
can you be more explicit what you mean by "access"
Re: Language A accessing B language during code generation [message #1787596 is a reply to message #1787592] Tue, 29 May 2018 15:13 Go to previous messageGo to next message
Eclipse UserFriend
Thanks for the quick reply.
The language A declares an interface (and an Eclipse extension point) that language B implements.

Language B knows A language by a referencedResource, but language A does not know B language.
Re: Language A accessing B language during code generation [message #1787597 is a reply to message #1787596] Tue, 29 May 2018 15:24 Go to previous message
Eclipse UserFriend
if you use guice to hook up/register the services you could try something like

@Inject
		IGlobalServiceProvider gsp;
		
		public void doSomething() {
			gsp.findService(URI.createURI("dummy.b"), ServiceClazz.class)...
		}
Previous Topic:Multiple generators
Next Topic:Creation Review Bugzilla
Goto Forum:
  


Current Time: Wed Jun 18 02:42:16 EDT 2025

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

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

Back to the top