aboutsummaryrefslogtreecommitdiffstats
path: root/org.aspectj.ajdt.core
diff options
context:
space:
mode:
Diffstat (limited to 'org.aspectj.ajdt.core')
-rw-r--r--org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/lookup/AjLookupEnvironment.java5
-rw-r--r--org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/AjBuildManager.java16
-rw-r--r--org.aspectj.ajdt.core/src/org/aspectj/tools/ajc/Main.java2
3 files changed, 18 insertions, 5 deletions
diff --git a/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/lookup/AjLookupEnvironment.java b/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/lookup/AjLookupEnvironment.java
index 5b64bd471..71c5d6085 100644
--- a/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/lookup/AjLookupEnvironment.java
+++ b/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/lookup/AjLookupEnvironment.java
@@ -568,7 +568,10 @@ public class AjLookupEnvironment extends LookupEnvironment implements AnonymousC
// future generations to enjoy. Method source is commented out at the end of this module
// doDeclareAnnotationOnFields();
- if (skipInners) return;
+ if (skipInners) {
+ CompilationAndWeavingContext.leavingPhase(tok);
+ return;
+ }
ReferenceBinding[] memberTypes = sourceType.memberTypes;
for (int i = 0, length = memberTypes.length; i < length; i++) {
diff --git a/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/AjBuildManager.java b/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/AjBuildManager.java
index 55ddf133a..2373f0456 100644
--- a/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/AjBuildManager.java
+++ b/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/AjBuildManager.java
@@ -176,7 +176,8 @@ public class AjBuildManager implements IOutputClassFileNameProvider,IBinarySourc
boolean canIncremental = state.prepareForNextBuild(buildConfig);
if (!canIncremental && !batch) { // retry as batch?
- return doBuild(buildConfig, baseHandler, true);
+ CompilationAndWeavingContext.leavingPhase(ct);
+ return doBuild(buildConfig, baseHandler, true);
}
this.handler =
CountingMessageHandler.makeCountingMessageHandler(baseHandler);
@@ -185,6 +186,7 @@ public class AjBuildManager implements IOutputClassFileNameProvider,IBinarySourc
if (check != null) {
if (FAIL_IF_RUNTIME_NOT_FOUND) {
MessageUtil.error(handler, check);
+ CompilationAndWeavingContext.leavingPhase(ct);
return false;
} else {
MessageUtil.warn(handler, check);
@@ -202,11 +204,15 @@ public class AjBuildManager implements IOutputClassFileNameProvider,IBinarySourc
initBcelWorld(handler);
}
if (handler.hasErrors()) {
+ CompilationAndWeavingContext.leavingPhase(ct);
return false;
}
if (buildConfig.getOutputJar() != null) {
- if (!openOutputStream(buildConfig.getOutputJar())) return false;
+ if (!openOutputStream(buildConfig.getOutputJar())) {
+ CompilationAndWeavingContext.leavingPhase(ct);
+ return false;
+ }
}
if (batch) {
@@ -218,6 +224,7 @@ public class AjBuildManager implements IOutputClassFileNameProvider,IBinarySourc
binarySourcesForTheNextCompile = state.getBinaryFilesToCompile(true);
performCompilation(buildConfig.getFiles());
if (handler.hasErrors()) {
+ CompilationAndWeavingContext.leavingPhase(ct);
return false;
}
@@ -241,6 +248,7 @@ public class AjBuildManager implements IOutputClassFileNameProvider,IBinarySourc
performCompilation(files);
if (handler.hasErrors() || (progressListener!=null && progressListener.isCancelledRequested())) {
+ CompilationAndWeavingContext.leavingPhase(ct);
return false;
}
binarySourcesForTheNextCompile = state.getBinaryFilesToCompile(false);
@@ -257,6 +265,7 @@ public class AjBuildManager implements IOutputClassFileNameProvider,IBinarySourc
AsmManager.getDefault().processDelta(files,state.addedFiles,state.deletedFiles);
}
if (!files.isEmpty()) {
+ CompilationAndWeavingContext.leavingPhase(ct);
return batchBuild(buildConfig, baseHandler);
} else {
if (AsmManager.isReporting())
@@ -279,8 +288,9 @@ public class AjBuildManager implements IOutputClassFileNameProvider,IBinarySourc
if (buildConfig.isGenerateModelMode()) {
AsmManager.getDefault().fireModelUpdated();
}
+ CompilationAndWeavingContext.leavingPhase(ct);
+
} finally {
- CompilationAndWeavingContext.leavingPhase(ct);
if (zos != null) {
closeOutputStream(buildConfig.getOutputJar());
}
diff --git a/org.aspectj.ajdt.core/src/org/aspectj/tools/ajc/Main.java b/org.aspectj.ajdt.core/src/org/aspectj/tools/ajc/Main.java
index e250c6b29..e34ec6ce1 100644
--- a/org.aspectj.ajdt.core/src/org/aspectj/tools/ajc/Main.java
+++ b/org.aspectj.ajdt.core/src/org/aspectj/tools/ajc/Main.java
@@ -144,7 +144,7 @@ public class Main {
String m = thrown.getMessage();
return THROWN_PREFIX
+ (null != m ? m + "\n": "")
- + CompilationAndWeavingContext.getCurrentContext()
+ + "\n" + CompilationAndWeavingContext.getCurrentContext()
+ LangUtil.renderException(thrown, true);
}