Skip to content
Model centric tools for Spring development Community portal
Skyway PerspectivesModel driven delivery

Model reference

Reference Figure: Code Assistants in the Editor

Code assistants suggest the next model element while you work. This figure shows the assistant list beside a generated Java type.

Code assistant view showing generated Java types and model annotations
Figure 15. Assistants offer model level actions while the code view stays in sync.

Code assistants are a small but useful part of the editor. They suggest the next model element while you work, such as a new attribute, an operation or a reference. The suggestions are drawn from the metamodel, so they respect the rules of the type you are editing.

Common assistants

  • Create type. Adds a new entity, service, controller or flow to the current package.
  • Add attribute. Adds a typed field with optional constraints.
  • Add operation. Adds a behaviour with input and output parameters.
  • Wire reference. Connects two types with a named association.
  • Generate code. Runs the recipe set for the current type or project.

Working with the code view

The code view stays in sync with the model. When you add an attribute, the generated field appears after the next generation run. The code view is read only for generated files, which prevents a manual edit from being lost on the next run. Hand written classes stay outside the generated folders and are never overwritten.

Keep generated code generated. If a change belongs in the output, change the model or the recipe. Direct edits to generated files disappear on the next run.

The assistant list is also a quick way to learn the metamodel. Hover an entry to see which element it creates and which recipes consume it.