You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by we...@apache.org on 2002/09/04 20:35:51 UTC
cvs commit: jakarta-commons-sandbox/jelly/src/java/org/apache/commons/jelly/tags/werkz JellyBuildListener.java
werken 2002/09/04 11:35:51
Modified: jelly/src/java/org/apache/commons/jelly/tags/werkz
JellyBuildListener.java
Log:
Adding emacs-mode to werkz, courtesy of James CE Johnson (jcej@tragus.org).
Revision Changes Path
1.4 +19 -0 jakarta-commons-sandbox/jelly/src/java/org/apache/commons/jelly/tags/werkz/JellyBuildListener.java
Index: JellyBuildListener.java
===================================================================
RCS file: /home/cvs/jakarta-commons-sandbox/jelly/src/java/org/apache/commons/jelly/tags/werkz/JellyBuildListener.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- JellyBuildListener.java 18 Jun 2002 18:36:43 -0000 1.3
+++ JellyBuildListener.java 4 Sep 2002 18:35:51 -0000 1.4
@@ -21,12 +21,25 @@
private boolean debug;
+ /** Whether or not to use emacs-style output */
+ protected boolean emacsMode = false;
+
public JellyBuildListener(XMLOutput out) {
this.taskStack = new Stack();
this.out = out;
this.debug = false;
}
+ /**
+ * Sets this logger to produce emacs (and other editor) friendly output.
+ *
+ * @param emacsMode <code>true</code> if output is to be unadorned so that
+ * emacs and other editors can parse files names, etc.
+ */
+ public void setEmacsMode(boolean emacsMode) {
+ this.emacsMode = emacsMode;
+ }
+
public boolean isDebug() {
return this.debug;
}
@@ -52,6 +65,12 @@
}
try {
+ if ( emacsMode ) {
+ out.write( event.getMessage() + "\n" );
+ out.flush();
+ return;
+ }
+
if ( ! this.taskStack.isEmpty() ) {
out.write( " [" + this.taskStack.peek() + "] " );
}
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>