-
Is there a way to group actions in a In videos I have seen that it should be possible. But I did not figure out how to realize this. My code is more or less copied from the worklfow example and looks like this:
It seems that the interface CommandPaletteActionProvider did not provide any grouping? Thanks for any hints or help. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
The command palette action provider is used to specify the actions shown in the palette that opens up on Ctrl+Space. In the GLSP code, the palette shown in your screenshot is called tool palette and its items are provided by an implementation of the The If you want to provide custom grouping, you'll have to bind a custom @Override
protected Class<? extends ToolPaletteItemProvider> bindToolPaletteItemProvider() {
return MyToolPaletteItemProvider.class;
} To create groups, use the following utils in the implementation of return Lists.newArrayList(
PaletteItem.createPaletteGroup("node-group", "Nodes", nodes, "symbol-property", "A"),
PaletteItem.createPaletteGroup("edge-group", "Edges", edges, "symbol-property", "B")); In addition, it is always possible to customize the entire tool palette on the client by rebinding your own implementation of the tool palette module. |
Beta Was this translation helpful? Give feedback.
The command palette action provider is used to specify the actions shown in the palette that opens up on Ctrl+Space. In the GLSP code, the palette shown in your screenshot is called tool palette and its items are provided by an implementation of the
ToolPaletteItemProvider
.The
DefaultToolPaletteItemProvider
collects all registered instances ofCreateNodeOperationHandler
andCreateEdgeOperationHandler
and shows them in the group Nodes and Edges respectively. This is what you see in your screenshot.If you want to provide custom grouping, you'll have to bind a custom
ToolPaletteItemProvider
.