diff options
author | jhugunin <jhugunin> | 2003-03-28 00:54:19 +0000 |
---|---|---|
committer | jhugunin <jhugunin> | 2003-03-28 00:54:19 +0000 |
commit | e3ad8bbd021d8949bc2c45a2e1749cb1d720a195 (patch) | |
tree | 031826b431705d94d1207e3174e7b8ee17c5e58b /ajde | |
parent | 8e31e9be0fe8c04fd6c1802a9262b9e1c00187dc (diff) | |
download | aspectj-e3ad8bbd021d8949bc2c45a2e1749cb1d720a195.tar.gz aspectj-e3ad8bbd021d8949bc2c45a2e1749cb1d720a195.zip |
Major changes in order to move to Eclipse-JDT 2.1 as a base.
In the process of this many changes were made to try to make
keeping up with the Eclipse-JDT code base as easy as possible in
the future.
Diffstat (limited to 'ajde')
-rw-r--r-- | ajde/.classpath | 3 | ||||
-rw-r--r-- | ajde/src/org/aspectj/ajde/internal/BuildNotifierAdapter.java | 27 | ||||
-rw-r--r-- | ajde/src/org/aspectj/ajde/internal/CompilerAdapter.java | 16 |
3 files changed, 16 insertions, 30 deletions
diff --git a/ajde/.classpath b/ajde/.classpath index 0a864e2b8..8b462a1e0 100644 --- a/ajde/.classpath +++ b/ajde/.classpath @@ -2,13 +2,12 @@ <classpath> <classpathentry kind="src" path="src"/> <classpathentry kind="src" path="testsrc"/> - <classpathentry kind="var" path="JRE_LIB" rootpath="JRE_SRCROOT" sourcepath="JRE_SRC"/> + <classpathentry kind="var" path="JRE_LIB" sourcepath="JRE_SRC"/> <classpathentry kind="src" path="/util"/> <classpathentry kind="lib" path="/lib/junit/junit.jar" sourcepath="/lib/junit/junit-src.jar"/> <classpathentry kind="src" path="/bridge"/> <classpathentry kind="src" path="/asm"/> <classpathentry kind="src" path="/org.aspectj.ajdt.core"/> <classpathentry kind="src" path="/org.eclipse.jdt.core"/> - <classpathentry kind="lib" path="/lib/eclipse2.0/jdtDepends.jar" sourcepath="/lib/eclipse2.0/jdtDependsSrc.zip"/> <classpathentry kind="output" path="bin"/> </classpath> diff --git a/ajde/src/org/aspectj/ajde/internal/BuildNotifierAdapter.java b/ajde/src/org/aspectj/ajde/internal/BuildNotifierAdapter.java index 18d51c6eb..1b309c5d2 100644 --- a/ajde/src/org/aspectj/ajde/internal/BuildNotifierAdapter.java +++ b/ajde/src/org/aspectj/ajde/internal/BuildNotifierAdapter.java @@ -15,12 +15,13 @@ package org.aspectj.ajde.internal; import org.aspectj.ajde.Ajde; import org.aspectj.ajde.BuildProgressMonitor; +import org.aspectj.bridge.IProgressListener; import org.eclipse.core.resources.IProject; import org.eclipse.core.runtime.OperationCanceledException; import org.eclipse.jdt.internal.compiler.env.ICompilationUnit; import org.eclipse.jdt.internal.core.builder.BuildNotifier; -public class BuildNotifierAdapter extends BuildNotifier { +public class BuildNotifierAdapter implements IProgressListener { private BuildProgressMonitor progressMonitor; private int numCompilationUnitPasses = 1; @@ -28,10 +29,8 @@ public class BuildNotifierAdapter extends BuildNotifier { private boolean cancelled = false; // ??? get rid of project coupling - public BuildNotifierAdapter(IProject project, BuildProgressMonitor progressMonitor, int numFiles) { - super(null, project); + public BuildNotifierAdapter(BuildProgressMonitor progressMonitor) { this.progressMonitor = progressMonitor; - this.numCompilationUnitPasses = numFiles*2; } public void begin() { @@ -44,24 +43,12 @@ public class BuildNotifierAdapter extends BuildNotifier { cancelled = true; } - public void compiled(ICompilationUnit unit) { - completedPasses++; - float val = (float)completedPasses/numCompilationUnitPasses; - int intVal = (int)((float)val*100); - progressMonitor.setProgressBarVal(intVal); - progressMonitor.setProgressText("compiled: " + new String(unit.getFileName())); + public void setProgress(double percentDone) { + progressMonitor.setProgressBarVal((int)(percentDone * progressMonitor.getProgressBarMax())); } - public void generatedBytecode(String message) { - completedPasses++; - float val = (float)completedPasses/numCompilationUnitPasses; - int intVal = (int)((float)val*100); - progressMonitor.setProgressBarVal(intVal); - progressMonitor.setProgressText(message); - } - - public void checkCancel() { - if (cancelled) throw new OperationCanceledException(); + public void setText(String text) { + progressMonitor.setProgressText(text); } } diff --git a/ajde/src/org/aspectj/ajde/internal/CompilerAdapter.java b/ajde/src/org/aspectj/ajde/internal/CompilerAdapter.java index 8d050d89c..e6e5669e2 100644 --- a/ajde/src/org/aspectj/ajde/internal/CompilerAdapter.java +++ b/ajde/src/org/aspectj/ajde/internal/CompilerAdapter.java @@ -70,11 +70,10 @@ public class CompilerAdapter { try { AjBuildConfig buildConfig = genBuildConfig(configFile); buildConfig.setGenerateModelMode(true); - currNotifier = new BuildNotifierAdapter( - AjBuildManager.DEFAULT_PROJECT, - progressMonitor, - buildConfig.getFiles().size()); - buildManager.setBuildNotifier(currNotifier); + + + currNotifier = new BuildNotifierAdapter(progressMonitor); + buildManager.setProgressListener(currNotifier); messageHandler.setBuildNotifierAdapter(currNotifier); String rtInfo = buildManager.checkRtJar(buildConfig); // !!! will get called twice @@ -401,9 +400,10 @@ public class CompilerAdapter { // ??? relies on only info messages being class-file written messages if (message.getKind().equals(IMessage.INFO)) { - if (buildNotifierAdapter != null) { - buildNotifierAdapter.generatedBytecode(message.getMessage()); - } + // ignore, need to get this info in a better way +// if (buildNotifierAdapter != null) { +// buildNotifierAdapter.generatedBytecode(message.getMessage()); +// } } else { taskListManager.addSourcelineTask( message.getMessage(), |