settingImagePath(path);
initLastCreatedPropertyPath();
loadTemplate();
- setOptionList(platform.loadOptionList(getItemList()));
}
public List<IOption> getOptionList() {
+ if (optionList == null) {
+ optionList = platform.loadOptionList(getItemList());
+ }
return optionList;
}
- public void setOptionList(List<IOption> optionList) {
- this.optionList = optionList;
- }
-
public VMProperty getDefaultProperty() {
return defaultProperty;
}
}
// Load option list for each image.
- public void loadOptionList() {
- if (plugin != null) {
- ExtensionItem exItem = getPlugin().getExtensionItem(PluginStringResources.OptionFactory);
- IOptionFactory f = (IOptionFactory)(exItem.createClass());
- if (f != null) {
- for (BaseImage img : imageList) {
- img.setOptionList(f.makeOptionList(img.getItemList()));
- }
- }
- }
- }
-
- // Load option list for each image.
public List<IOption> loadOptionList(ItemList itemTemplate) {
if (plugin != null) {
ExtensionItem exItem = getPlugin().getExtensionItem(PluginStringResources.OptionFactory);
return null;
}
- // Load option list for each image.
+ // Load option list for custom image
public List<IOption> getCustomOptionList() {
if (customOptionList == null) {
if (plugin != null) {
checkLastCreatedPropertyFile();
// Load option list
- loadOptionList();
- }
-
- private static void loadOptionList() {
- for (Platform p : platformList) {
- p.loadOptionList();
- }
- for (Platform cp : customList) {
- cp.loadOptionList();
- }
+ //loadOptionList();
}
private static void addProfile(String profile) {
return totalProfile;
}
+ public static Profile findProfile(String profileName) {
+ if (profileList == null) {
+ initProfileList();
+ }
+
+ for (Profile profile : profileList) {
+ if (profile.getName().equals(profileName)) {
+ return profile;
+ }
+ }
+
+ return null;
+ }
+
private static void initProfileList() {
profileList = new ArrayList<Profile>();