public static ObjectFactory factory = new ObjectFactory();
// Override if need.
- public void makePropertyItemList(List<? extends IViewItem> list, PropertyList propertyList) {
+ public void makePropertyItemList(List<? extends IViewItem> list, PropertyList propertyList,
+ String profile, boolean isStandard) {
if (propertyList != null) {
List<IViewItem> itemList = (List<IViewItem>)list;
List<Item> propertyItemList = propertyList.getItem();
}
if (templateList.size() == 1) {
- makePropertyItemList(list, templateList.get(0).getPropertyList());
- makeDeviceItemList(list, templateList.get(0).getDeviceList());
+ ItemList item = templateList.get(0);
+ makePropertyItemList(list, item.getPropertyList(), item.getProfile(), false);
+ makeDeviceItemList(list, item.getDeviceList());
return;
}
for (int i=1 ; i < templateList.size() ; i++) {
addToBase(base,templateList.get(i));
}
- makePropertyItemList(list, base.getPropertyList());
+ makePropertyItemList(list, base.getPropertyList(), base.getProfile(), false);
makeDeviceItemList(list, base.getDeviceList());
}
}
DISABLE_ON_CREATE("disableOnCreate"),
HIDE_LABEL("hideLabel"),
DEFAULT_IF_EMPTY("defaultIfEmpty"),
- SPREAD_ON_START("spreadOnStart")
+ SPREAD_ON_START("spreadOnStart"),
+ PROFILE("profile")
;
private String name;
}
- private boolean checkBaseImageFile(String baseImagePath){
+ public static boolean checkBaseImageFile(String baseImagePath){
if (baseImagePath == null || baseImagePath.isEmpty()) {
return false;
}
protected Image INPUTBOX_ON_IMAGE = null;
protected static int COMBO_WIDTH = 105;
- private boolean useDefaultOnCreate = false;
- private String defaultOnCreate = null;
+ protected boolean useDefaultOnCreate = false;
+ protected String defaultOnCreate = null;
public ComboSubViewItem(LabelViewItem parentItem, Composite comp, Item template) {
super(parentItem, comp, template);
// TODO : temp name
ec.getBaseInformation().getDiskImage().setVersion("Standard");
}
- if (newVM.baseName != null) {
- ec.getBaseInformation().getDiskImage().setBase(newVM.baseName);
- }
} else {
ec.getBaseInformation().getDiskImage().setType("custom");
ec.getBaseInformation().setArchitecture(EmulatorVMList.getInstance().CustomArch);
}
+ if (newVM.baseName != null) {
+ ec.getBaseInformation().getDiskImage().setBase(newVM.baseName);
+ }
//
ec.getBaseInformation().getDiskImage().setProfile(newVM.profile);
}
}
+ if (newVM.baseName != null) { // baseName can be modified only in Custom VM.
+ if (!newVM.baseName.equals(oldVM.baseName)) {
+ property.getConfiguration().getBaseInformation().getDiskImage().setBase(newVM.baseName);
+ }
+ }
+
if (newVM.addOptions != null) {
if (oldVM.addOptions == null || !newVM.addOptions.equals(oldVM.addOptions)) {
property.getConfiguration().getUsability().setAdvancedOptions(newVM.addOptions);
if (baseImagePathName == null) {
baseImagePathName = template.getPropertyValue().baseImagePathName;
}
+ baseName = template.getConfiguration().getBaseInformation().getDiskImage().getBase();
}
} else {
isStandard = true;
return false;
}
+ if (this.baseName != null) {
+ if (dest.baseName == null
+ || (dest.baseName != null && !this.baseName.equals(dest.baseName))) {
+ return false;
+ }
+ } else {
+ if (dest.baseName != null) {
+ return false;
+ }
+ }
+
if (this.maxTouchCount != dest.maxTouchCount) {
return false;
}