private void initializePlatform(Profile profile, EMPlugin plugin) {
this.profileClass = profile;
this.profile = profile.getName();
+ this.plugin = plugin;
this.version = plugin.getAttribute(PluginStringResources.PlatformVersion);
this.platformName = plugin.getPlatformName();
this.platformPath = plugin.getPlatformPath();
- this.emulatorPath = plugin.getAttribute(PluginStringResources.EmulatorDir);
- if (this.emulatorPath == null) {
- this.emulatorPath = FilePathResources.getPlatformEmulatorPath(version);
- }
- this.plugin = plugin;
+ this.emulatorPath = makingEmulatorDir();
loadSkins();
loadPlugin();
loadTemplate();
}
+ private String makingEmulatorDir() {
+ String path = plugin.getAttribute(PluginStringResources.EmulatorDir);
+ if (path != null) {
+ File file = new File(path);
+ if (!file.isAbsolute()) {
+ path = FilePathResources.getSdkRoot() + File.separator + path;
+ }
+ } else {
+ path = FilePathResources.getPlatformEmulatorPath(version);
+ }
+ return path;
+ }
+
public String getName() {
return platformName;
}