[Title] Show debug menus of platform application in only Tizen-Platform
authordonghyuk.yang <donghyuk.yang@samsung.com>
Mon, 12 Nov 2012 02:41:47 +0000 (11:41 +0900)
committerdonghyuk.yang <donghyuk.yang@samsung.com>
Mon, 12 Nov 2012 02:41:47 +0000 (11:41 +0900)
perspective

org.tizen.nativeplatform/plugin.xml
org.tizen.nativeplatform/src/org/tizen/nativeplatform/launch/TizenDebianLaunchDelegate.java
org.tizen.nativeplatform/src/org/tizen/nativeplatform/launch/ui/TizenDebianMainTab.java
org.tizen.nativeplatform/src/org/tizen/nativeplatform/launch/wizards/PlatformLaunchSettingAppPage.java

index 0394dd2..e0e3ba3 100644 (file)
             class="org.tizen.nativeplatform.launch.ui.shortcut.TizenDebianProjectLaunchShortcut"
             id="org.tizen.nativeplatform.launch.ui.shortcut.TizenDebianProjectLaunchShortcut">
         <contextualLaunch>
-            <enablement>
-                <with variable="selection">
-                    <count value="1"/>
-                    <iterate>
-                        <or>
-                            <and>
-                                <instanceof value="org.eclipse.ui.IFileEditorInput"/>
-                                <adapt type="org.eclipse.core.resources.IResource">
-                                       <test
-                                    forcePluginActivation="true"
-                                   property="org.tizen.nativeplatform.launch.ui.shortcut.belongTizenCustomDebianProject"/>
-                                </adapt>
-                            </and>
-                            <and>
-                                <instanceof value="org.eclipse.core.resources.IProject"/>
-                                <test
-                                    forcePluginActivation="true"
-                                    property="org.tizen.nativeplatform.launch.ui.shortcut.isTizenCustomDebianProject"/>
-                            </and>
-                        </or>
-                    </iterate>
-                </with>
-            </enablement>
+                       <enablement>
+                               <and>                   
+                       <with variable="selection">
+                           <count value="1"/>
+                           <iterate>
+                               <or>
+                                   <and>
+                                       <instanceof value="org.eclipse.ui.IFileEditorInput"/>
+                                       <adapt type="org.eclipse.core.resources.IResource">
+                                              <test
+                                           forcePluginActivation="true"
+                                          property="org.tizen.nativeplatform.launch.ui.shortcut.belongTizenCustomDebianProject"/>
+                                       </adapt>
+                                   </and>
+                                   <and>
+                                       <instanceof value="org.eclipse.core.resources.IProject"/>
+                                       <test
+                                           forcePluginActivation="true"
+                                           property="org.tizen.nativeplatform.launch.ui.shortcut.isTizenCustomDebianProject"/>
+                                   </and>
+                               </or>
+                           </iterate>
+                       </with>
+                                       <with variable="activeWorkbenchWindow.activePerspective">
+                                               <equals value="org.tizen.nativeplatform.perspective"/>                    
+                                       </with>
+                               </and>                                                                                  
+                       </enablement>                                       
         </contextualLaunch>
         <description
             mode="run"
             class="org.tizen.nativeplatform.launch.ui.shortcut.TizenDebianProjectAttachLaunchShortcut"
             id="org.tizen.nativeplatform.launch.ui.shortcut.TizenDebianProjectAttachLaunchShortcut">
         <contextualLaunch>
-            <enablement>
-                <with variable="selection">
-                    <count value="1"/>
-                    <iterate>
-                        <or>
-                            <and>
-                                <instanceof value="org.eclipse.ui.IFileEditorInput"/>
-                                <adapt type="org.eclipse.core.resources.IResource">
-                                       <test
-                                    forcePluginActivation="true"
-                                    property="org.tizen.nativeplatform.launch.ui.shortcut.belongTizenCustomDebianProject"/>
-                                </adapt>
-                            </and>
-                            <and>
-                                <instanceof value="org.eclipse.core.resources.IProject"/>
-                                <test
-                                    forcePluginActivation="true"
-                                    property="org.tizen.nativeplatform.launch.ui.shortcut.isTizenCustomDebianProject"/>
-                            </and>
-                        </or>
-                    </iterate>
-                </with>
-            </enablement>
+                       <enablement>
+                               <and>
+                       <with variable="selection">
+                           <count value="1"/>
+                           <iterate>
+                               <or>
+                                   <and>
+                                       <instanceof value="org.eclipse.ui.IFileEditorInput"/>
+                                       <adapt type="org.eclipse.core.resources.IResource">
+                                              <test
+                                           forcePluginActivation="true"
+                                           property="org.tizen.nativeplatform.launch.ui.shortcut.belongTizenCustomDebianProject"/>
+                                       </adapt>
+                                   </and>
+                                   <and>
+                                       <instanceof value="org.eclipse.core.resources.IProject"/>
+                                       <test
+                                           forcePluginActivation="true"
+                                           property="org.tizen.nativeplatform.launch.ui.shortcut.isTizenCustomDebianProject"/>
+                                   </and>
+                               </or>
+                           </iterate>
+                       </with>
+                       <with variable="activeWorkbenchWindow.activePerspective">
+                           <equals value="org.tizen.nativeplatform.perspective"/>                    
+                       </with>
+                               </and>                  
+            </enablement>                  
         </contextualLaunch>
         <description
             mode="debug"
             id="org.tizen.nativeapp.launch.ui.shortcut.TizenDebianProjectCoredumpLaunchShortcut">
         <contextualLaunch>
             <enablement>
-                <with variable="selection">
-                    <count value="1"/>
-                    <iterate>
-                        <or>
-                            <and>
-                                <instanceof value="org.eclipse.ui.IFileEditorInput"/>
-                                <adapt type="org.eclipse.core.resources.IResource">
-                                       <test
-                                    forcePluginActivation="true"
-                                    property="org.tizen.nativeplatform.launch.ui.shortcut.belongTizenCustomDebianProject"/>
-                                </adapt>
-                            </and>
-                            <and>
-                                <instanceof value="org.eclipse.core.resources.IProject"/>
-                                <test
-                                    forcePluginActivation="true"
-                                    property="org.tizen.nativeplatform.launch.ui.shortcut.isTizenCustomDebianProject"/>
-                            </and>
-                        </or>
-                    </iterate>
-                </with>
+                               <and>            
+                       <with variable="selection">
+                           <count value="1"/>
+                           <iterate>
+                               <or>
+                                   <and>
+                                       <instanceof value="org.eclipse.ui.IFileEditorInput"/>
+                                       <adapt type="org.eclipse.core.resources.IResource">
+                                              <test
+                                           forcePluginActivation="true"
+                                           property="org.tizen.nativeplatform.launch.ui.shortcut.belongTizenCustomDebianProject"/>
+                                       </adapt>
+                                   </and>
+                                   <and>
+                                       <instanceof value="org.eclipse.core.resources.IProject"/>
+                                       <test
+                                           forcePluginActivation="true"
+                                           property="org.tizen.nativeplatform.launch.ui.shortcut.isTizenCustomDebianProject"/>
+                                   </and>
+                               </or>
+                           </iterate>
+                       </with>
+                                       <with variable="activeWorkbenchWindow.activePerspective">
+                                               <equals value="org.tizen.nativeplatform.perspective"/>                    
+                                       </with>
+                               </and>                                  
             </enablement>
         </contextualLaunch>
         <description
index b9e7a66..53eeab1 100644 (file)
@@ -236,8 +236,7 @@ public class TizenDebianLaunchDelegate extends AbstractCLaunchDelegate {
        final ArrayList<LocalPackage> platformPkgs = launchUtils.getProjectPackages(platformProject, buildConfigName);          
                if (platformPkgs.isEmpty()) {
                        String msg = String.format("\"%s\" project does not have package files(*.rpm)\n" +
-                               "Do you want packaging now ?\n" +
-                               "[%s]", platformProject.getName(), buildConfigName);
+                               "Do you want packaging now ?\n", platformProject.getName());
                if (64 == DialogUtil.openQuestionDialog(msg)) {
                        if (packagingProject(platformProject, buildConfig, new SubProgressMonitor(monitor, 1))) {
                                platformPkgs.addAll(launchUtils.getProjectPackages(platformProject, buildConfigName));
@@ -257,8 +256,7 @@ public class TizenDebianLaunchDelegate extends AbstractCLaunchDelegate {
                        
                        if (appPkgs.isEmpty()) {
                                String msg = String.format("\"%s\" project does not have package files(*.rpm)\n" +
-                                       "Do you want packaging now ?\n" +
-                                       "[%s]", appProject.getName(), buildConfigName);
+                                       "Do you want packaging now ?\n", appProject.getName());
                        if (64 == DialogUtil.openQuestionDialog(msg)) {
                                if (packagingProject(appProject, buildConfig, new SubProgressMonitor(monitor, 1))) {
                                        appPkgs.addAll(launchUtils.getProjectPackages(appProject, buildConfigName));
index ff13eb3..b013f21 100644 (file)
@@ -141,10 +141,10 @@ public class TizenDebianMainTab extends CMainTab {
                GridLayout topLayout = new GridLayout();
                comp.setLayout(topLayout);
 
-               createVerticalSpacer(comp, 1);
-               createExeFileField(comp, 1);
+               createVerticalSpacer(comp, 1);          
                createProjectGroup(comp, 1);
                createAppProjectGroup(comp, 1);
+               createExeFileField(comp, 1);
                createExtraTableGroup(comp);
                createOptionGroupComposite(comp);
                
@@ -351,7 +351,7 @@ public class TizenDebianMainTab extends CMainTab {
                projComp.setLayoutData(gd);
 
                fProjLabel = new Label(projComp, SWT.NONE);
-               fProjLabel.setText("Test Application Project:"); 
+               fProjLabel.setText("Tizen Application Project:"); 
                gd = new GridData();
                gd.horizontalSpan = 2;
                fProjLabel.setLayoutData(gd);
index 8779990..e98f53f 100644 (file)
@@ -108,8 +108,8 @@ public class PlatformLaunchSettingAppPage extends WizardPage {
         
         setPlatformPackages();
         setProjectMap();
-       }
-       
+       }       
+
        public void setPlatformPackages() {
                platformPackages.clear();
                PlatformLaunchUtils launchUtils = new PlatformLaunchUtils();
@@ -117,8 +117,7 @@ public class PlatformLaunchSettingAppPage extends WizardPage {
                
         if (platformPackages.isEmpty()) {
                String msg = String.format("\"%s\" project does not have package files(*.rpm)\n" +
-                               "Do you want packaging now ?\n" +
-                               "[%s]", platformProject.getName(), config.getName());
+                               "Do you want packaging now ?", platformProject.getName());
                if (64 == DialogUtil.openQuestionDialog(msg)) {
                        if (packagingProject(platformProject)) {
                                setPlatformPackages();
@@ -135,8 +134,7 @@ public class PlatformLaunchSettingAppPage extends WizardPage {
                appPackages = launchUtils.getProjectPackages(appProj, config.getName());
                if (appPackages.isEmpty()) {
                String msg = String.format("\"%s\" project does not have package files(*.rpm)\n" +
-                               "Do you want packaging now ?\n" +
-                               "[%s]", appProj.getName(), config.getName());
+                               "Do you want packaging now ?\n", appProj.getName());
                if (64 == DialogUtil.openQuestionDialog(msg)) {
                        if (packagingProject(appProj)) {
                                setAppPackages(appProj);
@@ -187,7 +185,7 @@ public class PlatformLaunchSettingAppPage extends WizardPage {
                createTableGroupComposite(composite);
                createOptionGroupComposite(composite);
                
-               setControl(composite);
+               setControl(composite);  
        }       
        
        private void createOptionGroupComposite(Composite parent) {