Skip to content

Commit

Permalink
feat: only show the "Source" menu for GenericEditors
Browse files Browse the repository at this point in the history
This avoids displaying multiple "Source" menus, e.g. in case the a Java
file is opened via the JDT UI plugin which contributes it's own "Source"
menu.
  • Loading branch information
sebthom committed Aug 26, 2024
1 parent 0e919a4 commit 2db850a
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions org.eclipse.tm4e.languageconfiguration/plugin.xml
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,11 @@
<!-- register commands as entries in main window menu -->
<menuContribution locationURI="menu:org.eclipse.ui.main.menu?after=edit">
<menu id="org.eclipse.tm4e.source.menu" label="%LanguageConfiguration.menu.source.name" mnemonic="S">
<visibleWhen>
<with variable="activeEditor">
<instanceof value="org.eclipse.ui.internal.genericeditor.ExtensionBasedTextEditor" />
</with>
</visibleWhen>
<command commandId="org.eclipse.tm4e.languageconfiguration.toggleLineCommentCommand" >
<visibleWhen>
<reference definitionId="org.eclipse.tm4e.languageconfiguration.hasLanguageConfiguration"/>
Expand Down

0 comments on commit 2db850a

Please sign in to comment.