mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-31 12:55:40 +02:00
cleanup some warnings.
This commit is contained in:
parent
ba4d459a95
commit
d5e101e869
5 changed files with 7 additions and 9 deletions
|
@ -25,7 +25,11 @@ public abstract class APathEntry extends PathEntry {
|
||||||
public APathEntry (int kind, IPath path, IPath basePath, IPath[] exclusionPatterns, boolean isExported) {
|
public APathEntry (int kind, IPath path, IPath basePath, IPath[] exclusionPatterns, boolean isExported) {
|
||||||
super(kind, path, isExported);
|
super(kind, path, isExported);
|
||||||
this.basePath = basePath;
|
this.basePath = basePath;
|
||||||
this.exclusionPatterns = exclusionPatterns;
|
if (exclusionPatterns == null) {
|
||||||
|
this.exclusionPatterns = NO_EXCLUSION_PATTERNS;
|
||||||
|
} else {
|
||||||
|
this.exclusionPatterns = exclusionPatterns;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -249,7 +249,7 @@ public class CContainer extends Openable implements ICContainer {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case IResource.FOLDER :
|
case IResource.FOLDER :
|
||||||
celement = new CContainer(this, (IFolder) resource);
|
celement = new CContainer(this, resource);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
return celement;
|
return celement;
|
||||||
|
|
|
@ -53,7 +53,6 @@ public class CContainerInfo extends OpenableInfo {
|
||||||
|
|
||||||
IPathEntry[] entries = cproject.getResolvedPathEntries();
|
IPathEntry[] entries = cproject.getResolvedPathEntries();
|
||||||
if (resources != null) {
|
if (resources != null) {
|
||||||
CModelManager factory = CModelManager.getDefault();
|
|
||||||
ICElement[] children = getChildren();
|
ICElement[] children = getChildren();
|
||||||
for (int i = 0; i < resources.length; i++) {
|
for (int i = 0; i < resources.length; i++) {
|
||||||
boolean found = false;
|
boolean found = false;
|
||||||
|
|
|
@ -88,7 +88,6 @@ public class IncludeReference extends Openable implements IIncludeReference {
|
||||||
*/
|
*/
|
||||||
protected boolean computeChildren(OpenableInfo info, IResource res) throws CModelException {
|
protected boolean computeChildren(OpenableInfo info, IResource res) throws CModelException {
|
||||||
ArrayList vChildren = new ArrayList();
|
ArrayList vChildren = new ArrayList();
|
||||||
final CModelManager factory = CModelManager.getDefault();
|
|
||||||
File file = null;
|
File file = null;
|
||||||
if (fPath != null) {
|
if (fPath != null) {
|
||||||
file = fPath.toFile();
|
file = fPath.toFile();
|
||||||
|
|
|
@ -508,8 +508,6 @@ public class PathEntryManager implements ICDescriptorListener {
|
||||||
|
|
||||||
public ICElementDelta[] generatePathEntryDeltas(ICProject cproject, IPathEntry[] oldEntries, IPathEntry[] newEntries) {
|
public ICElementDelta[] generatePathEntryDeltas(ICProject cproject, IPathEntry[] oldEntries, IPathEntry[] newEntries) {
|
||||||
ArrayList list = new ArrayList();
|
ArrayList list = new ArrayList();
|
||||||
CModelManager manager = CModelManager.getDefault();
|
|
||||||
boolean hasDelta = false;
|
|
||||||
|
|
||||||
// Sanity checks
|
// Sanity checks
|
||||||
if (oldEntries == null) {
|
if (oldEntries == null) {
|
||||||
|
@ -591,7 +589,6 @@ public class PathEntryManager implements ICDescriptorListener {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case IPathEntry.CDT_LIBRARY: {
|
case IPathEntry.CDT_LIBRARY: {
|
||||||
ILibraryEntry lib = (ILibraryEntry) entry;
|
|
||||||
celement = cproject;
|
celement = cproject;
|
||||||
flag = (removed) ? ICElementDelta.F_REMOVED_PATHENTRY_LIBRARY : ICElementDelta.F_ADDED_PATHENTRY_LIBRARY;
|
flag = (removed) ? ICElementDelta.F_REMOVED_PATHENTRY_LIBRARY : ICElementDelta.F_ADDED_PATHENTRY_LIBRARY;
|
||||||
break;
|
break;
|
||||||
|
@ -669,7 +666,7 @@ public class PathEntryManager implements ICDescriptorListener {
|
||||||
}
|
}
|
||||||
|
|
||||||
// ensure path is absolute
|
// ensure path is absolute
|
||||||
boolean hasPath = element.hasAttribute(ATTRIBUTE_PATH);
|
//boolean hasPath = element.hasAttribute(ATTRIBUTE_PATH);
|
||||||
String pathAttr = element.getAttribute(ATTRIBUTE_PATH);
|
String pathAttr = element.getAttribute(ATTRIBUTE_PATH);
|
||||||
IPath path = new Path(pathAttr);
|
IPath path = new Path(pathAttr);
|
||||||
if (!path.isAbsolute()) {
|
if (!path.isAbsolute()) {
|
||||||
|
@ -849,7 +846,6 @@ public class PathEntryManager implements ICDescriptorListener {
|
||||||
* @see org.eclipse.cdt.core.ICDescriptorListener#descriptorChanged(org.eclipse.cdt.core.CDescriptorEvent)
|
* @see org.eclipse.cdt.core.ICDescriptorListener#descriptorChanged(org.eclipse.cdt.core.CDescriptorEvent)
|
||||||
*/
|
*/
|
||||||
public void descriptorChanged(CDescriptorEvent event) {
|
public void descriptorChanged(CDescriptorEvent event) {
|
||||||
int flags = event.getFlags();
|
|
||||||
if (event.getType() == CDescriptorEvent.CDTPROJECT_CHANGED) {
|
if (event.getType() == CDescriptorEvent.CDTPROJECT_CHANGED) {
|
||||||
ICDescriptor cdesc = event.getDescriptor();
|
ICDescriptor cdesc = event.getDescriptor();
|
||||||
if (cdesc != null) {
|
if (cdesc != null) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue