eclipsesource / graphical-lsp

Graphical language server platform for building web-based diagram editors
https://www.eclipse.org/glsp
Eclipse Public License 2.0
36 stars 8 forks source link

Add label editing and edit validation support (#27) #281

Closed planger closed 5 years ago

planger commented 5 years ago

This change builds on the newly introduced label editing support of Sprotty (see eclipse/sprotty#88). The introduced label validation support is exemplified by checking whether task name is empty (error) or non-unique (warning).

Fixes #27

planger commented 5 years ago

Thanks for the review, I'll address your inline comments very soon!

Tested it and it works really well! However, there seems to be an issue with the name validation: If I rename an element and use an already existing name the corresponding validation error message appears but it's still possible to complete the action with enter. My expectation would be to permit the renaming (same as for empty names)

Well, not really. The editor prevents committing the value only on errors. Non-unique name is defined as warning only (see WorkflowLabelEditValidator:25), so committing the name is allowed. An empty name would be an error, so you can't commit an empty name.

tortmayr commented 5 years ago

Well, not really. The editor prevents committing the value only on errors. Non-unique name is defined as warning only (see WorkflowLabelEditValidator:25), so committing the name is allowed. An empty name would be an error, so you can't commit an empty name.

I see. thanks for the clarification