Replies: 1 comment
-
The application shell exposes the following: theia/packages/core/src/browser/shell/application-shell.ts Lines 853 to 871 in 6ef0867 There is a slight difference in the monaco editor; a monaco editor can be active but not focused (the cursor does not blink in the editor, but the editor's tab is marked as the active one). You can check how the VS Code-based editor actions are handled in Theia here: theia/packages/monaco/src/browser/monaco-command.ts Lines 163 to 171 in 6ef0867 As always, if you could provide a stripped-down example that does not work, we could improve Theia. You could also look into the selection service, maybe that helps a bit. |
Beta Was this translation helpful? Give feedback.
-
Hi,, I'm struggling into contribute an undo/redo action for my editor in theia. I'm able to attach to the actions and provide an handler for the undo/redo using the CommandRegistry.registerHandler, and it seems to works.
But I have some doubts about the context, eg if I open a monaco editor and do the undo then it will be always resolved by my handler, also the isEnabled on my handler doesn't help me since the args are empty so I can't enable it selectively.
I'm not even sure that in theia there is the concept of focused editor/extension, since more stuff can be opened at once, but just in case is there a built-in way to get which is the active editor/widget/extension?
Beta Was this translation helpful? Give feedback.
All reactions