summaryrefslogtreecommitdiffstats
path: root/bridge/src
diff options
context:
space:
mode:
authorjhugunin <jhugunin>2003-03-28 00:54:19 +0000
committerjhugunin <jhugunin>2003-03-28 00:54:19 +0000
commite3ad8bbd021d8949bc2c45a2e1749cb1d720a195 (patch)
tree031826b431705d94d1207e3174e7b8ee17c5e58b /bridge/src
parent8e31e9be0fe8c04fd6c1802a9262b9e1c00187dc (diff)
downloadaspectj-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 'bridge/src')
-rw-r--r--bridge/src/org/aspectj/bridge/CountingMessageHandler.java14
-rw-r--r--bridge/src/org/aspectj/bridge/IProgressListener.java29
2 files changed, 43 insertions, 0 deletions
diff --git a/bridge/src/org/aspectj/bridge/CountingMessageHandler.java b/bridge/src/org/aspectj/bridge/CountingMessageHandler.java
index cbf5bd0ce..8c565a7b4 100644
--- a/bridge/src/org/aspectj/bridge/CountingMessageHandler.java
+++ b/bridge/src/org/aspectj/bridge/CountingMessageHandler.java
@@ -29,6 +29,15 @@ public class CountingMessageHandler implements IMessageHandler {
public final CountingMessageHandler proxy;
private final Hashtable counters;
+ public static CountingMessageHandler makeCountingMessageHandler(IMessageHandler handler) {
+ if (handler instanceof CountingMessageHandler) {
+ return (CountingMessageHandler)handler;
+ } else {
+ return new CountingMessageHandler(handler);
+ }
+ }
+
+
public CountingMessageHandler(IMessageHandler delegate) {
LangUtil.throwIaxIfNull(delegate, "delegate");
this.delegate = delegate;
@@ -126,4 +135,9 @@ public class CountingMessageHandler implements IMessageHandler {
private static class IntHolder {
int count;
}
+
+ public void reset() {
+ if (proxy != null) proxy.reset();
+ counters.clear();
+ }
}
diff --git a/bridge/src/org/aspectj/bridge/IProgressListener.java b/bridge/src/org/aspectj/bridge/IProgressListener.java
new file mode 100644
index 000000000..1686c64b0
--- /dev/null
+++ b/bridge/src/org/aspectj/bridge/IProgressListener.java
@@ -0,0 +1,29 @@
+/* *******************************************************************
+ * Copyright (c) 2003 Palo Alto Research Center, Incorporated (PARC).
+ * All rights reserved.
+ * This program and the accompanying materials are made available
+ * under the terms of the Common Public License v1.0
+ * which accompanies this distribution and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ *
+ * Contributors:
+ * Xerox/PARC initial implementation
+ * ******************************************************************/
+
+
+package org.aspectj.bridge;
+
+/**
+ * Used to give progress information typically to IDEs
+ */
+public interface IProgressListener {
+ /**
+ * @param text the current phase of processing
+ */
+ public void setText(String text);
+
+ /**
+ * @param percentDone how much work is completed so far
+ */
+ public void setProgress(double percentDone);
+}