Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -48,12 +48,23 @@ public Object execute(ExecutionEvent event) throws ExecutionException
{
ILaunchBarManager launchBarManager = UIPlugin.getService(ILaunchBarManager.class);
new StopLaunchBuildHandler().stop();

ILaunchConfiguration config = launchBarManager.getActiveLaunchConfiguration();
if (config == null)
{
return Status.OK_STATUS;
}

boolean isEspLaunchConfig = config.getType().getIdentifier()
.contentEquals(IDFLaunchConstants.RUN_LAUNCH_CONFIG_TYPE);
boolean isEspDebugConfig = config.getType().getIdentifier()
.contentEquals(IDFLaunchConstants.DEBUG_LAUNCH_CONFIG_TYPE);

if (!isEspLaunchConfig && !isEspDebugConfig)
{
return super.execute(event);
}

ILaunchMode launchMode = launchBarManager.getActiveLaunchMode();
if (launchMode == null)
{
Expand All @@ -74,8 +85,7 @@ public Object execute(ExecutionEvent event) throws ExecutionException
}
return Status.CANCEL_STATUS;
}
if (launchMode.getIdentifier().equals(ILaunchManager.DEBUG_MODE)
&& config.getType().getIdentifier().contentEquals(IDFLaunchConstants.RUN_LAUNCH_CONFIG_TYPE))
if (launchMode.getIdentifier().equals(ILaunchManager.DEBUG_MODE) && isEspLaunchConfig)
{
List<String> suitableDescNames = findSuitableDescNames(projectName,
IDFLaunchConstants.DEBUG_LAUNCH_CONFIG_TYPE);
Expand All @@ -86,8 +96,7 @@ public Object execute(ExecutionEvent event) throws ExecutionException
}
returnCode = runActionBasedOnDescCount(launchBarManager, suitableDescNames);
}
else if (launchMode.getIdentifier().equals(ILaunchManager.RUN_MODE)
&& config.getType().getIdentifier().contentEquals(IDFLaunchConstants.DEBUG_LAUNCH_CONFIG_TYPE))
else if (launchMode.getIdentifier().equals(ILaunchManager.RUN_MODE) && isEspDebugConfig)
{
List<String> suitableDescNames = findSuitableDescNames(projectName,
IDFLaunchConstants.RUN_LAUNCH_CONFIG_TYPE);
Expand Down