| 171 |
171 |
/**
|
| 172 |
172 |
* Last computing date.
|
| 173 |
173 |
*/
|
| 174 |
|
@Parameter(key=TBXPreferences.LAST_COMPUTING_DATE, type=Parameter.INTERNAL)
|
|
174 |
@Parameter(key=TXMPreferences.LAST_COMPUTING_DATE, type=Parameter.INTERNAL)
|
| 175 |
175 |
private Date lastComputingDate;
|
| 176 |
176 |
|
| 177 |
177 |
/**
|
| 178 |
178 |
* Creation date.
|
| 179 |
179 |
*/
|
| 180 |
|
@Parameter(key=TBXPreferences.CREATION_DATE, type=Parameter.INTERNAL)
|
|
180 |
@Parameter(key=TXMPreferences.CREATION_DATE, type=Parameter.INTERNAL)
|
| 181 |
181 |
private Date creationDate;
|
| 182 |
182 |
|
| 183 |
183 |
/**
|
| ... | ... | |
| 186 |
186 |
@Parameter(key=TXMPreferences.LOCK, type=Parameter.INTERNAL)
|
| 187 |
187 |
protected boolean locked = false;
|
| 188 |
188 |
|
| 189 |
|
|
| 190 |
189 |
/**
|
| 191 |
190 |
* Current computing state.
|
| 192 |
191 |
* True if the result is in the process of computing (is in compute(,) method)
|
| ... | ... | |
| 194 |
193 |
*/
|
| 195 |
194 |
protected boolean computing = false;
|
| 196 |
195 |
|
| 197 |
|
|
| 198 |
196 |
/**
|
| 199 |
197 |
* Creates a new TXMResult, child of the specified parent.
|
| 200 |
198 |
* @param parent
|
| ... | ... | |
| 227 |
225 |
parent.addChild(this);
|
| 228 |
226 |
}
|
| 229 |
227 |
|
| 230 |
|
if (parametersNodePath == null) {
|
|
228 |
// no parametersNodePath -> new result
|
|
229 |
|
|
230 |
if (parametersNodePath == null) { // new object
|
| 231 |
231 |
if (this.getProject() != null) {
|
| 232 |
232 |
parametersNodePath = this.getProject().getParametersNodeRootPath();
|
| 233 |
233 |
}
|
| ... | ... | |
| 235 |
235 |
parametersNodePath = ""; //$NON-NLS-1$;
|
| 236 |
236 |
}
|
| 237 |
237 |
|
| 238 |
|
// no parametersNodePath -> new result
|
| 239 |
238 |
this.parametersNodePath = parametersNodePath + createUUID() + "_" + this.getClass().getSimpleName(); //$NON-NLS-1$;
|
| 240 |
|
try {
|
| 241 |
|
this.saveParameter(TBXPreferences.CREATION_DATE, ID_TIME_FORMAT.format(Calendar.getInstance().getTime()));
|
| 242 |
|
}
|
| 243 |
|
catch (Exception e) {
|
| 244 |
|
// TODO Auto-generated catch block
|
| 245 |
|
e.printStackTrace();
|
| 246 |
|
}
|
| 247 |
239 |
}
|
| 248 |
240 |
else {
|
| 249 |
241 |
this.parametersNodePath = parametersNodePath;
|
| ... | ... | |
| 296 |
288 |
// loads parameters from local result node, current command preferences or default command preferences
|
| 297 |
289 |
try {
|
| 298 |
290 |
this.autoLoadParametersFromAnnotations(); // auto fill from Parameter annotations
|
| 299 |
|
this.loadParameters(); // subclasses manual settings
|
|
291 |
this.loadParameters(); // subclasses manual settings
|
|
292 |
|
|
293 |
try {
|
|
294 |
if (creationDate == null) {
|
|
295 |
creationDate = Calendar.getInstance().getTime();
|
|
296 |
this.saveParameter(TBXPreferences.CREATION_DATE, ID_TIME_FORMAT.format(creationDate));
|
|
297 |
}
|
|
298 |
} catch (Exception e) {
|
|
299 |
// TODO Auto-generated catch block
|
|
300 |
e.printStackTrace();
|
|
301 |
}
|
| 300 |
302 |
} catch (Exception e) {
|
| 301 |
303 |
Log.severe("Fail to load " + parametersNodePath + "result: " + e); //$NON-NLS-1$ //$NON-NLS-2$
|
| 302 |
304 |
Log.printStackTrace(e);
|
| ... | ... | |
| 306 |
308 |
if (this.parent == null) {
|
| 307 |
309 |
Log.finest("Warning: the TXMResult of " + this.getClass() + " is attached to no parent. (uuid = " + this.parametersNodePath + ")"); //$NON-NLS-1$ //$NON-NLS-2$
|
| 308 |
310 |
}
|
| 309 |
|
|
| 310 |
311 |
}
|
| 311 |
312 |
|
| 312 |
313 |
/**
|