In our Product we see unexpected "Source > Format" context menu entries in the project explorer basically everywhere.
See:

But this can also be seen e.g. with plain JDT.
This is confusing because there is already a "Source" context menu entry that has a "Format" entry in it's sub-menu.
The cause is #364. This part in the plugin.xml looks a bit too broad for me:
<menuContribution locationURI="popup:org.eclipse.ui.popup.any?endof=group.generate">
<menu label="Source" mnemonic="S" >
<command commandId="org.eclipse.lsp4e.formatfile">
<visibleWhen>
<iterate>
<or>
<adapt type="org.eclipse.core.resources.IFile">
<test property="org.eclipse.lsp4e.hasLanguageServer" />
</adapt>
<adapt type="org.eclipse.core.resources.IFolder" />
<adapt type="org.eclipse.core.resources.IProject" />
</or>
</iterate>
</visibleWhen>
</command>
</menu>
</menuContribution>
Can we improve this?
In our Product we see unexpected "Source > Format" context menu entries in the project explorer basically everywhere.
See:

But this can also be seen e.g. with plain JDT.
This is confusing because there is already a "Source" context menu entry that has a "Format" entry in it's sub-menu.
The cause is #364. This part in the plugin.xml looks a bit too broad for me:
Can we improve this?