Citizen user learning share : Starting MyDSL project [message #1864586] |
Wed, 27 March 2024 10:57 |
Michel Kergoat 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 #1864757 is a reply to message #1864739] |
Sun, 07 April 2024 16:20 |
Michel Kergoat 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 #1864767 is a reply to message #1864765] |
Mon, 08 April 2024 16:09 |
Michel Kergoat 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!
|
|
|
|
Powered by
FUDForum. Page generated in 0.03564 seconds