Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IEP-1311 Ensure that the our runActionHandler only works on our configurations #1034

Merged
merged 2 commits into from
Sep 23, 2024
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
Loading