Skip to main content
summaryrefslogtreecommitdiffstats
path: root/build
diff options
context:
space:
mode:
authorAndrew Gvozdev2010-04-30 01:05:56 -0400
committerAndrew Gvozdev2010-04-30 01:05:56 -0400
commitb821eb65573f4bd76c4a90f064f7c3e95880b4ea (patch)
tree4094af17a222df1fc91fba584a04681882749277 /build
parent7f2357c3dbea54355bf19ea66e1a644ebc7baab9 (diff)
downloadorg.eclipse.cdt-b821eb65573f4bd76c4a90f064f7c3e95880b4ea.tar.gz
org.eclipse.cdt-b821eb65573f4bd76c4a90f064f7c3e95880b4ea.tar.xz
org.eclipse.cdt-b821eb65573f4bd76c4a90f064f7c3e95880b4ea.zip
compilation warnings
Diffstat (limited to 'build')
-rw-r--r--build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/scannerconfig/DiscoveredElement.java26
-rw-r--r--build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/ui/dialogs/DiscoveredPathContainerPage.java4
2 files changed, 10 insertions, 20 deletions
diff --git a/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/scannerconfig/DiscoveredElement.java b/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/scannerconfig/DiscoveredElement.java
index 344f2d4103..643f192550 100644
--- a/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/scannerconfig/DiscoveredElement.java
+++ b/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/scannerconfig/DiscoveredElement.java
@@ -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;
}
diff --git a/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/ui/dialogs/DiscoveredPathContainerPage.java b/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/ui/dialogs/DiscoveredPathContainerPage.java
index 7d9680d2fa..e4b5c8141d 100644
--- a/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/ui/dialogs/DiscoveredPathContainerPage.java
+++ b/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/ui/dialogs/DiscoveredPathContainerPage.java
@@ -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)) {

Back to the top