this.name = name;
initLastCreatedPropertyPath();
+ // XXX remove if there is no listener in console mode.
+ if (EmulatorManager.isConsoleMode()) {
+ return;
+ }
+
VMKeeper.addListChangeListener(new ListChangeListener<VMProperty>() {
@Override
public void elementRemoved(VMProperty property) {
configuration.setConfiguration(element);
}
- if (value != null) {
- value.settingConfigure(this);
+ value = new VMPropertyValue(this);
+
+ // Each platform has default-property and it doesn't have name.
+ if (value.vmsName == null) {
+ return;
}
- if (configuration.getName() != null) {
- Path logFile = Paths.get(VMLogUtil.getEmulatorLogPath(configuration.getName()));
- if (Files.exists(logFile)) {
- try {
- lastLaunched = Files.getLastModifiedTime(logFile).toMillis();
- } catch (IOException e) {
- e.printStackTrace();
- }
- } else {
- lastLaunched = 0;
+ Path logFile = Paths.get(VMLogUtil.getEmulatorLogPath(value.vmsName));
+ if (Files.exists(logFile)) {
+ try {
+ lastLaunched = Files.getLastModifiedTime(logFile).toMillis();
+ } catch (IOException e) {
+ e.printStackTrace();
}
+ } else {
+ lastLaunched = 0;
}
};
}
public VMPropertyValue getPropertyValue() {
- if(this.value == null) {
- this.value = new VMPropertyValue(this);
- }
-
+ assert value != null;
return value;
}