Xtext Playground

Playground for special use cases with Xtext

TODO markers in DSL

Uses this blog post as starting point to support TODO markers in your DSL.

PLEASE NOTE: Since Xtext 2.6. task tags are official supported in Xtext (and Xtend) itself. So no need for this plug-in anymore.

Features

Markers and task view

For labels like TODO and FIXME automatically markers are created when saving the contents of the DSL editor:

Task tags in editor

Workspace wide marker configuration

You can configure the labels for which markers should be created in the Eclipse preferences under NameOfYourDSL/Compiler/Task Tags:

Task tags configuration in preference page

Project specific marker configuration

You can also define the marker labels project specific by opening the project properties (context menu on the project in the workspace and Properties):

Task tags configuration in project properties page

Installation

Update site: http://joergreichert.github.io/XtextPlayground/updatesite/ (Find older versions under http://joergreichert.github.io/XtextPlayground/updatesite/)

After install add the bundle org.eclipse.xtext.todo.fragment to the dependency section of your grammar project MANIFEST.MF file.

Then open grammar generator workflow (e.g. GenerateMyDsl.mwe2 when your DSL's name is "mydsl") and add

...
Workflow {
...
   component = Generator {
   ...
      language = auto-inject {
      ...
         fragment = org.eclipse.xtext.todo.TodoFragment auto-inject {}
      }
   }
}

Execute the workflow file to (re-)generate your grammar.

Note: Afterwards you have to update the plugin.xml in the grammar UI plugin with the contents of plugin.xml_gen.

Others


Navigate back to overview.