1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-04-29 19:45:01 +02:00

Comment adjustments.

This commit is contained in:
Sergey Prigogin 2011-03-07 02:49:02 +00:00
parent d56a58314c
commit a6a7c95f71

View file

@ -22,23 +22,23 @@ import org.eclipse.cdt.internal.core.pdom.PDOM;
import org.eclipse.core.runtime.CoreException; import org.eclipse.core.runtime.CoreException;
/** /**
* Wraps the offline PDOM provider as an IIndexFragmentProvider * Adapts a IReadOnlyPDOMProvider to an IIndexFragmentProvider.
*/ */
public class ReadOnlyPDOMProviderBridge implements IIndexFragmentProvider { public class ReadOnlyPDOMProviderBridge implements IIndexFragmentProvider {
protected IReadOnlyPDOMProvider opp; private final IReadOnlyPDOMProvider provider;
public ReadOnlyPDOMProviderBridge(IReadOnlyPDOMProvider opp) { public ReadOnlyPDOMProviderBridge(IReadOnlyPDOMProvider provider) {
this.opp= opp; this.provider= provider;
} }
public IIndexFragment[] getIndexFragments(ICConfigurationDescription config) throws CoreException { public IIndexFragment[] getIndexFragments(ICConfigurationDescription config) throws CoreException {
IPDOMDescriptor[] descriptions = opp.getDescriptors(config);
List<PDOM> result = new ArrayList<PDOM>(); List<PDOM> result = new ArrayList<PDOM>();
IPDOMDescriptor[] descriptions = provider.getDescriptors(config);
if (descriptions != null) { if (descriptions != null) {
for (IPDOMDescriptor dsc : descriptions) { for (IPDOMDescriptor desc : descriptions) {
PDOM pdom= PDOMCache.getInstance().getPDOM(dsc.getLocation(), dsc.getIndexLocationConverter()); PDOM pdom= PDOMCache.getInstance().getPDOM(desc.getLocation(),
desc.getIndexLocationConverter());
if (pdom != null) { if (pdom != null) {
result.add(pdom); result.add(pdom);
} }
@ -49,6 +49,6 @@ public class ReadOnlyPDOMProviderBridge implements IIndexFragmentProvider {
} }
public boolean providesFor(ICProject cproject) throws CoreException { public boolean providesFor(ICProject cproject) throws CoreException {
return opp.providesFor(cproject); return provider.providesFor(cproject);
} }
} }