mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-31 21:05:37 +02:00
cleanup: generics, JavaDoc tags, loops
This commit is contained in:
parent
88548c7e81
commit
0ad2be372f
1 changed files with 10 additions and 12 deletions
|
@ -86,14 +86,12 @@ public class ProjectTargets {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (rootElement != null) {
|
extractMakeTargetsFromDocument(rootElement, manager);
|
||||||
extractMakeTargetsFromDocument(rootElement, manager);
|
// If write targets then we have converted previous make targets
|
||||||
// If write targets then we have converted previous make targets
|
if (writeTargets) {
|
||||||
if (writeTargets) {
|
saveTargets();
|
||||||
saveTargets();
|
if (targetFile != null) {
|
||||||
if (targetFile != null) {
|
targetFile.delete(); // removed old
|
||||||
targetFile.delete(); // removed old
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
|
@ -111,8 +109,7 @@ public class ProjectTargets {
|
||||||
|
|
||||||
public void set(IContainer container, IMakeTarget[] targets) throws CoreException {
|
public void set(IContainer container, IMakeTarget[] targets) throws CoreException {
|
||||||
List<IMakeTarget> newList = new ArrayList<IMakeTarget>();
|
List<IMakeTarget> newList = new ArrayList<IMakeTarget>();
|
||||||
for (int i = 0; i < targets.length; ++i) {
|
for (IMakeTarget target : targets) {
|
||||||
IMakeTarget target = targets[i];
|
|
||||||
target.setContainer(container);
|
target.setContainer(container);
|
||||||
if (newList.contains(target)) {
|
if (newList.contains(target)) {
|
||||||
throw new CoreException(new Status(IStatus.ERROR, MakeCorePlugin.getUniqueIdentifier(), -1,
|
throw new CoreException(new Status(IStatus.ERROR, MakeCorePlugin.getUniqueIdentifier(), -1,
|
||||||
|
@ -248,9 +245,10 @@ public class ProjectTargets {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Extract the make target information which is contained in the XML Document
|
* Extract the make target information which is contained in the Storage Element
|
||||||
*
|
*
|
||||||
* @param document
|
* @param root - root element
|
||||||
|
* @param manager - MakeTargetManager
|
||||||
*/
|
*/
|
||||||
protected void extractMakeTargetsFromDocument(ICStorageElement root, MakeTargetManager manager) {
|
protected void extractMakeTargetsFromDocument(ICStorageElement root, MakeTargetManager manager) {
|
||||||
for (ICStorageElement node : root.getChildren()) {
|
for (ICStorageElement node : root.getChildren()) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue