[Title] remove duplicated profile menu and disable valgrind in real device
authorJaewon Lim <jaewon81.lim@samsung.com>
Fri, 17 Aug 2012 07:07:10 +0000 (16:07 +0900)
committerJaewon Lim <jaewon81.lim@samsung.com>
Fri, 17 Aug 2012 07:07:10 +0000 (16:07 +0900)
[Type] bug fix
[Module] profiler
[Priority] major
[Jira#]
[Redmine#] 6034 6359
[Problem]
[Cause]
[Solution]
[TestCase]

org.eclipse.linuxtools.valgrind.launch.exe/plugin.xml
org.eclipse.linuxtools.valgrind.launch.exe/src/org/eclipse/linuxtools/valgrind/launch/TizenValgrindLaunchDelegate.java
package/pkginfo.manifest

index efcf5b5..1ab4199 100644 (file)
       </shortcut>
    </extension>
    <extension
-         point="org.eclipse.ui.actionSets">
-      <actionSet
-            id="org.eclipse.linuxtools.valgrind.launch.exe.actionSet1"
-            label="Profile Launch  Actions"
-            visible="true">
-         <action
-               class="org.eclipse.debug.internal.ui.actions.OpenProfileConfigurations"
-               id="org.eclipse.linuxtools.valgrind.launch.exe.OpenProfileConfigurations"
-               label="%launchConfigurations.label.0"
-               menubarPath="org.eclipse.ui.run/addisions"
-               pulldown="false"
-               style="push">
-         </action>
-         <action
-               class="org.eclipse.debug.internal.ui.actions.ProfileAsAction"
-               id="org.eclipse.linuxtools.valgrind.launch.exe.ProfileAsAction"
-               label="%launch.label.0"
-               menubarPath="org.eclipse.ui.run/addisions"
-               pulldown="true"
-               style="pulldown">
-         </action>
-         <action
-               class="org.eclipse.debug.internal.ui.actions.ProfileHistoryMenuAction"
-               id="org.eclipse.linuxtools.valgrind.launch.exe.ProfileHistoryMenuAction"
-               label="%launchHistory.label.0"
-               menubarPath="org.eclipse.ui.run/addisions"
-               pulldown="true"
-               style="pulldown">
-         </action>
-      </actionSet>
-   </extension>
-   <extension
          id="org.tizen.valgrind.tool"
          point="org.tizen.common.connection.tools">
       <tools
index 2825aec..a79b50f 100644 (file)
@@ -46,10 +46,12 @@ import org.eclipse.swt.widgets.Display;
 import org.eclipse.ui.PartInitException;
 import org.eclipse.ui.PlatformUI;
 import org.tizen.common.TizenPlatformConstants;
+import org.tizen.common.connection.ConnectionPlugin;
 import org.tizen.nativecommon.ProjectUtil;
 import org.tizen.nativecommon.launch.IProjectLaunchCommand;
 import org.tizen.nativecommon.launch.TizenLaunchDelegate;
 import org.tizen.nativecommon.launch.TizenLaunchMessages;
+import org.tizen.sdblib.IDevice;
 import org.tizen.sdblib.SdbShellProcess;
 
 public class TizenValgrindLaunchDelegate extends TizenLaunchDelegate {
@@ -74,10 +76,19 @@ public class TizenValgrindLaunchDelegate extends TizenLaunchDelegate {
 
        @Override
        public void launch(ILaunchConfiguration config, String mode,
-                       ILaunch launch, IProgressMonitor monitor) throws CoreException {
+                       ILaunch launch, IProgressMonitor monitor) throws CoreException
+       {
+               
                if (monitor == null)
                        monitor = new NullProgressMonitor();
                try {
+                       IDevice device = ConnectionPlugin.getDefault().getCurrentDevice();
+                       if(!device.isEmulator())
+                       {
+                               newCoreException(TizenLaunchMessages.CANNOT_LAUNCH,
+                                               new Exception("Valgrind profiling is available in emulator only."));
+                       }
+                       
                        monitor.beginTask(TizenLaunchMessages.LAUNCH_APPLICATION, 30);
 
                        activateProgressView();
@@ -101,7 +112,6 @@ public class TizenValgrindLaunchDelegate extends TizenLaunchDelegate {
                } finally {
                        monitor.done();
                }
-
        }
 
        protected void launchApplicationWithValgrind(ILaunch launch,
index 9c1a1a8..028eda1 100644 (file)
@@ -1,5 +1,5 @@
 Source:profiler-eplugin
-Version:0.2.12
+Version:0.2.13
 Maintainer:Jaewon Lim <jaewon81.lim@samsung.com>, Juyoung Kim
 
 Package:profiler-eplugin