Sirius – Provide custom model operation


Sirius provides various model operations (change context, if, for, create instance, etc). This extension point allows the contribution of additional model operations.

Define a model operation extension

This extension point is identified as org.eclipse.sirius.diagram.bundledImageShape. In this extension, there are three required fields:

The model operation manager will have to create a Sirius task from the given description of the model operation. An example is available in the plugin with the class

public class DialogModelOperationManager implements IModelOperationManager {

    public Optional<ICommandTask> createTask(ModelOperation modelOperation, ModelAccessor modelAccessor, UICallBack uiCallback,
             Session session, IInterpreter interpreter, CommandContext context) {
        if (modelOperation instanceof DialogModelOperation) {
            DialogModelOperation dialogModelOperation = (DialogModelOperation) modelOperation;
            return Optional.of(new DialogTask(context, modelAccessor, interpreter, session, dialogModelOperation));
        return Optional.empty();


In this example, we will only consider the DialogModelOperation and we will return a new DialogTask used to open a dialog.