-
I try to reimplement the TaskEditor UIExtension from the Workflow Example to get a more compact version to direct edit the label and some other details of an element within the graphical view. To avoid that I reinvent the wheel, can you explain a little bit what the classes I guess in the glsp-client package there are a lot of interesting classes which can help me a lot if I could understand what they are good for. Maybe you find some time and just add one short comment into the head of each class of this package? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
The
The I added these descriptions as documentation into the source code: eclipse-glsp/glsp-client#173 For plain label editing (which is not as feature-rich as the auto-complete widget, e.g. no auto-completion), you'd just have to enable the label edit feature for a particular label type (see workflow example): configureModelElement(context, 'label:heading', SLabel, SLabelView, { enable: [editLabelFeature] }); And handle the label editing actions on the server in the diagram module (see workflow example): @Override
protected void configureOperationHandlers(final MultiBinding<OperationHandler> binding) {
super.configureOperationHandlers(binding);
binding.add(ApplyLabelEditOperationHandler.class);
}
@Override
protected Class<? extends LabelEditValidator> bindLabelEditValidator() {
return WorkflowLabelEditValidator.class;
} |
Beta Was this translation helpful? Give feedback.
The
EditorContextService
is a central injectable component that gives read-only access to certain aspects of the diagram, such as the currently selected elements, the model root (GModel), the edit mode, the latest position of the mouse in the diagram. It has been introduced for two main reasons:EditorContext
, which is a context object sent as part of several actions to the server to describe the current state of the editor (selection, last mouse position, etc.).The
AutoCompleteWidget
is a reusab…