private BadaBuildOption LoadOption(IProject project) { // using manifest.xml boolean bUseManifest = BadaBuildOptionLoader.useManifest(); ManifestXmlStore maniStore = new ManifestXmlStore(project); String cpuType = ""; if (maniStore != null) cpuType = maniStore.getCpu(); BadaBuildOption option = null; if (optionMap == null) optionMap = BadaBuildOptionLoader.load(); if (optionMap != null && optionMap.size() > 0) { String model = null; if (bUseManifest) // using manifest.xml model = cpuType; else // using directory name as model model = IdePlugin.getDefault().getModel(project); if (model != null && model.length() > 0) { if (model.indexOf("_") > 0) model = model.substring(0, model.indexOf("_")); option = (BadaBuildOption) optionMap.get(model); if (option == null) { // if the first character of model folder is lower case String model2 = model.substring(0, 1).toUpperCase() + model.substring(1); option = (BadaBuildOption) optionMap.get(model2); } if (option != null) return option; } option = (BadaBuildOption) optionMap.get(MODEL_DEFAULT); if (option != null) return option; } return BadaBuildOptionLoader.getGeneralOption(); }
public BasicSettingPage() { super("BasicSettingPage"); // TODO Auto-generated constructor stub setTitle("Basic Settings"); setDescription("Define the basic properties of the project."); setImageDescriptor(IdePlugin.getDefault().createImageDescriptor(IConstants.IMG_WIZARD)); fNameStatus = new StatusInfo(); }