mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-08-02 13:55:39 +02:00
Cosmetics.
This commit is contained in:
parent
335422ecee
commit
75b90b2612
1 changed files with 64 additions and 61 deletions
|
@ -50,18 +50,19 @@ import org.osgi.framework.Version;
|
||||||
* The IndexProviderManager is responsible for maintaining the set of index
|
* The IndexProviderManager is responsible for maintaining the set of index
|
||||||
* fragments contributed via the CIndex extension point.
|
* fragments contributed via the CIndex extension point.
|
||||||
* <p>
|
* <p>
|
||||||
* It is an internal class, and is public only for testing purposes.
|
* For bug 196338, the role of this class was extended. It now has responsibility to look
|
||||||
* @since 4.0
|
* at the pool of fragments available depending on their IDs, and select the most appropriate.
|
||||||
*/
|
* The following rules are applied:
|
||||||
/*
|
* <ul>
|
||||||
* For bug 196338, the role of this class was extended. It now has responsibility to
|
* <li>If a fragment is not compatible, don't use it.</li>
|
||||||
* look at the pool of fragments available depending on their IDs, and select the most appropriate.
|
* <li>If multiple fragments are compatible, pick the latest.</li>
|
||||||
* The following rules are applied
|
* </ul>
|
||||||
* (i) If its not compatible, don't use it
|
|
||||||
* (ii) If multiple are compatible, pick the latest
|
|
||||||
*
|
*
|
||||||
* A warning is logged if a fragment is contributed which is incompatible, and for which there is
|
* A warning is logged if a fragment is contributed which is incompatible, and for which there is
|
||||||
* no compatible equivalent.
|
* no compatible equivalent.
|
||||||
|
*
|
||||||
|
* It is an internal class, and is public only for testing purposes.
|
||||||
|
* @since 4.0
|
||||||
*/
|
*/
|
||||||
public final class IndexProviderManager implements IElementChangedListener {
|
public final class IndexProviderManager implements IElementChangedListener {
|
||||||
private static final String ELEMENT_RO_PDOMPROVIDER= "ReadOnlyPDOMProvider"; //$NON-NLS-1$
|
private static final String ELEMENT_RO_PDOMPROVIDER= "ReadOnlyPDOMProvider"; //$NON-NLS-1$
|
||||||
|
@ -170,7 +171,8 @@ public final class IndexProviderManager implements IElementChangedListener {
|
||||||
Messages.IndexProviderManager_NoCompatibleFragmentsAvailable,
|
Messages.IndexProviderManager_NoCompatibleFragmentsAvailable,
|
||||||
new Object[]{key}
|
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);
|
CCorePlugin.log(status);
|
||||||
compatibleFragmentUnavailable.add(key);
|
compatibleFragmentUnavailable.add(key);
|
||||||
}
|
}
|
||||||
|
@ -203,7 +205,8 @@ public final class IndexProviderManager implements IElementChangedListener {
|
||||||
* @param id2fragment
|
* @param id2fragment
|
||||||
* @param candidate
|
* @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;
|
String cid= null, csver= null, cformatID= null;
|
||||||
candidate.acquireReadLock();
|
candidate.acquireReadLock();
|
||||||
try {
|
try {
|
||||||
|
@ -292,8 +295,8 @@ public final class IndexProviderManager implements IElementChangedListener {
|
||||||
try {
|
try {
|
||||||
ICProject cproject= CoreModel.getDefault().create(project);
|
ICProject cproject= CoreModel.getDefault().create(project);
|
||||||
provisionMap.put(key, new Boolean(provider.providesFor(cproject)));
|
provisionMap.put(key, new Boolean(provider.providesFor(cproject)));
|
||||||
} catch(CoreException ce) {
|
} catch(CoreException e) {
|
||||||
CCorePlugin.log(ce);
|
CCorePlugin.log(e);
|
||||||
provisionMap.put(key, Boolean.FALSE);
|
provisionMap.put(key, Boolean.FALSE);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue