mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-08-01 13:25:45 +02:00
Bug 531991 - Fix command launcher manager priority comparison
When iterating through a list of command launcher factory to select the highest priority factory, be sure to compare using the last known highest priority. Change-Id: I473ac9c8ff7cfb5a0aa81714101a795816fd1ac8 Signed-off-by: Chin Huat Ang <chin.huat.ang@intel.com>
This commit is contained in:
parent
82b0f6ab28
commit
13b1894c4c
1 changed files with 9 additions and 3 deletions
|
@ -178,8 +178,10 @@ public class CommandLauncherManager {
|
|||
for (ICommandLauncherFactory factory : factories) {
|
||||
ICommandLauncher launcher = factory.getCommandLauncher(project);
|
||||
if (launcher != null) {
|
||||
if (priorityMapping.get(factory) > highestPriority) {
|
||||
int factoryPriority = priorityMapping.get(factory);
|
||||
if (factoryPriority > highestPriority) {
|
||||
bestLauncher = launcher;
|
||||
highestPriority = factoryPriority;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -206,8 +208,10 @@ public class CommandLauncherManager {
|
|||
if (factory instanceof ICommandLauncherFactory2) {
|
||||
ICommandLauncher launcher = ((ICommandLauncherFactory2)factory).getCommandLauncher(config);
|
||||
if (launcher != null) {
|
||||
if (priorityMapping.get(factory) > highestPriority) {
|
||||
int factoryPriority = priorityMapping.get(factory);
|
||||
if (factoryPriority > highestPriority) {
|
||||
bestLauncher = launcher;
|
||||
highestPriority = factoryPriority;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -233,8 +237,10 @@ public class CommandLauncherManager {
|
|||
for (ICommandLauncherFactory factory : factories) {
|
||||
ICommandLauncher launcher = factory.getCommandLauncher(cfgd);
|
||||
if (launcher != null) {
|
||||
if (priorityMapping.get(factory) > highestPriority) {
|
||||
int factoryPriority = priorityMapping.get(factory);
|
||||
if (factoryPriority > highestPriority) {
|
||||
bestLauncher = launcher;
|
||||
highestPriority = factoryPriority;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue