summaryrefslogtreecommitdiff
path: root/org.tizen.common.gom/src
diff options
context:
space:
mode:
authorkh5325.kim <kh5325.kim@samsung.com>2013-07-04 17:05:45 +0900
committerkh5325.kim <kh5325.kim@samsung.com>2013-07-04 17:05:45 +0900
commit1558ff568225851509f85161cf0d46137aa1d94c (patch)
tree02f53bfaa9c6bc271d0edd4e9e47275b8005d031 /org.tizen.common.gom/src
parentd71a5019ddae30222b6871cf8086436818ef9bd9 (diff)
downloadcommon-eplugin-1558ff568225851509f85161cf0d46137aa1d94c.tar.gz
common-eplugin-1558ff568225851509f85161cf0d46137aa1d94c.tar.bz2
common-eplugin-1558ff568225851509f85161cf0d46137aa1d94c.zip
Upload tizen_2.2 source
Change-Id: I2062ca0b844e24c1d9dd5b1f9076af3367ac8cfa
Diffstat (limited to 'org.tizen.common.gom/src')
-rw-r--r--org.tizen.common.gom/src/org/tizen/common/gom/launch/GomLaunchData.java23
-rw-r--r--org.tizen.common.gom/src/org/tizen/common/gom/smartlaunch/GomSmartLauncher.java4
-rw-r--r--org.tizen.common.gom/src/org/tizen/common/gom/smartlaunch/handler/GomSmartLaunchCycleHandler.java6
-rw-r--r--org.tizen.common.gom/src/org/tizen/common/gom/smartlaunch/messages/GomMessages.java5
-rw-r--r--org.tizen.common.gom/src/org/tizen/common/gom/smartlaunch/messages/GomMessages.properties7
5 files changed, 27 insertions, 18 deletions
diff --git a/org.tizen.common.gom/src/org/tizen/common/gom/launch/GomLaunchData.java b/org.tizen.common.gom/src/org/tizen/common/gom/launch/GomLaunchData.java
index c919a04c4..3e5223c87 100644
--- a/org.tizen.common.gom/src/org/tizen/common/gom/launch/GomLaunchData.java
+++ b/org.tizen.common.gom/src/org/tizen/common/gom/launch/GomLaunchData.java
@@ -32,10 +32,10 @@ import org.eclipse.debug.core.ILaunchConfiguration;
import org.eclipse.debug.internal.ui.launchConfigurations.LaunchShortcutExtension;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
+import org.tizen.common.gom.smartlaunch.GomSmartLauncher;
import org.tizen.common.launch.ITizenLaunchConfiguration;
import org.tizen.common.launch.ITizenNativeLaunchConfiguration;
import org.tizen.common.launch.ITizenWebLaunchConfiguration;
-import org.tizen.common.gom.smartlaunch.GomSmartLauncher;
import org.tizen.sdblib.IDevice;
import org.tizen.sdblib.SmartDevelopmentBridge;
@@ -69,27 +69,20 @@ public class GomLaunchData {
launchConfigurationName = launchConfiguration.getName();
mode = launch.getLaunchMode();
this.device = null;
- String device_name = null;
+ String config_device_id = null;
try {
- device_name = launchConfiguration.getAttribute(GomSmartLauncher.ATTR_CONFIG_DEVICE_NAME,
- GomSmartLauncher.ATTR_CONFIG_NO_DEVICE);
+ config_device_id = launchConfiguration.getAttribute(GomSmartLauncher.ATTR_CONFIG_DEVICE_ID,
+ GomSmartLauncher.ATTR_CONFIG_NO_DEVICE);
} catch (CoreException e) {
- logger.error("Fail to get device name", e);
+ logger.error("Fail to get device id", e);
}
-
ITizenLaunchConfiguration launchConfigurationAdapter = null;
- if(!GomSmartLauncher.ATTR_CONFIG_NO_DEVICE.equals(device_name))
+ if(!GomSmartLauncher.ATTR_CONFIG_NO_DEVICE.equals(config_device_id))
{
launchConfigurationAdapter = (ITizenNativeLaunchConfiguration) launchConfiguration.getAdapter(ITizenNativeLaunchConfiguration.class);
IDevice[] devices = SmartDevelopmentBridge.getBridge().getDevices();
- for(IDevice device : devices)
- {
- if(device_name.equals(device.getDeviceName()))
- {
- this.device = device;
- }
- }
+ this.device = ((ITizenNativeLaunchConfiguration)launchConfigurationAdapter).getDeviceFromLaunchConfiguration(devices);
} else {
launchConfigurationAdapter = (ITizenWebLaunchConfiguration) launchConfiguration.getAdapter(ITizenWebLaunchConfiguration.class);
}
@@ -114,7 +107,7 @@ public class GomLaunchData {
public String getDataInfo()
{
if(device != null) {
- return launchConfiguration.getName() + " on " + device.getDeviceName();
+ return launchConfiguration.getName() + " on " + (device.isEmulator() ? device.getDeviceName() : device.getSerialNumber());
} else {
return launchConfiguration.getName();
}
diff --git a/org.tizen.common.gom/src/org/tizen/common/gom/smartlaunch/GomSmartLauncher.java b/org.tizen.common.gom/src/org/tizen/common/gom/smartlaunch/GomSmartLauncher.java
index a88ca9690..a20affca5 100644
--- a/org.tizen.common.gom/src/org/tizen/common/gom/smartlaunch/GomSmartLauncher.java
+++ b/org.tizen.common.gom/src/org/tizen/common/gom/smartlaunch/GomSmartLauncher.java
@@ -46,7 +46,9 @@ import org.tizen.sdblib.IDevice;
public class GomSmartLauncher {
- public static final String ATTR_CONFIG_DEVICE_NAME = "org.tizen.common.launch.device.name";
+ public static final String ATTR_CONFIG_DEVICE_ID = "org.tizen.common.launch.device.id";
+ public static final String ATTR_CONFIG_DEVICE_IS_EMULATOR = "org.tizen.common.launch.device.emulator";
+
public static final String ATTR_CONFIG_NO_DEVICE = "";
private final static Logger logger = LoggerFactory.getLogger(GomSmartLauncher.class);
diff --git a/org.tizen.common.gom/src/org/tizen/common/gom/smartlaunch/handler/GomSmartLaunchCycleHandler.java b/org.tizen.common.gom/src/org/tizen/common/gom/smartlaunch/handler/GomSmartLaunchCycleHandler.java
index 4e52ed053..afa616848 100644
--- a/org.tizen.common.gom/src/org/tizen/common/gom/smartlaunch/handler/GomSmartLaunchCycleHandler.java
+++ b/org.tizen.common.gom/src/org/tizen/common/gom/smartlaunch/handler/GomSmartLaunchCycleHandler.java
@@ -51,12 +51,16 @@ import org.eclipse.ui.internal.WorkbenchPage;
import org.tizen.common.gom.launch.GomLaunchData;
import org.tizen.common.gom.smartlaunch.GomSmartLaunchManager;
import org.tizen.common.gom.smartlaunch.GomSmartLauncher;
+import org.tizen.common.gom.smartlaunch.messages.GomMessages;
import org.tizen.sdblib.IDevice;
@SuppressWarnings("restriction")
public class GomSmartLaunchCycleHandler extends CycleBaseHandler {
- private String[] columns = {"Mode", "Project", "LaunchConfiguration", "DeviceName"};
+ private String[] columns = {GomMessages.SMARTLAUNCH_CYCLE_COLUMNS_1,
+ GomMessages.SMARTLAUNCH_CYCLE_COLUMNS_2,
+ GomMessages.SMARTLAUNCH_CYCLE_COLUMNS_3,
+ GomMessages.SMARTLAUNCH_CYCLE_COLUMNS_4};
private String[] sampleColumns = {"Profile", "ProjectProject", "LaunchConfigurationLaunchConfiguration", "emulator-xxxxx"};
private final String TIZEN_SMART_LAUNCH_UP_ID="org.tizen.common.gom.smartlaunch.ui.tizensmartlauncher.up";
diff --git a/org.tizen.common.gom/src/org/tizen/common/gom/smartlaunch/messages/GomMessages.java b/org.tizen.common.gom/src/org/tizen/common/gom/smartlaunch/messages/GomMessages.java
index 868583dac..271d460ae 100644
--- a/org.tizen.common.gom/src/org/tizen/common/gom/smartlaunch/messages/GomMessages.java
+++ b/org.tizen.common.gom/src/org/tizen/common/gom/smartlaunch/messages/GomMessages.java
@@ -48,4 +48,9 @@ public class GomMessages extends NLS{
public static String SMARTLAUNCH_NEW_DIALOG_INVALID_NAME;
public static String SMARTLAUNCH_NEW_DIALOG_NO_NAME;
+
+ public static String SMARTLAUNCH_CYCLE_COLUMNS_1;
+ public static String SMARTLAUNCH_CYCLE_COLUMNS_2;
+ public static String SMARTLAUNCH_CYCLE_COLUMNS_3;
+ public static String SMARTLAUNCH_CYCLE_COLUMNS_4;
}
diff --git a/org.tizen.common.gom/src/org/tizen/common/gom/smartlaunch/messages/GomMessages.properties b/org.tizen.common.gom/src/org/tizen/common/gom/smartlaunch/messages/GomMessages.properties
index e032459d3..e862facdf 100644
--- a/org.tizen.common.gom/src/org/tizen/common/gom/smartlaunch/messages/GomMessages.properties
+++ b/org.tizen.common.gom/src/org/tizen/common/gom/smartlaunch/messages/GomMessages.properties
@@ -11,4 +11,9 @@ SMARTLAUNCH_NEW_DIALOG_BUILD_CONFIGURATION=&Build configuration:
SMARTLAUNCH_NEW_DIALOG_MODE=Launch &Mode:
SMARTLAUNCH_NEW_DIALOG_CONFIGURATION_TYPE=&Type:
SMARTLAUNCH_NEW_DIALOG_INVALID_NAME=Invalid characters(\\/:*?\<>|) in a configuration name
-SMARTLAUNCH_NEW_DIALOG_NO_NAME=A name is required for the configuration \ No newline at end of file
+SMARTLAUNCH_NEW_DIALOG_NO_NAME=A name is required for the configuration
+
+SMARTLAUNCH_CYCLE_COLUMNS_1=Mode
+SMARTLAUNCH_CYCLE_COLUMNS_2=Project
+SMARTLAUNCH_CYCLE_COLUMNS_3=LaunchConfiguration
+SMARTLAUNCH_CYCLE_COLUMNS_4=DeviceId \ No newline at end of file