1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-06-08 10:16:03 +02:00

Remove some warnings.

This commit is contained in:
Alain Magloire 2004-06-15 14:46:13 +00:00
parent eb369cc11c
commit 7b15edbc7f
2 changed files with 17 additions and 13 deletions

View file

@ -196,7 +196,7 @@ public class CModelStatus extends Status implements ICModelStatus, ICModelStatus
if (i > 0) {
buff.append(", "); //$NON-NLS-1$
}
buff.append(((ICElement)fElements[i]).toString());
buff.append((fElements[i]).toString());
}
return buff.toString();

View file

@ -81,27 +81,31 @@ public class DefaultPathEntryStore implements IPathEntryStore, ICDescriptorListe
}
public IPathEntry[] getRawPathEntries() throws CoreException {
ArrayList pathEntries = new ArrayList();
ICDescriptor cdesc = CCorePlugin.getDefault().getCProjectDescription(fProject);
Element element = cdesc.getProjectData(PATH_ENTRY_ID);
NodeList list = element.getChildNodes();
for (int i = 0; i < list.getLength(); i++) {
Node childNode = list.item(i);
if (childNode.getNodeType() == Node.ELEMENT_NODE) {
if (childNode.getNodeName().equals(PATH_ENTRY)) {
pathEntries.add(decodePathEntry(fProject, (Element) childNode));
ICDescriptor cdesc = CCorePlugin.getDefault().getCProjectDescription(fProject, false);
if (cdesc != null) {
ArrayList pathEntries = new ArrayList();
Element element = cdesc.getProjectData(PATH_ENTRY_ID);
NodeList list = element.getChildNodes();
for (int i = 0; i < list.getLength(); i++) {
Node childNode = list.item(i);
if (childNode.getNodeType() == Node.ELEMENT_NODE) {
if (childNode.getNodeName().equals(PATH_ENTRY)) {
pathEntries.add(decodePathEntry(fProject, (Element) childNode));
}
}
}
IPathEntry[] entries = new IPathEntry[pathEntries.size()];
pathEntries.toArray(entries);
return entries;
}
return (IPathEntry[]) pathEntries.toArray(NO_PATHENTRIES);
return NO_PATHENTRIES;
}
public void setRawPathEntries(IPathEntry[] newRawEntries) throws CoreException {
if (Arrays.equals(newRawEntries, getRawPathEntries())) {
return;
}
ICDescriptor descriptor = CCorePlugin.getDefault().getCProjectDescription(fProject);
ICDescriptor descriptor = CCorePlugin.getDefault().getCProjectDescription(fProject, true);
Element rootElement = descriptor.getProjectData(PATH_ENTRY_ID);
// Clear out all current children
Node child = rootElement.getFirstChild();