Update of /cvsroot/pydev/org.python.pydev/src/org/python/pydev/ui/importsconf
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24261/src/org/python/pydev/ui/importsconf
Modified Files:
ImportsPreferencesPage.java
Log Message:
Organize imports can group from xxx imports.
Index: ImportsPreferencesPage.java
===================================================================
RCS file: /cvsroot/pydev/org.python.pydev/src/org/python/pydev/ui/importsconf/ImportsPreferencesPage.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** ImportsPreferencesPage.java 19 May 2008 00:58:20 -0000 1.2
--- ImportsPreferencesPage.java 1 Jun 2008 20:44:41 -0000 1.3
***************
*** 74,82 ****
public static boolean getGroupImports() {
if(PydevPlugin.getDefault() == null){
! return true;
}
return PydevPrefs.getPreferences().getBoolean(GROUP_IMPORTS);
}
}
--- 74,119 ----
public static boolean getGroupImports() {
if(PydevPlugin.getDefault() == null){
! return groupImportsForTests;
}
return PydevPrefs.getPreferences().getBoolean(GROUP_IMPORTS);
}
+ /**
+ * May be changed for testing purposes.
+ */
+ public static boolean groupImportsForTests = true;
+
+
+ /**
+ * @return true if imports should be wrapped when they exceed the print margin.
+ */
+ public static boolean getMultilineImports() {
+ if(PydevPlugin.getDefault() == null){
+ return multilineImportsForTests;
+ }
+ return PydevPrefs.getPreferences().getBoolean(MULTILINE_IMPORTS);
+ }
+
+ /**
+ * May be changed for testing purposes.
+ */
+ public static boolean multilineImportsForTests = true;
+
+ /**
+ * @return the way to break imports as the constants specified
+ * @see #BREAK_IMPORTS_MODE_ESCAPE
+ * @see #BREAK_IMPORTS_MODE_PARENTHESIS
+ */
+ public static String getBreakIportMode() {
+ if(PydevPlugin.getDefault() == null){
+ return breakImportModeForTests;
+ }
+ return PydevPrefs.getPreferences().getString(BREAK_IMPORTS_MODE);
+ }
+
+ /**
+ * May be changed for testing purposes.
+ */
+ public static String breakImportModeForTests = BREAK_IMPORTS_MODE_PARENTHESIS;
}
|