SelectionService - Context Menu, and Highlight-Toggle not showing on tree widget

I’m following the example of the problem-tree to create my own tree widget. I can’t seem to get the context menu to show on my widget, and the nodes don’t highlight-toggle when I select them.

I’m trying to understand how this works in the problem widget - I think the main piece is in the problem-contribution.ts file where it defines “registerCommands” and “registerMenus” and I’ve implemented these pieces without any compiler issues for my widget, but the context menu doesn’t show and the selections don’t toggle.

What is the general pattern here that enables those features?

[original thread by shortwavedave]

Did you pass a context menu path to your tree?

via https://github.com/theia-ide/theia/blob/392267aca382fe805d9b0714adc65baa18482b18/packages/core/src/browser/tree/tree-widget.tsx#L60 ?

What is the general pattern here that enables those features?

All trees following the same pattern. It should be enough to look at implementation of one.

[shortwavedave]

I thought I passed the context, but actually since you pointed me to that workshop code I am restructuring my project entirely. That was very helpful!