1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-08-04 14:55:41 +02:00

Fixed an API usage warning.

This commit is contained in:
Sergey Prigogin 2009-04-20 16:35:18 +00:00
parent 3bd0a9fb8e
commit 57e806a4ad

View file

@ -46,7 +46,6 @@ import org.eclipse.cdt.core.model.ISourceRoot;
import org.eclipse.cdt.core.model.ITranslationUnit; import org.eclipse.cdt.core.model.ITranslationUnit;
import org.eclipse.cdt.core.model.IWorkingCopy; import org.eclipse.cdt.core.model.IWorkingCopy;
import org.eclipse.cdt.ui.CElementGrouping; import org.eclipse.cdt.ui.CElementGrouping;
import org.eclipse.cdt.ui.CUIPlugin;
import org.eclipse.cdt.ui.IncludesGrouping; import org.eclipse.cdt.ui.IncludesGrouping;
import org.eclipse.cdt.ui.NamespacesGrouping; import org.eclipse.cdt.ui.NamespacesGrouping;
@ -200,7 +199,7 @@ public class BaseCElementContentProvider implements ITreeContentProvider {
} else if (element instanceof ICContainer) { } else if (element instanceof ICContainer) {
return getCResources((ICContainer)element); return getCResources((ICContainer)element);
} else if (element instanceof ITranslationUnit) { } else if (element instanceof ITranslationUnit) {
// if we want to get the chidren of a translation unit // if we want to get the children of a translation unit
if (fProvideMembers) { if (fProvideMembers) {
// if we want to use the working copy of it // if we want to use the working copy of it
ITranslationUnit tu = (ITranslationUnit)element; ITranslationUnit tu = (ITranslationUnit)element;
@ -208,7 +207,7 @@ public class BaseCElementContentProvider implements ITreeContentProvider {
// if it is not already a working copy // if it is not already a working copy
if (!(element instanceof IWorkingCopy)){ if (!(element instanceof IWorkingCopy)){
// if it has a valid working copy // if it has a valid working copy
IWorkingCopy copy = tu.findSharedWorkingCopy(CUIPlugin.getDefault().getBufferFactory()); IWorkingCopy copy = tu.findSharedWorkingCopy();
if (copy != null) { if (copy != null) {
tu = copy; tu = copy;
} }