Implement comment/uncomment for C/C++ in anjuta
completed by: Peter Hoffmann
mentors: Johannes Schmid
Some details are described in bug #637695.
The task is to implement two menu items (Edit->Comment->(Un)comment) that comment/uncomment the current Code. This should be done inside the language-support-cpp-java plugin as it is specific to C/C++ and probably Vala/C#.
- Single line comments should default to /* */ in C and // in C++ files
- Multi-line comments should be /* */ by default
- If needed that might configurable in the C/C++ preferences
Nice but not needed:
- Detect if a line is already commented and do nothing then
- Make the menu item a toggle that comments/uncomments based on the current state
It is important that this doesn't break the workflow so take care the cursor positions are ok after any action and the undo/redo still work correctly.
IRC #anjuta @ irc.gnome.org (ping jhs if you have specific questions)
Please file your results as attachment to the bug report preferable as git-format-patch against master but if you have trouble building master a patch against gnome-2-32 branch would be ok, too.