add platform parameter support
authorziv.chang <ziv.chang@intel.com>
Mon, 25 Nov 2013 02:13:17 +0000 (10:13 +0800)
committerziv.chang <ziv.chang@intel.com>
Mon, 25 Nov 2013 02:13:17 +0000 (10:13 +0800)
org.tizen.web.simulator/src/org/tizen/web/simulator/Simulator.java
org.tizen.web.simulator/src/org/tizen/web/simulator/SimulatorActionDelegate.java
org.tizen.web.simulator/src/org/tizen/web/simulator/launch/SimulatorApplicationDelegate.java
package/changelog
package/pkginfo.manifest

index 6d3a251..d93bd07 100644 (file)
@@ -47,6 +47,7 @@ import org.tizen.web.common.WebCommonActivator;
 import org.tizen.web.project.configuration.ConfiguratorFactory;
 import org.tizen.web.project.configuration.IW3CConfigurator;
 import org.tizen.web.simulator.preferences.Settings;
+import org.tizen.common.core.application.TizenProjectDescription;
 
 
 public class Simulator {
@@ -55,6 +56,7 @@ public class Simulator {
     public static final String pluginID = "org.tizen.web.simulator"; //$NON-NLS-1$
 
     public static final String CHROME_PARAM_URL = "?url="; //$NON-NLS-1$
+    public static final String PLATFORM_PARAM_URL = "&platform="; //$NON-NLS-1$
 
     public static final String INTERNAL_SIMULATOR_PATH = "/pkg/web/index.html"; //$NON-NLS-1$
 
@@ -85,7 +87,7 @@ public class Simulator {
         return null;
     }
 
-    public static Process launch(URL url) {
+    public static Process launch(URL url, IProject prj) {
         ChromeLauncher launcher = new ChromeLauncher();
 
         IPreferenceStore store = Activator.getDefault().getPreferenceStore();
@@ -109,8 +111,13 @@ public class Simulator {
         }
 
         try {
+            StringBuffer launchURL = new StringBuffer();
             TYPE type = store.getBoolean(Settings.APP_MODE) ? TYPE.APP : TYPE.URL;
-            return launcher.launch(getAppUrl(url, store), type);
+            TizenProjectDescription tprojectDesc = org.tizen.common.util.ProjectUtil.getTizenProjectDescription(prj);
+            launchURL.append(getAppUrl(url, store));
+            launchURL.append(PLATFORM_PARAM_URL);
+            launchURL.append(tprojectDesc.getPlatformName());
+            return launcher.launch(launchURL.toString(), type);
         } catch (Exception e) {
             DialogUtil.openErrorDialog(getShell(), "Error", String.format(Messages.msgErrLaunchFailed, chromeExecutable)); //$NON-NLS-1$
             return null;
@@ -152,7 +159,7 @@ public class Simulator {
         URL url;
         try {
             url = contentFile.getLocationURI().toURL();
-            return Simulator.launch(url);
+            return Simulator.launch(url, prj);
         } catch (MalformedURLException e) {
             DialogUtil.openErrorDialog(getShell(), "Error", Messages.msgErrURLConversion); //$NON-NLS-1$
             return null;
index 2cdd668..bab5f53 100644 (file)
@@ -47,7 +47,7 @@ public class SimulatorActionDelegate implements IWorkbenchWindowActionDelegate {
                URL url;
                try {
                        url = contentFile.getLocationURI().toURL();
-                       Simulator.launch(url);
+                       Simulator.launch(url, prj);
                } catch (MalformedURLException e) {
                        DialogUtil.openErrorDialog(Messages.msgErrURLConversion);
                }
index 5222003..e742c39 100644 (file)
@@ -86,7 +86,7 @@ LaunchConfigurationDelegate {
                {
                        url = file.getLocationURI().toURL();
                }
-            Simulator.launch( url );
+            Simulator.launch(url, prj);
         }
         catch ( final MalformedURLException e )
         {
@@ -96,7 +96,7 @@ LaunchConfigurationDelegate {
         {
                try
             {
-                   Simulator.launch( file.getLocationURI().toURL() );
+                   Simulator.launch(file.getLocationURI().toURL(), prj);
             }
                catch ( final MalformedURLException e1 )
             {
index 1530155..b621edf 100644 (file)
@@ -1,3 +1,6 @@
+* 2.0.8
+- Add platform parameter support
+== kh5325.kim <kh5325.kim@samsung.com> 2013-11-01
 * 2.0.7
 - Increased heap memory to 256m in package build-time
 == kh5325.kim <kh5325.kim@samsung.com> 2013-11-01
index 95a34d5..2f3ebda 100644 (file)
@@ -1,4 +1,4 @@
-Version:2.0.7
+Version:2.0.8
 Maintainer:hyeongseok heo <hyeong-seok.heo@samsung.com>, gyeongseok seo <gyeongseok.seo@samsung.com>, jihoon song <jihoon80.song@samsung.com>, changhyun lee <changhyun1.lee@samsung.com>, bonyong lee <bonyong.lee@samsung.com>
 
 Package:websimulator-eplugin