Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
GoogleCodeExporter opened this issue Apr 19, 2015 · 1 comment

Comments

@GoogleCodeExporter
Copy link

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
Copy link
Author

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

  • Changed state: Accepted

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants