summaryrefslogtreecommitdiffstats
path: root/weaver
diff options
context:
space:
mode:
authorjhugunin <jhugunin>2003-05-01 19:47:43 +0000
committerjhugunin <jhugunin>2003-05-01 19:47:43 +0000
commitaebd6651d39ba218431cd860d469ceb3d8063f9b (patch)
tree8fe910169b2c45c0cc8349c1d0d2a4e6fa782fec /weaver
parent7e47f0f2fa4e805f11a67f953aeeeb3e959fcc3d (diff)
downloadaspectj-aebd6651d39ba218431cd860d469ceb3d8063f9b.tar.gz
aspectj-aebd6651d39ba218431cd860d469ceb3d8063f9b.zip
more progress messages for ajde
Diffstat (limited to 'weaver')
-rw-r--r--weaver/src/org/aspectj/weaver/bcel/BcelWeaver.java23
1 files changed, 21 insertions, 2 deletions
diff --git a/weaver/src/org/aspectj/weaver/bcel/BcelWeaver.java b/weaver/src/org/aspectj/weaver/bcel/BcelWeaver.java
index 56756a074..445ee75ec 100644
--- a/weaver/src/org/aspectj/weaver/bcel/BcelWeaver.java
+++ b/weaver/src/org/aspectj/weaver/bcel/BcelWeaver.java
@@ -20,6 +20,7 @@ import java.util.zip.*;
import org.apache.bcel.classfile.ClassParser;
import org.apache.bcel.classfile.JavaClass;
import org.aspectj.bridge.IMessage;
+import org.aspectj.bridge.IProgressListener;
import org.aspectj.util.FileUtil;
import org.aspectj.weaver.*;
import org.aspectj.weaver.patterns.DeclareParents;
@@ -28,6 +29,9 @@ import org.aspectj.weaver.patterns.Pointcut;
public class BcelWeaver implements IWeaver {
private BcelWorld world;
private CrosscuttingMembersSet xcutSet;
+ private IProgressListener progressListener = null;
+ private double progressMade;
+ private double progressPerClassFile;
public BcelWeaver(BcelWorld world) {
super();
@@ -328,10 +332,18 @@ public class BcelWeaver implements IWeaver {
// non-private for testing
LazyClassGen weave(UnwovenClassFile classFile, BcelObjectType classType) throws IOException {
- return weave(classFile, classType, true);
+ LazyClassGen ret = weave(classFile, classType, true);
+
+ if (progressListener != null) {
+ progressMade += progressPerClassFile;
+ progressListener.setProgress(progressMade);
+ progressListener.setText("woven: " + classFile.getFilename());
+ }
+
+ return ret;
}
- private LazyClassGen weave(UnwovenClassFile classFile, BcelObjectType classType, boolean dump) throws IOException {
+ private LazyClassGen weave(UnwovenClassFile classFile, BcelObjectType classType, boolean dump) throws IOException {
if (classType.isSynthetic()) {
if (dump) dumpUnchanged(classFile);
return null;
@@ -430,4 +442,11 @@ public class BcelWeaver implements IWeaver {
}
return result;
}
+
+ public void setProgressListener(IProgressListener listener, double previousProgress, double progressPerClassFile) {
+ progressListener = listener;
+ this.progressMade = previousProgress;
+ this.progressPerClassFile = progressPerClassFile;
+ }
+
}