Issue #2729 Revert changes made to PythonPreferenceStore.java in favor changes to GfePyIncludeUtil.java made in #3500.

This reverts commit 7f87c532a488924b997b8d3d0b855d6b26f7df7a [formerly 2abfe6de77] [formerly 11c8529862 [formerly 11c8529862 [formerly 552c3e9485ee03c552851c98455e57f12a8f033f]]].

Change-Id: I50a580d7c038b039cc8ebf3e05dd16c4453f8355

Former-commit-id: b1fa793541 [formerly b1fa793541 [formerly d1c6475343160eeb02171fb8fc3b04f527203154]]
Former-commit-id: 61baeb4bcc
Former-commit-id: d27daaea68
This commit is contained in:
Ron Anderson 2014-09-24 09:02:51 -05:00
parent aed5845596
commit 6e39378a9d

View file

@ -58,7 +58,6 @@ import com.raytheon.uf.common.util.FileUtil;
* Sep 05, 2013 #2307 dgilling Use better PythonScript constructor.
* Sep 11, 2013 #2033 dgilling Don't load loadConfig.py from
* localization store.
* Apr 02, 2014 #2729 randerso Added commonPython to path for LogStream
*
* </pre>
*
@ -90,7 +89,6 @@ public class PythonPreferenceStore implements IPreferenceStore,
@SuppressWarnings("unchecked")
public void loadConfiguration(String configName) {
String commonPythonPath = GfePyIncludeUtil.getCommonPythonIncludePath();
String configPath = GfePyIncludeUtil.getConfigIncludePath();
String vtecPath = GfePyIncludeUtil.getVtecIncludePath();
@ -102,8 +100,8 @@ public class PythonPreferenceStore implements IPreferenceStore,
new Path(FileUtil.join("python", "utility",
"loadConfig.py")), null)).getPath());
py = new PythonScript(scriptFile.getPath(),
PyUtil.buildJepIncludePath(commonPythonPath, configPath,
vtecPath), this.getClass().getClassLoader());
PyUtil.buildJepIncludePath(configPath, vtecPath), this
.getClass().getClassLoader());
} catch (JepException e) {
statusHandler.handle(Priority.CRITICAL,
"Unable to load GFE config", e);
@ -190,7 +188,7 @@ public class PythonPreferenceStore implements IPreferenceStore,
public void firePropertyChangeEvent(String name, Object oldValue,
Object newValue) {
// The following criteria meets the Eclipse contract
if ((oldValue == null) || oldValue.equals(newValue)) {
if (oldValue == null || oldValue.equals(newValue)) {
return;
}
@ -677,32 +675,32 @@ public class PythonPreferenceStore implements IPreferenceStore,
public boolean isBoolean(String name) {
Object obj = selectedConfiguration.get(name);
return ((obj != null) && (obj instanceof Boolean));
return (obj != null && obj instanceof Boolean);
}
public boolean isInt(String name) {
Object obj = selectedConfiguration.get(name);
return ((obj != null) && (obj instanceof Integer));
return (obj != null && obj instanceof Integer);
}
public boolean isFloat(String name) {
Object obj = selectedConfiguration.get(name);
return ((obj != null) && (obj instanceof Float));
return (obj != null && obj instanceof Float);
}
public boolean isDouble(String name) {
Object obj = selectedConfiguration.get(name);
return ((obj != null) && (obj instanceof Double));
return (obj != null && obj instanceof Double);
}
public boolean isLong(String name) {
Object obj = selectedConfiguration.get(name);
return ((obj != null) && (obj instanceof Long));
return (obj != null && obj instanceof Long);
}
public boolean isString(String name) {
Object obj = selectedConfiguration.get(name);
return ((obj != null) && (obj instanceof String));
return (obj != null && obj instanceof String);
}
public boolean isStringArray(String name) {
@ -713,7 +711,7 @@ public class PythonPreferenceStore implements IPreferenceStore,
result = true;
} else if (obj instanceof List) {
List<?> list = (List<?>) obj;
if ((list.size() == 0) || (list.get(0) instanceof String)) {
if (list.size() == 0 || list.get(0) instanceof String) {
result = true;
}
}
@ -730,7 +728,7 @@ public class PythonPreferenceStore implements IPreferenceStore,
result = true;
} else if (obj instanceof List) {
List<?> list = (List<?>) obj;
if ((list.size() == 0) || (list.get(0) instanceof Float)) {
if (list.size() == 0 || list.get(0) instanceof Float) {
result = true;
}
}
@ -747,7 +745,7 @@ public class PythonPreferenceStore implements IPreferenceStore,
result = true;
} else if (obj instanceof List) {
List<?> list = (List<?>) obj;
if ((list.size() == 0) || (list.get(0) instanceof Integer)) {
if (list.size() == 0 || list.get(0) instanceof Integer) {
result = true;
}
}