Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

4. Using Xtext

Adding osm:

I If you want to use osm with Xtext your starting point should be the "GenerateXGr16xx.mwe2" file where you need to add the line "referencedResource = "platform:/resource/no.hal.pgo.osm/model/osm.genmodel" as shown in the image below.

...

To use osm in your xtext editor you need to import it as shown below.

Now you have to right-click on the GenerateXGr16xx.mwe2 class and Run as –> MWE2 Workflow. After this, you have to add this into the XGr16xxStandaloneSetup.xtend file(see picture): 

override Injector createInjectorAndDoEMFRegistration() {
OsmSupportStandaloneSetup.setup();
return super.createInjectorAndDoEMFRegistration;
}

Image Added

The last thing you now have to do is to import the org.eclipse.emf.mwe.utils.StandaloneSetup inside the GenerateXGr16xx.mwe2 file.

Now you are ready to make your own DSL!

...