Despite of the usual convention of using ctrl+/, I found ctrl+shift+c is actually the way to go if you want it to work on everything.
I care mostly about being able to toggle comment in the following file types:
- source code – comment with // or /* and */ block
- markup e.g. xml/html – comment with <!– and –> block
- property file value – comment with #
The following behaviors are tested in Eclipse version 3.6.
-
ctrl+/
- source code: Toggles //
- markup: No affect
- property file value: Toggles #
-
ctrl+shift+/
- source code: Only add but does not remove /* and */
- markup: Only add but does not remove <!– and –>
- property file value: No affect
-
ctrl+shift+c
- source code: Toggles //
- markup: Toggles <!– and –>
- property file value: Toggles #