XSemantics setup - finos/rune-dsl GitHub Wiki
How to get started with XSemantics
Note: the official Getting Started guide is out-dated! It may still contain some useful tips though.
Step 1: install DSL support for XSemantics in Eclipse
This step should be performed by every developer working on the project!
- Go to Help > Install New Software...
- In 'Work with' fill in https://download.eclipse.org/xsemantics/milestones/. (note: this site is different than what is mentioned in the getting started guide)
- Install the appropriate version of XSemantics based on the version of XText that you're using.
Next steps should only be performed once. Note that, after the change, everyone working on the project should reload their target platform.
Step 2: adding XSemantics to the target platform
This step is to make sure that Eclipse can resolve the runtime dependency on XSemantics, which we will add in the next step.
- Open
com.regnosys.rosetta.target.target
. - Click Add... > Software Site > Next.
- Work with https://download.eclipse.org/xsemantics/milestones/ and select the appropriate version of XSemantics.
- Click Finish.
- Save the file and reload the target platform.
Step 3: adding the runtime dependency to XSemantics
- In
com.regnosys.rosetta
open the manifest and open de dependency tab. - Add
org.eclipse.xsemantics.runtime
to the required plugins. - Save the manifest.
Step 4: testing
- Add a new file called
Rosetta.xsemantics
. - Add the following code.
system com.regnosys.rosetta.typing.RosettaTyping
validatorExtends com.regnosys.rosetta.validation.RosettaValidator
- Save the file.
Now there should be an automatically generated folder called xsemantics-gen
.
Probably best to add **/xsemantics-gen/
to your .gitignore
!