Magnolia YAML Assistant - Plugin for IntelliJ Idea

Yaml Plugin Video

The plugin significantly reduces the effort of light development in YAML with Magnolia CMS.

Created for developers by developers, it automates the most time-consuming activities during light development:

  • jumping into components, templates, dialogs by reference

  • autocomplete the schema for Magnolia light modules definitions

  • change file references during rename & move

Features

Jump navigation

The plugin supports jump navigation in the following elements of light modules:

  • id-references (e.g. my-module:components/mycomponent-dialog is resolved into my-module/dialogs/components/mycomponent-dialog.yaml)

  • path references (e.g. templateScript: my-module/templates/components/my-template.ftl)

  • i18n key navigation in attributes: title, description, label, buttonLabel, proceedLabel, cancelLabel, confirmationHeader, confirmationMessage, errorMessage, message

  • navigation in !include: and !inherit:

  • class navigation in attributes: class, implementationClass, generatorClass, modelClass, entityClass, appClass, subAppClass, formatterClass, dropConstraintClass, contentPreviewClass

This feature requires Java Libraries that contain referenced classes in the classpath! Add necessary jars to Libraries in Project Structure.
  • class navigation in $type declarations e.g. $type: textField is linking to info.magnolia.ui.field.TextFieldDefinition

This feature requires Java Libraries that contain referenced classes in the classpath! Add necessary jars to Libraries in Project Structure.
  • Yaml field dialogId within an action contains a jump link to definition of dialog eg. dialogId: ui-framework-jcr:rename → …​\info\magnolia\ui\magnolia-ui-framework-jcr\6.2.12\magnolia-ui-framework-jcr-6.2.12.jar!\ui-framework-jcr\dialogs\rename.yaml

Rename & Move refactoring

The plugin supports renaming and moving files referenced by id, dialog or templateScript attributes.

For Move refactoring, please mark the directory that contains the light module as sresources root!

Schema autocomplete

Supported versions of magnolia light development syntax are currently 5 and 6. You can set the used version under Preferences > Tools > Magnolia.

Yaml $type field autocomplete

When typing a value for $type YAML Key-Value autocompletion tries to find matching types. If the current location can be determined sufficiently the options are limited to correct values as well e.g

properties:
  name:
    $type: _ // all fields defined by fieldType will be suggested here

If the location cannot be determined sufficiently e.g. if you include a snippet to other files without having the complete structure in one file

myfield:
  $type: _ // all known $type values will be proposed, no limitation to fieldType is possible

Currently supported types

  • info.magnolia.ui.field.FieldType

  • info.magnolia.ui.api.availability.AvailabilityRuleType

  • info.magnolia.ui.editor.ItemProviderType

  • info.magnolia.ui.datasource.DatasourceType

  • info.magnolia.ui.api.action.ActionType

  • info.magnolia.ui.ViewType

  • info.magnolia.ui.framework.layout.LayoutType

  • info.magnolia.ui.field.ValidatorType

  • info.magnolia.ui.contentapp.browser.drop.DropConstraintType

  • info.magnolia.ui.contentapp.configuration.column.ColumnType

This feature requires Java Libraries that contain referenced classes in the classpath! Add necessary jars to Libraries in Project Structure.