Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » Citizen user learning share : Starting MyDSL project (Request for Comment on this project Folder structure & steps to start)
Citizen user learning share : Starting MyDSL project [message #1864586] Wed, 27 March 2024 10:57 Go to next message
Michel Kergoat is currently offline Michel KergoatFriend
Messages: 11
Registered: October 2023
Location: Paris, France
Junior Member
Hello all!
After tearing some hairs learning Xtest as a specific domain specialist, and averagely skilled in software development but not in Java / Eclipse Plugin, after learning Xtext documentation, 7 examples, and Lorenzo Bettini's book, I think I'm ready to start my DSL!

I request comments on the structure of my *personal* DSL project and the steps to achieve a First Sight MVP.

1. GLOBAL PROJECT FOLDER STRUCTURE
---- DEV HOME
-------- 'WORKSPACES'
------------ Runtime-DSL-WS-2.33
------------ Runtime-DSL-WS-2.34
------------ P2-DSL-Test-WS
------------ workspace-WS-EDSL-2023-12
------------ workspace-WS-EDSL-2024-03
-------- 'ZEXPORTS'
------------ P2 (ui-DSL Console Interpreter)
------------ SDK (to deploy toward LibreOffice Base)
------------ Standalone (CLI tests)
-------- 'ZSOFTWARES'
------------ Eclipse-EDSL-2023-12 (Xtext 2.33 & all existing learning projects)
------------ Eclipse-EDSL-2024-03 (Xtext 2.34 & MyDSL project)
2. CONFIGURE ECLIPSE FEATURE & EXPORTS
---- (Xtext Project Wizard 2nd page)
---- Layout "Parent"?
---- Eclipse Feature
---- Eclipse Update Site
---- Standalone
---- SDK?
3. GRAMMAR FIRST SIGHT w/ XBase
4. GENERATE ARTIFACTS
5. GENERATE EXPORTS FIRST SIGHT
---- P2
---- Standalone
---- SDK?

/?\ To later add Export SDK?
/?\ To later add Tortoise-like LIB Sub-project?

[Updated on: Wed, 27 March 2024 11:06]

Report message to a moderator

Re: Citizen user learning share : Starting MyDSL project [message #1864739 is a reply to message #1864586] Fri, 05 April 2024 12:50 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14738
Registered: July 2009
Senior Member
hi, this is terribly hard to answer as there are too many options.

possible things to consider: which way do you want to run your dsl (maven, gradle, standalone) and how should file be edited (eclipse) or also vscode/intellij etc via lsp


Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Day Job: https://www.everest-systems.com
Re: Citizen user learning share : Starting MyDSL project [message #1864757 is a reply to message #1864739] Sun, 07 April 2024 16:20 Go to previous messageGo to next message
Michel Kergoat is currently offline Michel KergoatFriend
Messages: 11
Registered: October 2023
Location: Paris, France
Junior Member
Thank You Christian!
I want to run my DSL in 3 ways, as suggested by the post:
1/Deploy the runtime to be used from LibreOffice Base as a Java Runtime, especially, an interpreter/compiler (SQL Query Generator from domain language DSL driving Domain Library objects like the Tortoise sample project)
2/ From a Console View or a Terminal View Interpreter into Eclipse
3/ From a StandAlone command line Interpreter in the operating system's terminal or command line, to ensure the headless build.

By now, the Workspaces setup is ok (this is a bit trivial, but I've learned that the Eclipse defaults polluted my %USERPROFILE% folder as well as the ".." Xtext/Eclipse RootPath when launching a new Eclipse Launch Configuration).

The local P2 repository Export worked well from Eclipse, as I saw the repository when I tried to "install New Software" with "Work with" pointing to the local P2 folder.

I'm now trying to complete the Maven-Tycho Build and so trying to code a UI Test, which is not that simple (error with AbstractContentAssistTest).

My question on SDK is if it is ok to start with the default Xtext-generated Build with Maven-Tycho and later "manually" add the SDK Module to the build process, aiming to deploy the SDK containing the DSL runtime JAR to LibreOffice Base.

Thank you in advance!
Re: Citizen user learning share : Starting MyDSL project [message #1864765 is a reply to message #1864757] Mon, 08 April 2024 14:00 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14738
Registered: July 2009
Senior Member
you can always do stuff later, but ticking the feature in the wizard would do no harm.

am not sure what you mean by SDK.

am also not sure why content assist test should not run. do you have an error message? / log


Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Day Job: https://www.everest-systems.com
Re: Citizen user learning share : Starting MyDSL project [message #1864767 is a reply to message #1864765] Mon, 08 April 2024 16:09 Go to previous messageGo to next message
Michel Kergoat is currently offline Michel KergoatFriend
Messages: 11
Registered: October 2023
Location: Paris, France
Junior Member
I had .p2-related errors in the .ui.tests subproject, maybe because JUnit 4 is used in the "WorkbenchTest" and my Xtext project is with JUnit 5, or maybe because there were build errors fortunately solved by LB Book p.141 for the ContentAssistTest where I had to add dependencies to MANIFEST.MF.

The assertText method did not work because of the multi-proposal content assist for my grammar, and I chose "assertCount" to complete the UI test successfully.
However, the Maven-Tycho build is now complete since the mandatory UI test is successful (the default ".ui.tests" subproject comes with no test, thus stopping the Maven build).

So, I can now focus on the Software Development Kit I will build to export to my LibreOffice Base project. SDK is a bundle that I saw in the Tortoise sample project and that I will configure in the Maven Build. I did not see any checkbox in the project Wizard to build this kind of package to take off the Runtime from Eclipse toward an external export folder.
Maybe there is another wizard?
This SDK could include a Tortoise-like LIB domain subproject with the DSL Runtime, that's why I call it "kit".

I want an Xtext DSL because it applies fundamental methodologies like TDD or DOD and despite the usual complaints about Java development, the framework is working, thank you, Christian, all the maintainers, and all the community!
Re: Citizen user learning share : Starting MyDSL project [message #1864771 is a reply to message #1864767] Tue, 09 April 2024 05:38 Go to previous message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14738
Registered: July 2009
Senior Member
so you mean an update site? (see wizard)

Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Day Job: https://www.everest-systems.com
Previous Topic:Logging in xtext
Next Topic:Validation Test Fail after update to Xtext 2.34 and MWE 2.17
Goto Forum:
  


Current Time: Sat Jan 18 20:47:20 GMT 2025

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

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

Back to the top