mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-18 09:34:34 +07:00
name suggestions for static non-final fields should escape _ (IDEA-123441)
This commit is contained in:
+1
-1
@@ -729,7 +729,7 @@ public class JavaCodeStyleManagerImpl extends JavaCodeStyleManager {
|
||||
|
||||
@Override
|
||||
public String variableNameToPropertyName(String name, VariableKind variableKind) {
|
||||
if (variableKind == VariableKind.STATIC_FINAL_FIELD) {
|
||||
if (variableKind == VariableKind.STATIC_FINAL_FIELD || variableKind == VariableKind.STATIC_FIELD && name.contains("_")) {
|
||||
StringBuilder buffer = new StringBuilder();
|
||||
for (int i = 0; i < name.length(); i++) {
|
||||
char c = name.charAt(i);
|
||||
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
// "Create Method 'test2'" "true"
|
||||
class Foo {
|
||||
static String FOO_BAR = "Bar";
|
||||
void test1() { test2(FOO_BAR); }
|
||||
|
||||
private void test2(String fooBar) {
|
||||
|
||||
}
|
||||
}
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
// "Create Method 'test2'" "true"
|
||||
class Foo {
|
||||
static String FOO_BAR = "Bar";
|
||||
void test1() { tes<caret>t2(FOO_BAR); }
|
||||
}
|
||||
Reference in New Issue
Block a user