Skip to content

Commit 57446c9

Browse files
ghentschkemerks
authored andcommitted
[#3958] fix key command action handler gets deleted by content assist
fixes #3958 by handling multiple calls on assistSessionStarted(ContentAssistEvent)
1 parent 89dc1d5 commit 57446c9

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

bundles/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/KeyBindingSupportForAssistant.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,11 @@ public KeyBindingSupportForAssistant(IQuickAssistAssistant quickAssistAssistant)
136136

137137
@Override
138138
public void assistSessionStarted(ContentAssistEvent event) {
139+
// Do not replace commands twice if several processors are registered. This
140+
// method gets called for each processor.
141+
if (fReplacedCommands != null && !fReplacedCommands.isEmpty()) {
142+
return;
143+
}
139144
ICommandService commandService= PlatformUI.getWorkbench().getService(ICommandService.class);
140145
IHandler handler= getHandler(ContentAssistant.SELECT_NEXT_PROPOSAL_COMMAND_ID);
141146
fReplacedCommands= new ArrayList<>(10);

0 commit comments

Comments
 (0)