Improve toggle comment menu contributions #421
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Currently the Add/Remove Block Comment / Toggle Line Comment commands are only accessible via their registered short cuts and not visible in the Generic Editors popup menu despite there registration in the plugin.xml for that exactly that purpose.
I guess because of a bug in Eclipse the menu items are not displayed. To fix this I had to specify the
label
attribute for the<command>
element under the<menuContribution>
. Apparently the label value from the command's definition is ignored.I also added menuContributions that show a
Source
menu in the main window. Interestingly for these contributions thelabel
did not need to be specified again and Eclipse simply used the label from the command definition.I reordered the entries of the plugin.xml and added some comments for better comprehensibility