The IntelliJ plugin helps with coding and debugging DomUI code from within the IntelliJ Idea environment. It is a work in progress, currently in beta.
To install the plugin do the following:
After a restart you should see an extra option in the "Refactor" menu called "Replace Property strings with typed references" provided you are inside a Java file.
The source for the plugin can be found on Github.
Any DomUI application that was started through IntelliJ can show the code for screens and components inside IntelliJ on request. To do this, move the mouse to the component on the DomUI screen you want to inspect and press the tilde quickly twice:
By clicking the icons you can either open the component's source code or you can open the location where that component was created. After the click the location opens in IntelliJ at the correct spot.
This helps with "decoding" DomUI screens and makes it easy to find how screens are constructed – and where.
Some DomUI errors will show a location trace when something goes wrong, for example:
Clicking the stack trace elements will open the relevant file at the correct location inside the IDE.
Since DomUI 2.0 all code in DomUI that earlier accepted property paths as strings now also accept typed properties. Using typed properties instead of string constants has many advantages, the most important are:
The plugin helps by showing you places where property strings can be replaced by typed references, for example:
The underlined strings are property paths on InvoiceLineModel that can be replaced by typed properties. To do that the plugin adds a quick fix that is shown when you press ALT+ENTER on one of the underlined properties:
After selecting the quick fix the code will change to:
All properties in the file eligible for replacement will be changed.
In addition to changing the strings to typed references the plugin will also add the necessary @GeneratedProperties annotation on any of the data classes that are referenced by the property strings, so that the Annotation Processor will generate the required classes.
Instead of a quick fix you can also use the menu item Refactor → menu option.