Community
Participate
Working Groups
Enhance or extend CaseAction to optionally convert camelCase to CAMEL_CASE and vice-versa (ie to UC prepend _ to non-initial caps, to LC remove and keep following capitalised). This would be very useful for constants eg static final String MY_CONSTANT="myConstant"
Nice idea. This would be a good feature for someone to start contributing to Eclipse. We currently don't plan to work on this.
see 8518 for some discussion
Created attachment 44721 [details] fix supports: capitalize -> Capitalize LOWER_CAMEL_CASE -> lowerCamelCase UPPER_CAMEL_CASE -> UpperCamelCase iNVERT cASE -> Invert Case constantCase -> CONSTANT_CASE
Created attachment 44722 [details] tests
I did not assign key shortcuts. I did not create a new context menu ( Bug 8518 comment 23 ) because there is no declared sub-menu I could contribute it to. I did not create a main menu entry because there is no declared sub-menu entry either -- the only existing menu these could be put on would be the edit menu.
You might consider renaming class Strings and possibly push it down to jface.text or eclipse.text. Or merge it w/ org.eclipse.jface.text.TextUtilities. I've put it into org.eclipse.ui.internal.texteditor to make it non-API; the functionality might be useful to JFace's downstream plug-ins though.
The problem with this patch is that it assumes Java (or more general: programming language) conventions to standard text editing and also introduces the term 'constant' which does not belong into a standard text editing plug-in.
Rename as you like ... I wasn't aware that there is a "general" text editor and "programming" text editor distinction within Eclipse frameworks. Useful for "general" text editor: capitalize -> Capitalize iNVERT cASE -> Invert Case Useful for "programming" text editor: LOWER_CAMEL_CASE -> lowerCamelCase UPPER_CAMEL_CASE -> UpperCamelCase constantCase -> CONSTANT_CASE So where does "text" stuff belong which applies for JDT, CDT, RDT, etc. and not "general" text editor stuff? I am confused :|
>So where does "text" stuff belong which applies for JDT, CDT, RDT, etc. and not >"general" text editor stuff? This does not yet exist, that's why we keep the current text editing framework free of such code. Discussions are underway whether to create an LTK layer for text editing support.