|
Lines 1-5
Link Here
|
| 1 |
/******************************************************************************* |
1 |
/******************************************************************************* |
| 2 |
* Copyright (c) 2000, 2015 IBM Corporation and others. |
2 |
* Copyright (c) 2000, 2016 IBM Corporation and others. |
| 3 |
* All rights reserved. This program and the accompanying materials |
3 |
* All rights reserved. This program and the accompanying materials |
| 4 |
* are made available under the terms of the Eclipse Public License v1.0 |
4 |
* are made available under the terms of the Eclipse Public License v1.0 |
| 5 |
* which accompanies this distribution, and is available at |
5 |
* which accompanies this distribution, and is available at |
|
Lines 939-946
Link Here
|
| 939 |
break; |
939 |
break; |
| 940 |
} |
940 |
} |
| 941 |
} |
941 |
} |
| 942 |
if (isActive) |
942 |
if (isActive) { |
|
|
943 |
IPluginBase pluginBase = model.getPluginBase(); |
| 944 |
String id = pluginBase.getId(); |
| 945 |
if (id == null) |
| 946 |
return; |
| 947 |
|
| 948 |
// Remove target models by the same ID from the state, iff |
| 949 |
// the *.qualifier version from the workspace overrides |
| 950 |
// them. |
| 951 |
// Otherwise, update target models. |
| 952 |
Version version = Version.parseVersion(pluginBase.getVersion()); |
| 953 |
boolean isQualifierVersion = "qualifier".equals(version.getQualifier()); //$NON-NLS-1$ |
| 954 |
ModelEntry entry1 = fEntries.get(id); |
| 955 |
if (entry1 != null) { |
| 956 |
IPluginModelBase[] models = entry1.getExternalModels(); |
| 957 |
for (int i = 0; i < models.length; i++) { |
| 958 |
Version entryVersion = models[i].getBundleDescription().getVersion(); |
| 959 |
if (isQualifierVersion && version.getMajor() == entryVersion.getMajor() |
| 960 |
&& version.getMinor() == entryVersion.getMinor() |
| 961 |
&& version.getMicro() == entryVersion.getMicro()) { |
| 962 |
fState.removeBundleDescription(models[i].getBundleDescription()); |
| 963 |
} else { |
| 964 |
fState.updateBundleDescription(models[i].getBundleDescription()); |
| 965 |
} |
| 966 |
} |
| 967 |
} |
| 968 |
// add new bundle to the state |
| 943 |
fState.addBundle(model, true); |
969 |
fState.addBundle(model, true); |
|
|
970 |
|
| 971 |
} |
| 944 |
} else |
972 |
} else |
| 945 |
// if the target plug-in has become disabled/unchecked, remove its bundle |
973 |
// if the target plug-in has become disabled/unchecked, remove its bundle |
| 946 |
// description from the state |
974 |
// description from the state |