diff options
author | Andy Clement <aclement@pivotal.io> | 2018-10-15 08:39:46 -0700 |
---|---|---|
committer | Andy Clement <aclement@pivotal.io> | 2018-10-15 08:39:46 -0700 |
commit | de731d49baf5d37a835da3e0140625f3b5101ba9 (patch) | |
tree | 7636d066e154c006d3649773100b611124d60f98 /ajde.core/src | |
parent | 5eea7c541aeb642f0c35cab2c6a16cec779b8b72 (diff) | |
download | aspectj-de731d49baf5d37a835da3e0140625f3b5101ba9.tar.gz aspectj-de731d49baf5d37a835da3e0140625f3b5101ba9.zip |
polish
Diffstat (limited to 'ajde.core/src')
-rw-r--r-- | ajde.core/src/org/aspectj/ajde/core/internal/AjdeCoreBuildManager.java | 21 |
1 files changed, 14 insertions, 7 deletions
diff --git a/ajde.core/src/org/aspectj/ajde/core/internal/AjdeCoreBuildManager.java b/ajde.core/src/org/aspectj/ajde/core/internal/AjdeCoreBuildManager.java index 5577a01af..08d3ee377 100644 --- a/ajde.core/src/org/aspectj/ajde/core/internal/AjdeCoreBuildManager.java +++ b/ajde.core/src/org/aspectj/ajde/core/internal/AjdeCoreBuildManager.java @@ -223,10 +223,12 @@ public class AjdeCoreBuildManager { if (configFile.exists() && configFile.isFile()) { args = new String[] { "@" + configFile.getAbsolutePath() }; } else { - List<String> l = compilerConfig.getProjectSourceFiles(); - if (l == null) { + List<String> projectSourceFiles = compilerConfig.getProjectSourceFiles(); + if (projectSourceFiles == null) { return null; } + List<String> l = new ArrayList<>(); + l.addAll(projectSourceFiles); // If the processor options are specified build the command line options for the JDT compiler to see String processor = compilerConfig.getProcessor(); if (processor != null && processor.length() != 0) { @@ -238,20 +240,25 @@ public class AjdeCoreBuildManager { l.add("-processorpath"); l.add(processorPath); } + if (compilerConfig.getOutputLocationManager() != null && + compilerConfig.getOutputLocationManager().getDefaultOutputLocation() != null) { + l.add("-d"); + l.add(compilerConfig.getOutputLocationManager().getDefaultOutputLocation().toString()); + } List<String> xmlfiles = compilerConfig.getProjectXmlConfigFiles(); if (xmlfiles != null && !xmlfiles.isEmpty()) { args = new String[l.size() + xmlfiles.size() + 1]; // TODO speedup int p = 0; for (int i = 0; i < l.size(); i++) { - args[p++] = (String) l.get(i); + args[p++] = l.get(i); } for (int i = 0; i < xmlfiles.size(); i++) { - args[p++] = (String) xmlfiles.get(i); + args[p++] = xmlfiles.get(i); } args[p++] = "-xmlConfigured"; } else { - args = (String[]) l.toArray(new String[l.size()]); + args = l.toArray(new String[l.size()]); } } @@ -320,7 +327,7 @@ public class AjdeCoreBuildManager { // Process the JAVA OPTIONS MAP Map<String,String> jom = compilerConfig.getJavaOptionsMap(); if (jom != null) { - String version = (String) jom.get(CompilerOptions.OPTION_Compliance); + String version = jom.get(CompilerOptions.OPTION_Compliance); if (version != null && !version.equals(CompilerOptions.VERSION_1_4)) { config.setBehaveInJava5Way(true); } @@ -383,7 +390,7 @@ public class AjdeCoreBuildManager { } else { tokens.addAll(tokenizeString(nonStdOptions)); } - String[] args = (String[]) tokens.toArray(new String[] {}); + String[] args = tokens.toArray(new String[] {}); // set the non-standard options in an alternate build config // (we don't want to lose the settings we already have) |