Community
Participate
Working Groups
Created attachment 240145 [details] Attachment containing pop_up_window.png, keyboard_binding.png, current EmbeddedEditorActions.java and new EmbeddedEditorActions.java Hi. I have an embedded xtext editor (created with EmbeddedEditorFactory) within a view part. During editing, e.g. pressing "Line end", an annoying window pops up (please see attachment). This window appears because the same keyboard binding is registered for the same command (please see attachment). The shortcut have different scopes, but nevertheless the pop up window appears. The reason for that is, that the EMBEDDED_TEXT_EDITOR_SCOPE gets activated during initialize and deactived on editor disposal in EmbeddedEditorActions. When using the embedded editor in a view, the EMBEDDED_TEXT_EDITOR_SCOPE stays active as long as the view is active. I suggest to activate the context on focusGained and deactivate it on focusLost. Please see attachment showing my suggestion how to change the EmbeddedEditorActions. Kind regards.
also the embedded editor scope should be a child of org.eclipse.ui.textEditorScope, which will help avoiding keybinding conflicts.
(In reply to Sven Efftinge from comment #1) > also the embedded editor scope should be a child of > org.eclipse.ui.textEditorScope, which will help avoiding keybinding > conflicts. IIRC, that was not possible because the embedded editor is used in dialogs, too, e.g. the preference page
org.eclipse.ui.textEditorScope is a child of org.eclipse.ui.contexts.dialogAndWindow
According to this comment in the context hierarchy on 'org.eclipse.ui.contexts.window' which is the direct parent of 'org.eclipse.ui.textEditorScope', textEditorScope will not work in dialogs: <!-- This is the root context for key bindings that should apply in windows (e.g., IWorkbenchWindow). Key bindings in this context will only apply to windows (not dialogs). --> Maybe we need to set different contexts depending on the use case for the embedded editor?