import org.eclipse.swt.widgets.Shell;
import org.tizen.emulator.manager.EmulatorManager.ManagerModeType;
import org.tizen.emulator.manager.logging.EMLogger;
-import org.tizen.emulator.manager.platform.CustomPlatform;
-import org.tizen.emulator.manager.platform.Platform;
import org.tizen.emulator.manager.platform.PlatformList;
+import org.tizen.emulator.manager.platform.Profile;
+import org.tizen.emulator.manager.platform.ProfileList;
import org.tizen.emulator.manager.resources.ColorResources;
import org.tizen.emulator.manager.resources.ImageResources;
import org.tizen.emulator.manager.resources.StringResources;
import org.tizen.emulator.manager.ui.dialog.AboutDialog;
-import org.tizen.emulator.manager.ui.tabfolder.PlatformTabFolder;
-import org.tizen.emulator.manager.ui.tabfolder.PlatformTabItem;
+import org.tizen.emulator.manager.ui.tabfolder.ProfileTabFolder;
+import org.tizen.emulator.manager.ui.tabfolder.ProfileTabItem;
import org.tizen.emulator.manager.ui.widgets.ImageButton;
import org.tizen.emulator.manager.vms.helper.CheckingRunningEmulator;
import org.tizen.emulator.manager.vms.helper.RefreshWorker;
}
}
- private ArrayList<PlatformTabItem> platformItems = new ArrayList<PlatformTabItem>(10);
- private static PlatformTabFolder tabFolder = null;
+ private ArrayList<ProfileTabItem> profileItems = new ArrayList<ProfileTabItem>(10);
+ private static ProfileTabFolder tabFolder = null;
private ImageButton resetButton = null;
private ImageButton infoButton = null;
private static StatusBar statusBar = null;
}
});
- tabFolder = new PlatformTabFolder(mainComposite);
+ tabFolder = new ProfileTabFolder(mainComposite);
statusBar = new StatusBar(mainComposite);
Composite tabComposite = tabFolder.getComposite();
barComposite.setLayoutData(data);
// add platform tab item
- for (Platform p : PlatformList.getPlatformList()) {
- platformItems.add(new PlatformTabItem(p, tabFolder, SWT.CENTER));
+ for (Profile p : ProfileList.getProfileList()) {
+ profileItems.add(new ProfileTabItem(p, tabFolder));
}
-
- // add custom tab
- for (CustomPlatform p : PlatformList.getCustomPlatform()) {
- platformItems.add(new PlatformTabItem(p, tabFolder, SWT.CENTER));
- }
-
+/*
// add all tab (tree view)
- platformItems.add(new PlatformTabItem(PlatformList.getTotalPlatform(),
- tabFolder, SWT.CENTER));
-
+ profileItems.add(new ProfileTabItem(ProfileList.getTotalProfile(), tabFolder));
+*/
resetButton = new ImageButton(tabFolder.getTabComposite(), SWT.PUSH);
resetButton.setImages(ImageResources.RESET_ICON_NOMAL.getImage(),
ImageResources.RESET_ICON_HOVER.getImage(),
}
public static void refreshVMPropertyList(boolean isClear) {
- PlatformList.settingVMPropertyList();
+ ProfileList.settingVMPropertyList();
CheckingRunningEmulator.refreshVMPropertyList();
RefreshWorker.refreshVMConnect();
static final StackLayout stackLayout = new StackLayout();
static DetailViewPage topViewPage;
private void setTopControl(DetailViewPage page) {
- if (isChnagePlatform || stackLayout.topControl != page.getComposite()) {
+ if (isChangeProfile || stackLayout.topControl != page.getComposite()) {
stackLayout.topControl = page.getComposite();
topViewPage = page;
page.resize(HEIGHT);
- isChnagePlatform = false;
+ isChangeProfile = false;
}
mainView.layout();
// mainView.layout(true,true);
public void widgetSelected(SelectionEvent e) {
if (itemButton.isSelection() && isTreeViewSelect) {
selectRadioButton(false);
- VMsMainView.getInstance().drawVMList(VMsMainView.getInstance().getCurrentImage());
+ VMsMainView.getInstance().drawVMList(VMsMainView.getInstance().getProfile());
}
}
public void widgetSelected(SelectionEvent e) {
if (treeButton.isSelection() && !isTreeViewSelect) {
selectRadioButton(true);
- VMsMainView.getInstance().drawVMList(VMsMainView.getInstance().getCurrentImage());
+ VMsMainView.getInstance().drawVMList(VMsMainView.getInstance().getProfile());
}
}
import org.tizen.emulator.manager.platform.BaseImage;
import org.tizen.emulator.manager.platform.Platform;
import org.tizen.emulator.manager.platform.Profile;
-import org.tizen.emulator.manager.platform.TotalPlatform;
import org.tizen.emulator.manager.resources.ColorResources;
import org.tizen.emulator.manager.resources.StringResources;
import org.tizen.emulator.manager.ui.dialog.MessageDialog;
}
this.currentProfile = profile;
- // TODO
- /*
- detailView.changeProfile();
+
+ detailView.changeProfile(); // TODO
listView.drawProfile(profile, isRefresh);
- */
+
}
public void resetProfile() {
}
public void drawVMList(int index) {
- if (currentPlatform == null) {
+ if (currentProfile == null) {
return;
} else {
- currentPlatform.setCurrentImageIndex(index); // for Tab switching
- drawVMList(currentPlatform.getImageList().get(index));
+ //currentPlatform.setCurrentImageIndex(index); // for Tab switching
+ drawVMList(currentProfile);
}
}
if (profile.getEmulatorList().isEmpty()) {
drawEmptyVMList();
} else {
- /* TODO
listView.drawVMList((currentProperty == null ? 0
- : profile.getEmulatorList().indexOf(currentProperty),
- false));
- */
+ : profile.getEmulatorList().indexOf(currentProperty)),
+ false);
}
}
// for launch emulator
public void drawDetailVM(int index) {
if (index < 0
- || index > currentImage.getVmsList().size()) {
+ || index > currentProfile.getEmulatorList().size()) {
return;
}
- drawDetailVM(currentImage.getVmsList().get(index), index);
+ drawDetailVM(currentProfile.getEmulatorList().get(index), index);
}
public void drawModifyVM(VMProperty property) {
}
public void drawCreateVM(boolean setFocus) {
- if (currentImage.getVmsList().isEmpty()) {
- listView.drawVMList(currentImage, -1, true);
+ if (currentProfile.getEmulatorList().isEmpty()) {
+ listView.drawVMList(-1, true);
}
- /*
- BaseImage image = (currentPlatform.getName().equals("custom"))
- ? null : currentImage;
- */
- drawCreateVM(currentImage, setFocus);
+
+ // TODO
+ drawCreateVM(currentProfile.getImageList().get(0), setFocus);
}
public void drawCreateVM(BaseImage image, boolean setFocus) {
public void drawCancelCreaetVM() {
isCreateMode = false;
- if (currentImage.getVmsList().isEmpty()) {
+ if (currentProfile.getEmulatorList().isEmpty()) {
listView.cancelModify(-1);
- if (currentPlatform == null || !(currentPlatform instanceof TotalPlatform)) {
- drawEmptyVMList();
- }
+ //TODO
+ //if (currentPlatform == null || !(currentPlatform instanceof TotalPlatform)) {
+ //drawEmptyVMList();
+ //}
} else {
if (currentProperty != null) {
- int i = currentImage.getVmsList().indexOf(currentProperty);
+ int i = currentProfile.getEmulatorList().indexOf(currentProperty);
listView.cancelModify(i);
//detailView.drawDetailVM(currentProperty);
} else {
import org.tizen.emulator.manager.logging.EMLogger;
import org.tizen.emulator.manager.platform.BaseImage;
import org.tizen.emulator.manager.platform.Platform;
-import org.tizen.emulator.manager.platform.PlatformList;
+import org.tizen.emulator.manager.platform.Profile;
+import org.tizen.emulator.manager.platform.ProfileList;
import org.tizen.emulator.manager.plugin.ExtensionItem;
import org.tizen.emulator.manager.plugin.PluginStringResources;
import org.tizen.emulator.manager.resources.ImageResources;
infoItemList = new ArrayList<InfoViewItemList>();
ExtensionItem item = null;
- for (Platform platform : PlatformList.getPlatformList()) {
- if (platform.getPlugin() != null) {
- item = platform.getPlugin().getExtensionItem(PluginStringResources.ItemFactory);
- if (item != null) {
- List<ItemList> templateList = new ArrayList<ItemList>();
- for (BaseImage image : platform.getImageList()) {
- ItemList template = image.getItemList();
- if (template != null) {
- templateList.add(template);
- infoItemList.add(new InfoViewItemList(item, this.getItemListComposite(),
- template, platform.getProfile(), image.getName(), false));
+ for (Profile profile : ProfileList.getProfileList()) {
+ for (Platform platform : profile.getPlatformList()) {
+ if (platform.getPlugin() != null) {
+ item = platform.getPlugin().getExtensionItem(PluginStringResources.ItemFactory);
+ if (item != null) {
+ List<ItemList> templateList = new ArrayList<ItemList>();
+ for (BaseImage image : profile.getImageList()) {
+ if (!image.getPlatform().equals(platform)) {
+ continue;
+ }
+ ItemList template = image.getItemList();
+ if (template != null) {
+ templateList.add(template);
+ infoItemList.add(new InfoViewItemList(item, this.getItemListComposite(),
+ template, platform.getProfile(), image.getName(), false));
+ }
}
- }
- // add itemlist for custom.
- for (Platform custom : PlatformList.getCustomPlatform()) {
- if (custom.getProfile().equals(platform.getProfile())) {
- infoItemList.add(new InfoViewItemList(item, this.getItemListComposite(),
- custom.getImageList().get(0).getItemList(), custom.getProfile(), null, true));
+ // TODO
+ // add itemlist for custom.
+ /*
+ for (Platform custom : PlatformList.getCustomPlatform()) {
+ if (custom.getProfile().equals(platform.getProfile())) {
+ infoItemList.add(new InfoViewItemList(item, this.getItemListComposite(),
+ custom.getImageList().get(0).getItemList(), custom.getProfile(), null, true));
+ }
}
+ */
}
}
}
import org.tizen.emulator.manager.platform.BaseImage;
import org.tizen.emulator.manager.platform.Platform;
import org.tizen.emulator.manager.platform.PlatformList;
+import org.tizen.emulator.manager.platform.Profile;
+import org.tizen.emulator.manager.platform.ProfileList;
import org.tizen.emulator.manager.plugin.ExtensionItem;
import org.tizen.emulator.manager.plugin.PluginStringResources;
import org.tizen.emulator.manager.resources.ImageResources;
"Failed to load template");
modifyItemList = new ArrayList<ModifyViewItemList>();
ExtensionItem item = null;
- for (Platform platform : PlatformList.getPlatformList()) {
- if (platform.getPlugin() != null) {
- item = platform.getPlugin().getExtensionItem(PluginStringResources.ItemFactory);
- if (item != null) {
- List<ItemList> templateList = new ArrayList<ItemList>();
- for (BaseImage image : platform.getImageList()) {
- ItemList template = image.getItemList();
- if (template != null) {
- templateList.add(template);
- modifyItemList.add(new ModifyViewItemList(item, this,
- template, platform.getProfile(), image.getName(), false));
+ for(Profile profile : ProfileList.getProfileList()) {
+ for (Platform platform : profile.getPlatformList()) {
+ if (platform.getPlugin() != null) {
+ item = platform.getPlugin().getExtensionItem(PluginStringResources.ItemFactory);
+ if (item != null) {
+ List<ItemList> templateList = new ArrayList<ItemList>();
+ for (BaseImage image : profile.getImageList()) {
+ if (!image.getPlatform().equals(platform)) {
+ continue;
+ }
+ ItemList template = image.getItemList();
+ if (template != null) {
+ templateList.add(template);
+ modifyItemList.add(new ModifyViewItemList(item, this,
+ template, platform.getProfile(), image.getName(), false));
+ }
}
- }
- // add itemlist for custom.
- for (Platform custom : PlatformList.getCustomPlatform()) {
- if (custom.getProfile().equals(platform.getProfile())) {
- modifyItemList.add(new ModifyViewItemList(item, this,
- custom.getImageList().get(0).getItemList(), custom.getProfile(), null, true));
+ // TODO
+ // add itemlist for custom.
+ /*
+ for (Platform custom : PlatformList.getCustomPlatform()) {
+ if (custom.getProfile().equals(platform.getProfile())) {
+ modifyItemList.add(new ModifyViewItemList(item, this,
+ custom.getImageList().get(0).getItemList(), custom.getProfile(), null, true));
+ }
}
+ */
}
}
}
createButton = null;
}
- resetPopupMenu(VMsMainView.getInstance().getCurrentImage().getSortType());
+ resetPopupMenu(VMsMainView.getInstance().getProfile().getSortType());
// clear
VMButtonFactory.clear();
@Override
public void drawEmptyVMList() {
- drawVMList(VMsMainView.getInstance().getCurrentImage(), 0, false);
+ drawVMList(0, false);
}
@Override