From 29a878c9db483fd638805526a980f4e0a28b849c Mon Sep 17 00:00:00 2001 From: wisberg Date: Wed, 30 Apr 2003 02:11:54 +0000 Subject: [PATCH] added support for adopting global configuration values (without overwriting local values) --- .../internal/core/builder/AjBuildConfig.java | 100 +++++++++++++++++- 1 file changed, 98 insertions(+), 2 deletions(-) diff --git a/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/AjBuildConfig.java b/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/AjBuildConfig.java index 8d1a3f9f3..02d1bac09 100644 --- a/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/AjBuildConfig.java +++ b/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/AjBuildConfig.java @@ -18,6 +18,7 @@ package org.aspectj.ajdt.internal.core.builder; import java.io.File; import java.util.ArrayList; +import java.util.Collection; import java.util.HashMap; import java.util.Iterator; import java.util.List; @@ -28,13 +29,13 @@ import org.eclipse.jdt.internal.compiler.impl.CompilerOptions; /** * All configuration information needed to run the AspectJ compiler. */ -public class AjBuildConfig { +public class AjBuildConfig { // XXX needs bootclasspath? public static final String AJLINT_IGNORE = "ignore"; public static final String AJLINT_WARN = "warn"; public static final String AJLINT_ERROR = "error"; public static final String AJLINT_DEFAULT = "default"; - + private File outputDir; private File outputJar; private List/*File*/ sourceRoots = new ArrayList(); @@ -52,6 +53,9 @@ public class AjBuildConfig { private boolean XnoInline = false; private String lintMode = AJLINT_DEFAULT; private File lintSpecFile = null; + + /** if true, then global values override local when joining */ + private boolean override = true; // incremental variants handled by the compiler client, but parsed here private boolean incrementalMode; @@ -317,5 +321,97 @@ public class AjBuildConfig { || (0 < inJars.size()) ); } + + /** @return null if no errors, String errors otherwise */ + public String configErrors() { + StringBuffer result = new StringBuffer(); + // ok, permit both. sigh. +// if ((null != outputDir) && (null != outputJar)) { +// result.append("specified both outputDir and outputJar"); +// } + // incremental => only sourceroots + // + return (0 == result.length() ? null : result.toString()); + } + + /** + * Install global values into local config + * unless values conflict: + *