Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOleg Krasilnikov2008-03-28 13:17:17 +0000
committerOleg Krasilnikov2008-03-28 13:17:17 +0000
commit8a3e9eb23782ba5d7873a2c28b8e36ca061a70fb (patch)
tree5b412390def3ca4497db3fb81dc058acbc4705ee
parent683d870ffbfc385bebb7bd63dee29560b51c0255 (diff)
downloadorg.eclipse.cdt-8a3e9eb23782ba5d7873a2c28b8e36ca061a70fb.tar.gz
org.eclipse.cdt-8a3e9eb23782ba5d7873a2c28b8e36ca061a70fb.tar.xz
org.eclipse.cdt-8a3e9eb23782ba5d7873a2c28b8e36ca061a70fb.zip
Bug #224309 : Problem with ordering of ErrorParser
Bug #222390 : Overriding make variables in build command does not accept quotes
-rw-r--r--build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/CommonBuilder.java8
-rw-r--r--build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/Configuration.java42
2 files changed, 12 insertions, 38 deletions
diff --git a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/CommonBuilder.java b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/CommonBuilder.java
index b0e45b84b41..caaa69ce7c8 100644
--- a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/CommonBuilder.java
+++ b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/CommonBuilder.java
@@ -2046,7 +2046,7 @@ public class CommonBuilder extends ACBuilder {
}
// Turn the string into an array.
- String[] makeArray(String string) {
+ private String[] makeArray(String string) {
string = string.trim();
char[] array = string.toCharArray();
ArrayList aList = new ArrayList();
@@ -2054,11 +2054,13 @@ public class CommonBuilder extends ACBuilder {
boolean inComment = false;
for (int i = 0; i < array.length; i++) {
char c = array[i];
+ boolean needsToAdd = true;
if (array[i] == '"' || array[i] == '\'') {
if (i > 0 && array[i - 1] == '\\') {
inComment = false;
} else {
inComment = !inComment;
+ needsToAdd = false;
}
}
if (c == ' ' && !inComment) {
@@ -2068,10 +2070,10 @@ public class CommonBuilder extends ACBuilder {
aList.add(str);
}
}
-// aList.add(buffer.toString());
buffer = new StringBuffer();
} else {
- buffer.append(c);
+ if (needsToAdd) // skip quotation marks
+ buffer.append(c);
}
}
if (buffer.length() > 0){
diff --git a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/Configuration.java b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/Configuration.java
index c7d493d08ab..e4a301e1149 100644
--- a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/Configuration.java
+++ b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/Configuration.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2003, 2007 IBM Corporation and others.
+ * Copyright (c) 2003, 2008 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
@@ -13,8 +13,8 @@ package org.eclipse.cdt.managedbuilder.internal.core;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashMap;
-import java.util.HashSet;
import java.util.LinkedHashMap;
+import java.util.LinkedHashSet;
import java.util.List;
import java.util.Map;
import java.util.Set;
@@ -98,10 +98,6 @@ public class Configuration extends BuildObject implements IConfiguration, IBuild
private IConfiguration parent;
private ProjectType projectType;
private ManagedProject managedProject;
-// private ToolChain toolChain;
-// private List resourceConfigurationList;
-// private Map resourceConfigurationMap;
- // Managed Build model attributes
private String artifactName;
private String cleanCommand;
private String artifactExtension;
@@ -130,9 +126,6 @@ public class Configuration extends BuildObject implements IConfiguration, IBuild
private FolderInfo rootFolderInfo;
private BuildConfigurationData fCfgData;
private ICConfigurationDescription fCfgDes;
-// private IScannerConfigBuilderInfo2 scannerCfgBuilderInfo;
-// private IDiscoveredPathManager.IDiscoveredPathInfo discoveredInfo;
-// private Boolean isPerResourceDiscovery;
private ICfgScannerConfigBuilderInfo2Set cfgScannerInfo;
private boolean isPreferenceConfig;
private List excludeList;
@@ -1392,27 +1385,6 @@ public class Configuration extends BuildObject implements IConfiguration, IBuild
* @see org.eclipse.cdt.managedbuilder.core.IConfiguration#getErrorParserList()
*/
public String[] getErrorParserList() {
-// String parserIDs = getErrorParserIds();
-// String[] errorParsers;
-// if (parserIDs != null) {
-// // Check for an empty string
-// if (parserIDs.length() == 0) {
-// errorParsers = new String[0];
-// } else {
-// StringTokenizer tok = new StringTokenizer(parserIDs, ";"); //$NON-NLS-1$
-// List list = new ArrayList(tok.countTokens());
-// while (tok.hasMoreElements()) {
-// list.add(tok.nextToken());
-// }
-// String[] strArr = {""}; //$NON-NLS-1$
-// errorParsers = (String[]) list.toArray(strArr);
-// }
-// } else {
-// // If no error parsers are specified, the default is
-// // all error parsers
-// errorParsers = CCorePlugin.getDefault().getAllErrorParsersIDs();
-// }
-// return errorParsers;
Set set = contributeErrorParsers(null, true);
if(set != null){
String result[] = new String[set.size()];
@@ -1426,7 +1398,7 @@ public class Configuration extends BuildObject implements IConfiguration, IBuild
String parserIDs = getErrorParserIdsAttribute();
if (parserIDs != null){
if(set == null)
- set = new HashSet();
+ set = new LinkedHashSet();
if(parserIDs.length() != 0) {
StringTokenizer tok = new StringTokenizer(parserIDs, ";"); //$NON-NLS-1$
while (tok.hasMoreElements()) {
@@ -2364,11 +2336,11 @@ public class Configuration extends BuildObject implements IConfiguration, IBuild
resetErrorParsers();
Set oldSet = contributeErrorParsers(null, true);
if(oldSet == null)
- oldSet = new HashSet();
- HashSet newSet = new HashSet();
+ oldSet = new LinkedHashSet();
+ LinkedHashSet newSet = new LinkedHashSet();
newSet.addAll(Arrays.asList(ids));
newSet.remove(null);
- HashSet newCopy = (HashSet)newSet.clone();
+ LinkedHashSet newCopy = (LinkedHashSet)newSet.clone();
newSet.removeAll(oldSet);
oldSet.removeAll(newCopy);
Set removed = oldSet;
@@ -2391,7 +2363,7 @@ public class Configuration extends BuildObject implements IConfiguration, IBuild
void removeErrorParsers(Set set){
Set oldSet = contributeErrorParsers(null, false);
if(oldSet == null)
- oldSet = new HashSet();
+ oldSet = new LinkedHashSet();
oldSet.removeAll(set);
setErrorParserAttribute((String[])oldSet.toArray(new String[oldSet.size()]));

Back to the top