Versions Compared

Key

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

...

Language that are registered here are always xtext languages.

Registering languages that are defined in the semantic

Since we are in the semantics repository we can use java ServiceLoader to add new ILSSetups, which register a language.

Code Block
interface ILSSetup {
    def Injector doLSSetup()
}

class SCTXLSSetup implements ILSSetup {
    override doLSSetup() {
        return SCTXIdeSetup.doSetup()
    }
}

A language that wants to be included in the LS can implement this interface. Registering SCTXLSSetup via ServiceLoader allows to register all available languages like this:

Code Block
for (contribution: KielerServiceLoader.load(ILSSetupContribution)) {
            contribution.LSSetup.doLSSetup()
        }


Bindings


Starting and connecting

...

How to make a new module for sprotty (see actionModule, ...)

WIP


How to use ServiceLoader