jbushmaster007 / anyedittools

Automatically exported from code.google.com/p/anyedittools
Other
1 stars 0 forks source link

AnyEdit does not offer the ability to convert underscore to camelcase without doing the reverse #91

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
Applying the underscore-camelcase conversion changes all identifiers with 
underscores to camelcase identifiers *as well as* camelcase identifiers to 
underscores.

E.g., if the highlighted region has foo_bar and somethingElse, then it gets 
updated to fooBar and something_else. I would expect to be able to choose to 
convert underscore to camel case only (or vice versa).

I installed anyedit this morning (3/25/14)

See before and after examples here. notice, e.g., how HashMap gets mangled

http://adnanaziz.com/tmp/BeforeAnyEdit.png
http://adnanaziz.com/tmp/AfterAnyEdit.png

Original issue reported on code.google.com by adnan.a...@gmail.com on 25 Mar 2014 at 2:56

GoogleCodeExporter commented 8 years ago
Currently the action tries to "guess" what is to revert, and this happens *per 
line*.
So if line contains underscores, it will be converted to camel case, and vice 
versa.

I used this for one direction conversion and it worked nice for blocks of code 
with repeating patterns.

But you've right, this is highly surprising if using it over *entire* files.

If you can, please provide a patch, code is here:
http://code.google.com/a/eclipselabs.org/p/anyedittools/source/browse/AnyEditToo
ls/src/de/loskutov/anyedit/actions/ChangeCase.java

The idea would be to decide (and remember it) what to do based *not* on the 
first line but on the entire selection/document.

Original comment by iloveeclipse on 9 Apr 2014 at 7:03