ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Erik Hatcher" <jakarta-...@ehatchersolutions.com>
Subject Re: PATCH: <record> support for emacs mode
Date Mon, 25 Mar 2002 06:08:15 GMT
Feedback inline below....

----- Original Message -----
From: "stephan beal" <stephan@wanderinghorse.net>
To: <ant-dev@jakarta.apache.org>
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
(stephan@wanderinghorse.net)
+ 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
(stephan@wanderinghorse.net)
+     * 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:ant-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-dev-help@jakarta.apache.org>


Mime
View raw message