Right click menus

If I had the selected right-click menu node last time. After startup, right-click it directly. At this time,‘ const { selection } = this.selectionService’; the ‘URI’ of the ‘selection’ is’ undefined ’
Should be


I try registerCommand
const { selection } = this.selectionService; const uriOrUris = UriSelection.getUris(selection); return [uriOrUris[0], event];
‘[uriOrUris[0]’ is undefined

Hey @y912765390,

I would recommend you to use the high-level UriAwareCommandHandler API instead of the low-level SelectionService. See here for an example of it’s usage:

Thank you very much for your answer. But I tried. At this time, the URI value is’ [] ’
I think you should try my operation. The last time there was a selected navigation node

Close and open the node again. It is still in the selected state. Right click the node at this time. The URI at this time does not exist

The two screenshots I sent are Theia’s own. You will find that the two menus display differently When you select another node or select this node again Is this a ‘bug’