-
-
Notifications
You must be signed in to change notification settings - Fork 243
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
14 changed files
with
79 additions
and
74 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
43 changes: 43 additions & 0 deletions
43
...rg.python.pydev.core/src/org/python/pydev/core/preferences/PyDevCodeStylePreferences.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
package org.python.pydev.core.preferences; | ||
|
||
import org.python.pydev.shared_core.SharedCorePlugin; | ||
|
||
public class PyDevCodeStylePreferences { | ||
|
||
public static final String USE_LOCALS_AND_ATTRS_CAMELCASE = "USE_LOCALS_AND_ATTRS_CAMELCASE"; | ||
public static final String USE_METHODS_FORMAT = "USE_METHODS_FORMAT"; | ||
public static final boolean DEFAULT_USE_LOCALS_AND_ATTRS_CAMELCASE = false; | ||
public static final int METHODS_FORMAT_CAMELCASE_FIRST_LOWER = 0; | ||
public static final int METHODS_FORMAT_CAMELCASE_FIRST_UPPER = 1; | ||
public static final int METHODS_FORMAT_UNDERSCORE_SEPARATED = 2; | ||
public static final int DEFAULT_USE_METHODS_FORMAT = METHODS_FORMAT_UNDERSCORE_SEPARATED; | ||
|
||
public static final String[][] LABEL_AND_VALUE = new String[][] { | ||
{ "underscore_separated", String.valueOf(METHODS_FORMAT_UNDERSCORE_SEPARATED) }, | ||
{ "CamelCase() with first upper", String.valueOf(METHODS_FORMAT_CAMELCASE_FIRST_UPPER) }, | ||
{ "camelCase() with first lower", String.valueOf(METHODS_FORMAT_CAMELCASE_FIRST_LOWER) }, }; | ||
|
||
public static final String[][] LOCALS_LABEL_AND_VALUE = new String[][] { | ||
{ "underscore_separated", String.valueOf(false) }, | ||
{ "camelCase with first lower", String.valueOf(true) }, }; | ||
|
||
public static int TESTING_METHOD_FORMAT = DEFAULT_USE_METHODS_FORMAT; | ||
|
||
public static int useMethodsCamelCase() { | ||
if (SharedCorePlugin.inTestMode()) { | ||
return TESTING_METHOD_FORMAT; | ||
} | ||
return PydevPrefs.getEclipsePreferences().getInt(USE_METHODS_FORMAT, DEFAULT_USE_METHODS_FORMAT); | ||
} | ||
|
||
public static boolean TESTING_METHOD_LOCALS_AND_ATTRS_CAMEL_CASE = DEFAULT_USE_LOCALS_AND_ATTRS_CAMELCASE; | ||
|
||
public static boolean useLocalsAndAttrsCamelCase() { | ||
if (SharedCorePlugin.inTestMode()) { | ||
return TESTING_METHOD_LOCALS_AND_ATTRS_CAMEL_CASE; | ||
} | ||
return PydevPrefs.getEclipsePreferences().getBoolean(USE_LOCALS_AND_ATTRS_CAMELCASE, | ||
DEFAULT_USE_LOCALS_AND_ATTRS_CAMELCASE); | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters