1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-07-31 21:05:37 +02:00

Cosmetics.

This commit is contained in:
Sergey Prigogin 2011-03-06 23:14:04 +00:00
parent 335422ecee
commit 75b90b2612

View file

@ -50,18 +50,19 @@ import org.osgi.framework.Version;
* The IndexProviderManager is responsible for maintaining the set of index
* fragments contributed via the CIndex extension point.
* <p>
* It is an internal class, and is public only for testing purposes.
* @since 4.0
*/
/*
* For bug 196338, the role of this class was extended. It now has responsibility to
* look at the pool of fragments available depending on their IDs, and select the most appropriate.
* The following rules are applied
* (i) If its not compatible, don't use it
* (ii) If multiple are compatible, pick the latest
* For bug 196338, the role of this class was extended. It now has responsibility to look
* at the pool of fragments available depending on their IDs, and select the most appropriate.
* The following rules are applied:
* <ul>
* <li>If a fragment is not compatible, don't use it.</li>
* <li>If multiple fragments are compatible, pick the latest.</li>
* </ul>
*
* A warning is logged if a fragment is contributed which is incompatible, and for which there is
* no compatible equivalent.
*
* It is an internal class, and is public only for testing purposes.
* @since 4.0
*/
public final class IndexProviderManager implements IElementChangedListener {
private static final String ELEMENT_RO_PDOMPROVIDER= "ReadOnlyPDOMProvider"; //$NON-NLS-1$
@ -170,7 +171,8 @@ public final class IndexProviderManager implements IElementChangedListener {
Messages.IndexProviderManager_NoCompatibleFragmentsAvailable,
new Object[]{key}
);
IStatus status= new Status(IStatus.WARNING, CCorePlugin.PLUGIN_ID, IStatus.WARNING, msg, null);
IStatus status= new Status(IStatus.WARNING, CCorePlugin.PLUGIN_ID,
IStatus.WARNING, msg, null);
CCorePlugin.log(status);
compatibleFragmentUnavailable.add(key);
}
@ -203,7 +205,8 @@ public final class IndexProviderManager implements IElementChangedListener {
* @param id2fragment
* @param candidate
*/
private void processCandidate(Map<String, IIndexFragment> id2fragment, IIndexFragment candidate) throws InterruptedException, CoreException {
private void processCandidate(Map<String, IIndexFragment> id2fragment, IIndexFragment candidate)
throws InterruptedException, CoreException {
String cid= null, csver= null, cformatID= null;
candidate.acquireReadLock();
try {
@ -292,8 +295,8 @@ public final class IndexProviderManager implements IElementChangedListener {
try {
ICProject cproject= CoreModel.getDefault().create(project);
provisionMap.put(key, new Boolean(provider.providesFor(cproject)));
} catch(CoreException ce) {
CCorePlugin.log(ce);
} catch(CoreException e) {
CCorePlugin.log(e);
provisionMap.put(key, Boolean.FALSE);
}
}