CamelCase functionality
Is there already some utility classes, etc. in open api for handling the camel case functionality used e.g. in "Goto Class" or "Goto File" functionality? Just wanted to make sure before implementing something myself..
Please sign in to leave a comment.
I just noticed that CamelHumps is the term used in IDEA. Anyway, the same question remains. :)
I'm not sure I understand what you're asking for. Is it a way to show up
class chooser or regexp pattern builder or way to break camelhumped identifier
to words?
-
Maxim Shafirov
http://www.jetbrains.com
"Develop with pleasure!"
To tell you the truth, I'm not sure myself what I was expecting.
One thing that I had in mind was a class that would hold a set of names (or perhaps a map of names linked to a PsiElement) and I could give it a string as input and it would produce me a set of PsiElements that match the given name. So for example, it could contain something like:
MyClass --> PsiElement@1
OtherThing --> PsiElement@2
MoreCoolThings --> PsiElement@3
Now if I could say something like: cameCaseUtil.find("MC") and as a result, I would receive a set containing PsiElement@1 and PsiElement@3.
Anyway, if no such thing exists already in open API, it's rather straightforward for me to implement something like that myself. Just wanted to make sure I'm not reinventing the wheel.
And to make sure I'm not misunderstood, even if there is such a functionality for classes (I don't wether there is or not), it's not going to be enough for me anyway as I have a need to store other things than classnames as the keys.
I doubt you'll be able to share much more than regexp builder. I can mail
it to you if you want.
-
Maxim Shafirov
http://www.jetbrains.com
"Develop with pleasure!"