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