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:
parent
eb369cc11c
commit
7b15edbc7f
2 changed files with 17 additions and 13 deletions
|
@ -196,7 +196,7 @@ public class CModelStatus extends Status implements ICModelStatus, ICModelStatus
|
||||||
if (i > 0) {
|
if (i > 0) {
|
||||||
buff.append(", "); //$NON-NLS-1$
|
buff.append(", "); //$NON-NLS-1$
|
||||||
}
|
}
|
||||||
buff.append(((ICElement)fElements[i]).toString());
|
buff.append((fElements[i]).toString());
|
||||||
}
|
}
|
||||||
return buff.toString();
|
return buff.toString();
|
||||||
|
|
||||||
|
|
|
@ -81,27 +81,31 @@ public class DefaultPathEntryStore implements IPathEntryStore, ICDescriptorListe
|
||||||
}
|
}
|
||||||
|
|
||||||
public IPathEntry[] getRawPathEntries() throws CoreException {
|
public IPathEntry[] getRawPathEntries() throws CoreException {
|
||||||
ArrayList pathEntries = new ArrayList();
|
ICDescriptor cdesc = CCorePlugin.getDefault().getCProjectDescription(fProject, false);
|
||||||
ICDescriptor cdesc = CCorePlugin.getDefault().getCProjectDescription(fProject);
|
if (cdesc != null) {
|
||||||
Element element = cdesc.getProjectData(PATH_ENTRY_ID);
|
ArrayList pathEntries = new ArrayList();
|
||||||
NodeList list = element.getChildNodes();
|
Element element = cdesc.getProjectData(PATH_ENTRY_ID);
|
||||||
for (int i = 0; i < list.getLength(); i++) {
|
NodeList list = element.getChildNodes();
|
||||||
Node childNode = list.item(i);
|
for (int i = 0; i < list.getLength(); i++) {
|
||||||
if (childNode.getNodeType() == Node.ELEMENT_NODE) {
|
Node childNode = list.item(i);
|
||||||
if (childNode.getNodeName().equals(PATH_ENTRY)) {
|
if (childNode.getNodeType() == Node.ELEMENT_NODE) {
|
||||||
pathEntries.add(decodePathEntry(fProject, (Element) childNode));
|
if (childNode.getNodeName().equals(PATH_ENTRY)) {
|
||||||
|
pathEntries.add(decodePathEntry(fProject, (Element) childNode));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
IPathEntry[] entries = new IPathEntry[pathEntries.size()];
|
||||||
|
pathEntries.toArray(entries);
|
||||||
|
return entries;
|
||||||
}
|
}
|
||||||
|
return NO_PATHENTRIES;
|
||||||
return (IPathEntry[]) pathEntries.toArray(NO_PATHENTRIES);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setRawPathEntries(IPathEntry[] newRawEntries) throws CoreException {
|
public void setRawPathEntries(IPathEntry[] newRawEntries) throws CoreException {
|
||||||
if (Arrays.equals(newRawEntries, getRawPathEntries())) {
|
if (Arrays.equals(newRawEntries, getRawPathEntries())) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
ICDescriptor descriptor = CCorePlugin.getDefault().getCProjectDescription(fProject);
|
ICDescriptor descriptor = CCorePlugin.getDefault().getCProjectDescription(fProject, true);
|
||||||
Element rootElement = descriptor.getProjectData(PATH_ENTRY_ID);
|
Element rootElement = descriptor.getProjectData(PATH_ENTRY_ID);
|
||||||
// Clear out all current children
|
// Clear out all current children
|
||||||
Node child = rootElement.getFirstChild();
|
Node child = rootElement.getFirstChild();
|
||||||
|
|
Loading…
Add table
Reference in a new issue