org.eclipse.linuxtools.oprofile.ui,\r
org.eclipse.linuxtools.oprofile.ui.view,\r
org.eclipse.ui,\r
+ org.tizen.common.gom.launch,\r
org.tizen.nativecommon.launch,\r
org.tizen.nativecommon.launch.ui,\r
org.tizen.sdblib\r
package org.tizen.oprofile.launch;
-import org.eclipse.cdt.core.model.IBinary;
-import org.eclipse.core.resources.IProject;
import org.eclipse.core.runtime.CoreException;
+import org.eclipse.debug.core.ILaunchConfiguration;
import org.eclipse.debug.core.ILaunchConfigurationType;
import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
+import org.eclipse.debug.ui.DebugUITools;
import org.eclipse.debug.ui.IDebugUIConstants;
import org.eclipse.jface.viewers.ISelection;
import org.eclipse.linuxtools.oprofile.launch.OprofileLaunchMessages;
import org.eclipse.linuxtools.profiling.launch.ProfileLaunchPlugin;
import org.eclipse.linuxtools.profiling.launch.ProfileLaunchShortcut;
import org.eclipse.ui.IEditorPart;
-import org.tizen.nativecommon.launch.ui.shortcut.ITizenProfileLaunchShortcut;
+import org.tizen.common.gom.launch.GomLaunchData;
+import org.tizen.common.gom.launch.IGomSmartLaunchShortcut;
+import org.tizen.common.util.SWTUtil;
/**
* shortcut, where the ProfileLaunchShortcut has the logic to automatically
* find binaries and create a default launch if one doesn't exist.
*/
-public class NormalOprofileLaunchShortcut extends ProfileLaunchShortcut implements ITizenProfileLaunchShortcut{
+public class NormalOprofileLaunchShortcut extends ProfileLaunchShortcut implements IGomSmartLaunchShortcut {
public void launch(IEditorPart editor, String mode) {
int targetResult = ProfileLaunchPlugin.checkTarget();
// wc.setAttribute(ISMLCDTLaunchConstants.ATTR_SKIP_DOWNLOAD, false);
wc.setAttribute(IDebugUIConstants.ATTR_LAUNCH_IN_BACKGROUND, true);
}
-
- @Override
- public void profileLaunch(IBinary bin, String mode) {
- super.launch(bin, mode);
- }
-
- @Override
- public void profileLaunch(IProject project, String mode) {
+
+ public void smartLaunch(final GomLaunchData data) {
+ final ILaunchConfiguration configuration = createConfiguration(data.getProject(), data.getMode());
+ SWTUtil.syncExec(new Runnable()
+ {
+ @Override
+ public void run() {
+ DebugUITools.launch(configuration, data.getMode());
+ }
+ });
}
-
}
org.eclipse.debug.core,
org.eclipse.debug.ui,
org.eclipse.debug.ui.sourcelookup,
+ org.tizen.common.gom.launch,
org.tizen.nativecommon,
org.tizen.nativecommon.build,
org.tizen.nativecommon.launch,
import org.eclipse.ui.dialogs.TwoPaneElementSelector;
import org.tizen.common.util.ViewUtil;
import org.tizen.nativecommon.ProjectUtil;
-import org.tizen.nativecommon.launch.TizenLaunchConfigurationConstants;
import org.tizen.nativecommon.launch.LaunchUtils;
+import org.tizen.nativecommon.launch.TizenLaunchConfigurationConstants;
import org.tizen.sdblib.IDevice;
return config;
}
- private ILaunchConfiguration createConfiguration(IProject prj, String mode) {
+ protected ILaunchConfiguration createConfiguration(IProject prj, String mode) {
ILaunchConfiguration config = null;
try {
String projectName = prj.getName();
protected Shell getActiveWorkbenchShell() {
return ProfileLaunchPlugin.getActiveWorkbenchShell();
}
-
}
Bundle-RequiredExecutionEnvironment: JavaSE-1.6\r
Export-Package: org.eclipse.linuxtools.valgrind.launch\r
Import-Package: org.eclipse.cdt.managedbuilder.core,\r
+ org.tizen.common.gom.launch,\r
org.tizen.nativecommon.launch,\r
org.tizen.nativecommon.launch.ui,\r
org.tizen.sdblib\r
package org.eclipse.linuxtools.valgrind.launch;
-import org.eclipse.cdt.core.model.IBinary;
-import org.eclipse.core.resources.IProject;
import org.eclipse.core.runtime.CoreException;
+import org.eclipse.debug.core.ILaunchConfiguration;
import org.eclipse.debug.core.ILaunchConfigurationType;
import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
+import org.eclipse.debug.ui.DebugUITools;
import org.eclipse.debug.ui.IDebugUIConstants;
import org.eclipse.jface.viewers.ISelection;
import org.eclipse.linuxtools.profiling.launch.ProfileLaunchPlugin;
import org.eclipse.linuxtools.profiling.launch.ProfileLaunchShortcut;
import org.eclipse.ui.IEditorPart;
-import org.tizen.nativecommon.launch.ui.shortcut.ITizenProfileLaunchShortcut;
+import org.tizen.common.gom.launch.GomLaunchData;
+import org.tizen.common.gom.launch.IGomSmartLaunchShortcut;
+import org.tizen.common.util.SWTUtil;
-public class ValgrindLaunchShortcut extends ProfileLaunchShortcut implements ITizenProfileLaunchShortcut{
+public class ValgrindLaunchShortcut extends ProfileLaunchShortcut implements IGomSmartLaunchShortcut {
private boolean canInitialize; //bery 20090715
public void launch(IEditorPart editor, String mode) {
public boolean isCanInitialize() {
return canInitialize;
}
-
- @Override
- public void profileLaunch(IBinary bin, String mode) {
- super.launch(bin, mode);
- }
-
- @Override
- public void profileLaunch(IProject project, String mode) {
+
+ public void smartLaunch(final GomLaunchData data) {
+ final ILaunchConfiguration configuration = super.createConfiguration(data.getProject(), data.getMode());
+ SWTUtil.syncExec(new Runnable()
+ {
+ @Override
+ public void run() {
+ DebugUITools.launch(configuration, data.getMode());
+ }
+ });
}
}