Feedback inline below....
----- Original Message -----
From: "stephan beal" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Sunday, March 24, 2002 8:34 PM
Subject: PATCH: <record> support for emacs mode
> Summary:
> Patches to Main, Project, Recorder and RecorderEntry to enable <record>
tasks
> to take advantage of the -emacs command-line flag. Also adds <record
> emacsmode='boolean'.../> support. It's backwards-compatible except that
it
> fixes the bug that <record> didn't do emacs ;).
>
> IF the -emacs command-line parm is passed, that will override the default
> value for this setting (false) IF this object's XML representation does
> NOT specify a preference. If it specifies any preference, that will take
> precendent over the command-line parameter.
>
>
> This supercedes any earlier patch i sent for this.
Index: src/main/org/apache/tools/ant/Main.java
===================================================================
+ // quick hack to enable emacsMode in RecorderEntry
([EMAIL PROTECTED])
+ project.setProperty( Project.EMACS_MODE_FLAG, new
java.lang.Boolean(this.emacsMode).toString() );
No "quick hack" is going to get committed by me! :) (again, its a
comments issue - keep it professional)
Perhaps this flag should just become a getter/setter on Project?
Index: src/main/org/apache/tools/ant/Project.java
===================================================================
+ /**
+ * Quick hack to enable emacsMode in RecorderEntry
([EMAIL PROTECTED])
+ * This is not in Main because Task doesn't need to know about Main,
and i don't
+ * want to make it know about Main just to see this flag.
+ */
+ public final static String EMACS_MODE_FLAG = "ant.emacsmode";
Again, perhaps getter/setter for this would be better than a 'hack' through
the properties.
Index: src/main/org/apache/tools/ant/taskdefs/Recorder.java
===================================================================
+ /**
+ * Duh.
+ */
+ public boolean getEmacsmode() {
+ return this.emacsMode;
+ }
Why do you need this? Is it used somewhere?
Erik
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>