eclipse.platform.ui icon indicating copy to clipboard operation
eclipse.platform.ui copied to clipboard

"A conflict occurred for CTRL+/"

Open jukzi opened this issue 1 year ago • 5 comments

and A conflict occurred for CTRL+7: this error is logged, but both handlers seem to have a non conflicting org.eclipse.jdt.ui.propertiesEditorScope vs org.eclipse.jdt.ui.javaEditorScope and don't show a conflict in the key preferences: image

A conflict occurred for CTRL+/:
Binding(CTRL+/,
	ParameterizedCommand(Command(org.eclipse.jdt.ui.edit.text.java.toggle.comment,Toggle Comment,
		Toggle comment the selected lines,
		Category(org.eclipse.jdt.ui.category.source,Source,Java Source Actions,true),
		WorkbenchHandlerServiceHandler("org.eclipse.jdt.ui.edit.text.java.toggle.comment"),
		,,true),null),
	org.eclipse.ui.defaultAcceleratorConfiguration,
	org.eclipse.jdt.ui.javaEditorScope,,,system)
Binding(CTRL+/,
	ParameterizedCommand(Command(org.eclipse.jdt.ui.edit.text.java.toggle.comment,Toggle Comment,
		Toggle comment the selected lines,
		Category(org.eclipse.jdt.ui.category.source,Source,Java Source Actions,true),
		WorkbenchHandlerServiceHandler("org.eclipse.jdt.ui.edit.text.java.toggle.comment"),
		,,true),null),
	org.eclipse.ui.defaultAcceleratorConfiguration,
	org.eclipse.jdt.ui.propertiesEditorScope,,,system)

eclipse.buildId=4.31.0.I20240204-1800 java.version=21.0.2

i can not remember to have seen that error entry previously. was there any recent change related?

jukzi avatar Feb 05 '24 08:02 jukzi

It seems to me that the two scopes are disjoint so that it's not a conflict...

merks avatar Feb 05 '24 08:02 merks

I would have expected a debug launch to show this problem but it does not. Also, after updating my SDK installation I also don't see such a log entry. That seems strange.

merks avatar Feb 05 '24 09:02 merks

IIRC, there were some changes to conflict reporting and resolution recently (eg https://github.com/eclipse-platform/eclipse.platform.ui/pull/1508 and I believe another one that just stops logging conflicts at startup). So you may need to use the binding in the right perspective to get the conflict printed.

It seems to me that the two scopes are disjoint so that it's not a conflict...

In practice, they are; but I don't think there is a way to know that programatically, so the usual understanding of binding managers is to assume that 2 scopes can be joined. However, with the change mentioned above, I don't think we should see a case where a conflict happens. @jukzi Can you remember some details to reproduce (ie which open views/editors)? Did you hit Ctrl+/ ? Did you see the IDE prompting which command to run?

mickaelistria avatar Feb 05 '24 09:02 mickaelistria

i updated IDE, restart IDE, deleted Log ->new log entry for new this shortly after. i am sure i did not press CRT+/ nor CTRL+7, but probably ctrl+shift+T, which has also a conflict and was reported in the same event.

jukzi avatar Feb 05 '24 09:02 jukzi

as far as i understand https://github.com/eclipse-platform/eclipse.platform.ui/pull/1508 it would require to have both an lsp4e and java editor open to see that warning. but probbly @trancexpress can tell us how to reproduce.

jukzi avatar Feb 05 '24 10:02 jukzi