Right click on the file tree to add your own options

I need to add my own options to the right-click folder menu in the file tree and get information about that folder. what should i do please.For example this

Hi @Xotm,

You can simply register context menu entries, such as done here. The command registered in there, will receive the file URI of the node as it’s first argument, see here.

1 Like

How should I do it? Are there any examples to refer to?

@Xotm I’ve put two links in my last message which are code examples from the Theia repo. That should be all the code that’s necessary to accomplish what you’re trying to do.

1 Like

I’ve had success following your approach, I want a custom popup layer to open when I click on my menu option. But now the popup layer will not open, strangely there is no error message.

@Xotm Is the CustomDialog an instance of Theia’s AbstractDialog? If so, you probably need to call open() for it to appear in the UI.

Yes, should I use open() or open(XotmDialog)?

@Xotm it should be await XotmDialog.open()