This plugin was tested with IntelliJ IDEA Build 695 but might work with other builds.
This plugin toggles the Java keywords public/protected/private and true/false. Actually, true and false aren't keywords but reserved words. However, I didn't want to call the plugin ToggleKeywordOrReservedWord or something like that
This is my first plugin and I hope others will find it useful.
Comments, bug reports and feature requests are always welcome!
Copy the jar file into the "plugins" directory of IntelliJ IDEA. Note that there is no keymap associated with this plugin. Go to Options | Keymap and find the "Toggle Keyword" entry under the "Editor Actions" section. Assign a keyboard shortcut of your choice (I use Ctrl+T).
Place the caret on one of the keywords/reserved words mentioned above and press the keyboard shortcut. Enjoy!
- Allow toggling of all occurrences in the current selection at the same time
- Allow caret to be anywhere in the current line
- Resolve conflicts between public/protected/private and true/false by only toggling true/false when the cursor is in the word or it is the only togglable thing on the line
Thanks to ChrisBartley for creating the ToggleCharacterCase plugin.
It served as a template for this plugin.
1.0 (01 Oct 2002)
1.1 (20 Feb 2003)
- Fixed bug: true/false doesn't toggle if enclosed by non-whitespace delimiters such as "{}[]()". Thanks to PaulBruynel for reporting this bug.
- Enhancement: if possible without disrupting back-and-forth toggling, the caret is left at its original offset. Thanks to BjoernKuebler for suggesting this enhancement.
1.2 (24 Feb 2003)
- Fixed bug: true/false doesn't toggle if delimiter is "," (e.g. as part of a parameter list). Thanks to PaulBruynel for reporting this bug.
- Added rudimentary unit tests.
1.3 (02 Feb 2005) - Built by Nathan Brown
- Recompiled for Irida Build 3193.
- Updated to avoid use of deprecated getChars() method of Document.
You have to change group-id "EditorActions" to "EditorPopupMenu" at plugin.xml
-- RomanPorotnikov - 22 Nov 2002
It works fine for me using "EditorActions" with build 695.
-- ThomasVollmer - 24 Feb 2003
|
|