diff options
author | acolyer <acolyer> | 2005-09-26 19:11:55 +0000 |
---|---|---|
committer | acolyer <acolyer> | 2005-09-26 19:11:55 +0000 |
commit | 20cafd486b5f5181153fadc4179c2cf313c931a5 (patch) | |
tree | d39d479a80e60ce4ddffcede0ceeb8fa3707a0ee /org.aspectj.ajdt.core | |
parent | cf077b3b71ae47a556e230eb40dfa158abd4d037 (diff) | |
download | aspectj-20cafd486b5f5181153fadc4179c2cf313c931a5.tar.gz aspectj-20cafd486b5f5181153fadc4179c2cf313c931a5.zip |
a few more tweaks to fix for pr108123 and pr106500 - better diagnostics and exceptions, plus support for -Xdev:Pinpoint
Diffstat (limited to 'org.aspectj.ajdt.core')
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); } |