Révision 3111
tmp/org.txm.core/src/java/org/txm/core/preferences/TXMPreferences.java (revision 3111) | ||
---|---|---|
81 | 81 |
|
82 | 82 |
public final static String PARENT_PARAMETERS_NODE_PATH = "parent_parameters_node_path"; //$NON-NLS-1$ |
83 | 83 |
|
84 |
public final static String CLASS = "class"; //$NON-NLS-1$ |
|
85 |
|
|
84 | 86 |
public final static String BUNDLE_ID = "bundle_id"; //$NON-NLS-1$ |
85 | 87 |
|
86 | 88 |
public final static String USER_NAME = "user_name"; //$NON-NLS-1$ |
tmp/org.txm.core/src/java/org/txm/core/results/TXMResult.java (revision 3111) | ||
---|---|---|
1071 | 1071 |
Log.finest("TXMResult.autoSaveParametersFromAnnotations(): " + this.getClass().getSimpleName() + ": saving parameters to local node..."); |
1072 | 1072 |
|
1073 | 1073 |
// internal data to save for unserialization |
1074 |
this.saveParameter("class", this.getClass().getName()); //$NON-NLS-1$
|
|
1074 |
this.saveParameter(TXMPreferences.CLASS, this.getClass().getName());
|
|
1075 | 1075 |
this.saveParameter(TXMPreferences.RESULT_PARAMETERS_NODE_PATH, this.parametersNodePath); |
1076 | 1076 |
this.saveParameter(TXMPreferences.BUNDLE_ID, FrameworkUtil.getBundle(getClass()).getSymbolicName()); |
1077 | 1077 |
|
... | ... | |
2094 | 2094 |
props.load(IOUtils.getReader(parameters)); |
2095 | 2095 |
|
2096 | 2096 |
// some tests before... |
2097 |
String className = props.getProperty("class");
|
|
2097 |
String className = props.getProperty(TXMPreferences.CLASS);
|
|
2098 | 2098 |
if (className == null || className.length() == 0) { |
2099 |
System.out.println("** Error: No class internal parameter set."); |
|
2099 |
System.out.println("** Error: No class internal parameter set. Can't import the parameters.");
|
|
2100 | 2100 |
return false; |
2101 | 2101 |
} |
2102 | 2102 |
|
... | ... | |
2134 | 2134 |
props.load(IOUtils.getReader(parameters)); |
2135 | 2135 |
|
2136 | 2136 |
// some tests before... |
2137 |
String className = props.getProperty("class");
|
|
2137 |
String className = props.getProperty(TXMPreferences.CLASS);
|
|
2138 | 2138 |
if (className == null || className.length() == 0) { |
2139 | 2139 |
System.out.println("** Error: No class internal parameter set."); |
2140 | 2140 |
return null; |
2141 | 2141 |
} |
2142 | 2142 |
|
2143 |
String bundleId = props.getProperty("bundle_id");
|
|
2143 |
String bundleId = props.getProperty(TXMPreferences.BUNDLE_ID);
|
|
2144 | 2144 |
if (bundleId == null || bundleId.length() == 0) { |
2145 | 2145 |
System.out.println("** Error: No bundle_id internal parameter set."); |
2146 | 2146 |
return null; |
Formats disponibles : Unified diff