corner imagecorner image
IDEPlatformPluginsDocs & SupportCommunityPartners

flipArgs - plugin detail

This module has features that I find useful while editing code. This only works to maybe Netbeans 6.8, and I do not plan on updating it, because there are other plugins that provide similar functionality.

n/a
Plugin owner: jbfaden
Website:
Added: 2007-12-20
Last updated: 2012-03-15
NetBeans Versions: 6.0, 6.1, 6.5, 6.7, 6.8
License: GPL
Category: Editing
Size: 0.01 MB
Downloaded: 180 times
Rating:
 0, by 0 users


Download plugin

Verifications for NetBeans versions

Plugin is not subject to any verification

Introduction

This module has features that I find useful while editing code. Right now there are two features:
  • "flip args," which pivots two arguments around a comma. Select text that can be split on a comma, then alt-f f. A future version of this will try to guess the delimeter to make the operation more useful. (If this sounds silly, count the number of key strokes it takes to do this simple operation.)
  • "selection stats" displays the offset of the selected text, the length in chars, etc. This is attached to alt-f =
Here is the source: http://www.cottagesystems.com/nb/flipArgs.zip

What's new in this version

[ You have to be logged in to be able to comment. ]

User Comments

  

complex expression handling by Reorder module

Reorder module does handle arbitrarily complex expressions as it uses the Javac Parser support built into NetBeans. It works in method declartions, method invocation, single dimensional array initializers, throws and implements clasess (even though last to are not semaically useful).
Posted by sandipchitale on Dec 28, 2007
  

unify reorder, flip args

I really like how Sandip's control model in the redorder module, since this seems to be a more general case of the two-argument flip args. Perhaps the two can be combined into one functional set.

My intent with the flipArgs was to handle more complex expressions like:
subtract( add( 4, 6 ), 20 )
So it parse (or leverage off the language model) deeply enough to move add(4,6) as a unit.
Posted by jbfaden on Dec 27, 2007
  

Enhancement requests

Support a more generalized mechanism:

- Rotate left (this should work with or without selection) Implies more than two in the sequence.
- Ratate right (this should work with or without selection) Implies more than two in the sequence.
- flip with left (this should work without selection)
- flip with right (this should work without selection)
Posted by sandipchitale on Dec 23, 2007
  

Thanks

I always wanted this. I had even filed an issue for this:

http://www.netbeans.org/issues/show_bug.cgi?id=89176
Posted by sandipchitale on Dec 23, 2007