mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-23 14:42:11 +02:00
compilation warnings
This commit is contained in:
parent
7f2357c3db
commit
b821eb6557
2 changed files with 10 additions and 20 deletions
|
@ -1,5 +1,5 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2004, 2008 IBM Corporation and others.
|
||||
* Copyright (c) 2004, 2010 IBM Corporation and others.
|
||||
* All rights reserved. This program and the accompanying materials
|
||||
* are made available under the terms of the Eclipse Public License v1.0
|
||||
* which accompanies this distribution, and is available at
|
||||
|
@ -12,7 +12,6 @@ package org.eclipse.cdt.make.internal.ui.scannerconfig;
|
|||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.Iterator;
|
||||
|
||||
import org.eclipse.core.resources.IProject;
|
||||
|
||||
|
@ -37,7 +36,7 @@ public class DiscoveredElement {
|
|||
private String fEntry;
|
||||
private int fEntryKind;
|
||||
private boolean fRemoved;
|
||||
private ArrayList fChildren = new ArrayList();
|
||||
private ArrayList<DiscoveredElement> fChildren = new ArrayList<DiscoveredElement>();
|
||||
private DiscoveredElement fParent;
|
||||
|
||||
public DiscoveredElement(IProject project, String entry, int kind, boolean removed, boolean system) {
|
||||
|
@ -92,8 +91,7 @@ public class DiscoveredElement {
|
|||
group = parent;
|
||||
}
|
||||
else if (parent.getEntryKind() == CONTAINER) {
|
||||
for (Iterator i = parent.fChildren.iterator(); i.hasNext(); ) {
|
||||
DiscoveredElement child = (DiscoveredElement) i.next();
|
||||
for (DiscoveredElement child : parent.fChildren) {
|
||||
if (child.getEntryKind() == parentKind) {
|
||||
group = child;
|
||||
break;
|
||||
|
@ -116,14 +114,11 @@ public class DiscoveredElement {
|
|||
return fProject;
|
||||
}
|
||||
/**
|
||||
* @return Returns the fEntry.
|
||||
* @return the fEntry.
|
||||
*/
|
||||
public String getEntry() {
|
||||
return fEntry;
|
||||
}
|
||||
/**
|
||||
* @param string
|
||||
*/
|
||||
public void setEntry(String entry) {
|
||||
fEntry = entry;
|
||||
}
|
||||
|
@ -165,8 +160,7 @@ public class DiscoveredElement {
|
|||
}
|
||||
|
||||
/**
|
||||
* Returns children of the discovered element
|
||||
* @return
|
||||
* @return children of the discovered element
|
||||
*/
|
||||
public Object[] getChildren() {
|
||||
switch(fEntryKind) {
|
||||
|
@ -190,20 +184,16 @@ public class DiscoveredElement {
|
|||
return (fChildren.size() > 0);
|
||||
}
|
||||
|
||||
public void setChildren(Object[] children) {
|
||||
fChildren = new ArrayList(Arrays.asList(children));
|
||||
public void setChildren(DiscoveredElement[] children) {
|
||||
fChildren = new ArrayList<DiscoveredElement>(Arrays.asList(children));
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
public boolean delete() {
|
||||
boolean rc = false;
|
||||
DiscoveredElement parent = getParent();
|
||||
if (parent != null) {
|
||||
rc = parent.fChildren.remove(this);
|
||||
for (Iterator i = fChildren.iterator(); i.hasNext(); ) {
|
||||
DiscoveredElement child = (DiscoveredElement) i.next();
|
||||
for (DiscoveredElement child : fChildren) {
|
||||
child.setParent(null);
|
||||
rc |= true;
|
||||
}
|
||||
|
|
|
@ -571,7 +571,7 @@ public class DiscoveredPathContainerPage extends WizardPage implements IPathEntr
|
|||
for (Iterator i = selElements.iterator(); i.hasNext(); ) {
|
||||
DiscoveredElement elem = (DiscoveredElement) i.next();
|
||||
DiscoveredElement parent = elem.getParent();
|
||||
Object[] children = parent.getChildren();
|
||||
DiscoveredElement[] children = parent.getChildren();
|
||||
for (int j = 0; j < children.length; ++j) {
|
||||
DiscoveredElement child = (DiscoveredElement) children[j];
|
||||
if (elem.equals(child)) {
|
||||
|
@ -599,7 +599,7 @@ public class DiscoveredPathContainerPage extends WizardPage implements IPathEntr
|
|||
for (Iterator i = revSelElements.iterator(); i.hasNext(); ) {
|
||||
DiscoveredElement elem = (DiscoveredElement) i.next();
|
||||
DiscoveredElement parent = elem.getParent();
|
||||
Object[] children = parent.getChildren();
|
||||
DiscoveredElement[] children = parent.getChildren();
|
||||
for (int j = children.length - 1; j >= 0; --j) {
|
||||
DiscoveredElement child = (DiscoveredElement) children[j];
|
||||
if (elem.equals(child)) {
|
||||
|
|
Loading…
Add table
Reference in a new issue