Skip to main content



      Home
Home » Modeling » TMF (Xtext) » Decouple Xtext project from Eclipse Plugin (UI project)(Is it somehow possible to have two completely separate projects for the language and the Eclipse plugin with separate builds?)
Decouple Xtext project from Eclipse Plugin (UI project) [message #1815161] Thu, 26 September 2019 08:07 Go to next message
Eclipse UserFriend
Hi there

I am developing a DSL based on Xtext and I am wondering if it is somehow possible to decouple the language project from the Eclipse plugin.

The idea:

I have the DSL project (just the core Xtext project containing the grammar etc.) with the LSP (generic IDE; *.ide project) in one Git repository with its own Gradle build. I deploy it to a Maven repository as library to be used for standalone applications using the DSL and other IDE projects using the LSP. I further deploy this project to a P2 repository as an OSGi bundle.

I have a second, separate Git repository with the Eclipse plugin (the *.ui project) which gets the Xtext feature bundle from the P2 repository mentioned above. This project has of course to be build with Maven.

Anyone ever tried such a setup or knows that it can somehow work to decouple these two things (Xtext language vs. Eclipse plugin)?

I tried and I can deploy the Xtext project to my P2 and use it in the Eclipse plugin project as dependency, but finally you have the problem that some generated classes needed in the *.ui project (DslActivator, *DSLUiModule, etc.) are generated by the MWE2 workflow which is located in the Xtext project. I don't know if there is a way to generate just these UI-classes within the Eclipse plugin project. Thus, I see no way to decouple it like that... Am I right that there is no way or are there solutions for such a scenario?

Thanks in advance!
Re: Decouple Xtext project from Eclipse Plugin (UI project) [message #1815163 is a reply to message #1815161] Thu, 26 September 2019 08:09 Go to previous messageGo to next message
Eclipse UserFriend
i dont know anything or anybody who has done that.
of course you can checkout both git repos next to each other
and tell the workflow where to find the ui (and ui tests) project.

https://github.com/eclipse/xtext-extras/blob/8df8735b2e3f013c3ea55344b1081c406b094f9f/org.eclipse.xtext.purexbase/src/org/eclipse/xtext/purexbase/GeneratePureXbase.mwe2
Re: Decouple Xtext project from Eclipse Plugin (UI project) [message #1815165 is a reply to message #1815163] Thu, 26 September 2019 08:14 Go to previous messageGo to next message
Eclipse UserFriend
Many thanks for the quick reply, Christian!
Re: Decouple Xtext project from Eclipse Plugin (UI project) [message #1815172 is a reply to message #1815165] Thu, 26 September 2019 10:51 Go to previous message
Eclipse UserFriend
Hi

You may find the structure of the OCL and QVTd Xtext editors closer to your needs. However you cannot escape Xtext completely since you surely need all the ANTLR and related parsing support?

e.g. https://git.eclipse.org/c/ocl/org.eclipse.ocl.git/tree/plugins/org.eclipse.ocl.xtext.oclinecore

All the Xtext build infrastructure is moved to a separate org.eclipse.ocl.examples.build plugin.

You should ignore the additional complexity of distinct Concrete Syntax (Xtext-friendly) and Abstract Syntax (OMG-compliant) models since CS should suffice for you making CS2AS and AS2CS conversions redundant.

You should also ignore the complexity of multiple grammar layers that support extensibility.

Regards

Ed Willink
Previous Topic:Anyone interested in helping me for pay?
Next Topic:Serializing Model into Resource
Goto Forum:
  


Current Time: Thu Mar 27 03:52:19 EDT 2025

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

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

Back to the top