import org.tizen.emulator.manager.ui.detail.item.OptionType;
import org.tizen.emulator.manager.vms.RESOLUTION;
import org.tizen.emulator.manager.vms.VMProperty;
+import org.tizen.emulator.manager.vms.option.IOption;
import org.tizen.emulator.manager.vms.option.IOptionFactory;
import org.tizen.emulator.manager.vms.xml.template.DeviceList;
import org.tizen.emulator.manager.vms.xml.template.Item;
import org.tizen.emulator.manager.vms.xml.template.ObjectFactory;
import org.tizen.emulator.manager.vms.xml.template.Option;
import org.tizen.emulator.manager.vms.xml.template.PropertyList;
-import org.tizen.emulator.manager.vms.option.IOption;
public class Platform {
// platform name = profile + version = profile-version
}
private void loadPlugin() {
- File pluginJar = new File(platformPath + File.separator
- + FilePathResources.getPlatformPluginsPath()
- + File.separator
- + PlatformStringResources.PluignFile);
+ File pluginDir = new File(platformPath + File.separator
+ + FilePathResources.getPlatformPluginsPath());
+ if(!pluginDir.isDirectory()) {
+ return;
+ }
+
+ File pluginJar = null;
+ File[] fileList = pluginDir.listFiles();
+ for (File file : fileList) {
+ if (file.getName().startsWith(PlatformStringResources.PluginFilePrefix) &&
+ file.getName().endsWith(".jar")) {
+ pluginJar = file;
+ break;
+ }
+ }
- if (pluginJar.exists()) {
+ if (pluginJar != null && pluginJar.exists()) {
plugin = EMPluginLoader.makePlugin(pluginJar);
if (plugin != null) {
plugin.setPlatform(this);
public static String OldMobileProfile = "phone";
public static String MobileProfile = "mobile";
- public static String PluignFile = "em-plugin.jar";
+ public static String PluginFilePrefix = "em-plugin";
public static String TemplateFile = "standard.xml";
public static String CONFIG_EXTENSION = "xml";
public static String TEMPLATE = "template";
try {
url = plugin.toURI().toURL();
} catch (MalformedURLException e) {
- EMLogger.getLogger().warning("Fail to load url from jar file: " + e.getMessage());
+ EMLogger.getLogger().warning("Failed to load url from jar file: " + e.getMessage());
return null;
}
try {
jarFile = new JarFile(plugin.getAbsolutePath());
} catch (IOException e) {
- EMLogger.addStaticLog("Faile to load plugin jar file: " + e.getMessage());
+ EMLogger.addStaticLog("Failed to load plugin jar file: " + e.getMessage());
}
if (jarFile != null) {
attr = jarFile.getManifest().getMainAttributes();
}
} catch (IOException e) {
- EMLogger.addStaticLog("Faile to load Manifest file: " + e.getMessage());
+ EMLogger.addStaticLog("Failed to load Manifest file: " + e.getMessage());
}
if (attr != null) {
try {
try {
classToLoad = Class.forName(pointClass, true, loader);
} catch (ClassNotFoundException e) {
- EMLogger.getLogger().warning("Fail to load point class jar file: " + e.getMessage());
+ EMLogger.getLogger().warning("Failed to load point class jar file: " + e.getMessage());
return null;
}
try {
return classToLoad.newInstance();
} catch (InstantiationException e) {
- EMLogger.getLogger().warning("Fail to create new instance from class: " + e.getMessage());
+ EMLogger.getLogger().warning("Failed to create new instance from class: " + e.getMessage());
} catch (IllegalAccessException e) {
- EMLogger.getLogger().warning("Fail to create new instance from class: " + e.getMessage());
+ EMLogger.getLogger().warning("Failed to create new instance from class: " + e.getMessage());
}
return null;