ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From meta...@locus.apache.org
Subject cvs commit: jakarta-ant/src/antidote/org/apache/tools/ant/gui/event AntBuildEvent.java AntEvent.java BuildFinishedEvent.java BuildStartedEvent.java BusFilter.java BusMember.java ElementSelectionEvent.java ErrorEvent.java NewProjectEvent.java OpenRequestEvent.java ProjectClosedEvent.java
Date Sat, 25 Nov 2000 04:31:31 GMT
metasim     00/11/24 20:31:31

  Modified:    src/antidote/org/apache/tools/ant/gui/command AboutCmd.java
                        AbstractCommand.java BuildCmd.java
                        ChangeLookAndFeelCmd.java CloseCmd.java
                        Command.java DisplayErrorCmd.java
                        EmacsNotifyCmd.java ExitCmd.java LoadFileCmd.java
                        NoOpCmd.java OpenCmd.java SaveAsCmd.java
                        SaveCmd.java
               src/antidote/org/apache/tools/ant/gui/event
                        AntBuildEvent.java AntEvent.java
                        BuildFinishedEvent.java BuildStartedEvent.java
                        BusFilter.java BusMember.java
                        ElementSelectionEvent.java ErrorEvent.java
                        NewProjectEvent.java OpenRequestEvent.java
                        ProjectClosedEvent.java
  Log:
  More rework on the command abstraction code.
  
  Revision  Changes    Path
  1.3       +3 -2      jakarta-ant/src/antidote/org/apache/tools/ant/gui/command/AboutCmd.java
  
  Index: AboutCmd.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/antidote/org/apache/tools/ant/gui/command/AboutCmd.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- AboutCmd.java	2000/11/24 17:09:15	1.2
  +++ AboutCmd.java	2000/11/25 04:31:24	1.3
  @@ -61,7 +61,7 @@
   /**
    * Handler for the About command.
    * 
  - * @version $Revision: 1.2 $ 
  + * @version $Revision: 1.3 $ 
    * @author Simeon Fitch 
    */
   public class AboutCmd extends AbstractCommand {
  @@ -70,7 +70,8 @@
   	 * Standard constructor. 
   	 * 
   	 */
  -    public AboutCmd() {
  +    public AboutCmd(AppContext context) {
  +        super(context);
       }
   
   	/** 
  
  
  
  1.2       +2 -10     jakarta-ant/src/antidote/org/apache/tools/ant/gui/command/AbstractCommand.java
  
  Index: AbstractCommand.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/antidote/org/apache/tools/ant/gui/command/AbstractCommand.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- AbstractCommand.java	2000/11/24 17:09:15	1.1
  +++ AbstractCommand.java	2000/11/25 04:31:25	1.2
  @@ -58,7 +58,7 @@
   /**
    * Convenience base class for Command implementations.
    * 
  - * @version $Revision: 1.1 $ 
  + * @version $Revision: 1.2 $ 
    * @author Simeon Fitch 
    */
   public abstract class AbstractCommand implements Command {
  @@ -69,15 +69,7 @@
   	 * Default ctor.
   	 * 
   	 */
  -    protected AbstractCommand() {
  -    }
  -
  -	/** 
  -	 * Set the application context.
  -	 * 
  -	 * @param context Application context.
  -	 */
  -    public void setContext(AppContext context) {
  +    protected AbstractCommand(AppContext context) {
           _context = context;
       }
   
  
  
  
  1.4       +3 -2      jakarta-ant/src/antidote/org/apache/tools/ant/gui/command/BuildCmd.java
  
  Index: BuildCmd.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/antidote/org/apache/tools/ant/gui/command/BuildCmd.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- BuildCmd.java	2000/11/24 17:09:15	1.3
  +++ BuildCmd.java	2000/11/25 04:31:25	1.4
  @@ -59,7 +59,7 @@
   /**
    * Starts an Ant build.
    * 
  - * @version $Revision: 1.3 $ 
  + * @version $Revision: 1.4 $ 
    * @author Simeon Fitch 
    */
   public class BuildCmd extends AbstractCommand {
  @@ -68,7 +68,8 @@
   	 * Standard ctor.
   	 * 
   	 */
  -    public BuildCmd() {
  +    public BuildCmd(AppContext context) { 
  +        super(context);
       }
   
   	/** 
  
  
  
  1.3       +3 -2      jakarta-ant/src/antidote/org/apache/tools/ant/gui/command/ChangeLookAndFeelCmd.java
  
  Index: ChangeLookAndFeelCmd.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/antidote/org/apache/tools/ant/gui/command/ChangeLookAndFeelCmd.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- ChangeLookAndFeelCmd.java	2000/11/24 17:09:15	1.2
  +++ ChangeLookAndFeelCmd.java	2000/11/25 04:31:25	1.3
  @@ -58,7 +58,7 @@
   /**
    * ChangeLookAndFeel command.
    *
  - * @version $Revision: 1.2 $
  + * @version $Revision: 1.3 $
    * @author Erik Meade
    * @author Simeon Fitch
    */
  @@ -67,7 +67,8 @@
   	 * Standard ctor.
   	 *
   	 */
  -    public ChangeLookAndFeelCmd() {
  +    public ChangeLookAndFeelCmd(AppContext context) {
  +        super(context);
       }
   
   	/**
  
  
  
  1.4       +3 -2      jakarta-ant/src/antidote/org/apache/tools/ant/gui/command/CloseCmd.java
  
  Index: CloseCmd.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/antidote/org/apache/tools/ant/gui/command/CloseCmd.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- CloseCmd.java	2000/11/24 17:09:15	1.3
  +++ CloseCmd.java	2000/11/25 04:31:25	1.4
  @@ -59,7 +59,7 @@
   /**
    * Handler for the close command.
    * 
  - * @version $Revision: 1.3 $ 
  + * @version $Revision: 1.4 $ 
    * @author Simeon Fitch 
    */
   public class CloseCmd extends AbstractCommand {
  @@ -68,7 +68,8 @@
   	 * Standard constructor. 
   	 * 
   	 */
  -    public CloseCmd() {
  +    public CloseCmd(AppContext context) {
  +        super(context);
       }
   
   	/** 
  
  
  
  1.3       +3 -10     jakarta-ant/src/antidote/org/apache/tools/ant/gui/command/Command.java
  
  Index: Command.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/antidote/org/apache/tools/ant/gui/command/Command.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- Command.java	2000/11/24 17:09:15	1.2
  +++ Command.java	2000/11/25 04:31:25	1.3
  @@ -57,23 +57,16 @@
   
   
   /**
  - * Interface for commands.  Implementation needs to have a default ctor. 
  + * Interface for commands. 
    * Details TBD
    * 
  - * @version $Revision: 1.2 $ 
  + * @version $Revision: 1.3 $ 
    * @author Simeon Fitch 
    */
   public interface Command extends Runnable {
   	/** 
  -	 * Set the application context.
  -	 * 
  -	 * @param context Application context.
  -	 */
  -    public void setContext(AppContext context);
  -
  -	/** 
   	 * Run the command. From interface Runnable.
   	 * 
   	 */
  -    public void run();
  +    void run();
   }
  
  
  
  1.4       +10 -6     jakarta-ant/src/antidote/org/apache/tools/ant/gui/command/DisplayErrorCmd.java
  
  Index: DisplayErrorCmd.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/antidote/org/apache/tools/ant/gui/command/DisplayErrorCmd.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- DisplayErrorCmd.java	2000/11/24 17:09:16	1.3
  +++ DisplayErrorCmd.java	2000/11/25 04:31:25	1.4
  @@ -62,7 +62,7 @@
   /**
    * Command for displaying an arbitrary error message to the user.
    *
  - * @version $Revision: 1.3 $ 
  + * @version $Revision: 1.4 $ 
    * @author Simeon H.K. Fitch 
    */
   public class DisplayErrorCmd extends AbstractCommand {
  @@ -72,19 +72,23 @@
       private Throwable _ex = null;
   
   	/** 
  -	 * Default ctor.
  +	 * Standard ctor.
   	 * 
  +	 * @param context Application context.
   	 */
  -    public DisplayErrorCmd() {
  +    public DisplayErrorCmd(AppContext context) {
  +        super(context);
       }
   
   	/** 
   	 * Standard constuctor.
   	 * 
  +	 * @param context Application context.
   	 * @param message Error message.
   	 * @param ex Throwable assocated with error.
   	 */
  -    public DisplayErrorCmd(String message, Throwable ex) {
  +    public DisplayErrorCmd(AppContext context, String message, Throwable ex) {
  +        this(context);
           setMessage(message);
           setThrowable(_ex);
       }
  @@ -95,8 +99,8 @@
   	 * @param context Application context.
   	 * @param message Error message.
   	 */
  -    public DisplayErrorCmd(String message) {
  -        this(message, null);
  +    public DisplayErrorCmd(AppContext context, String message) {
  +        this(context, message, null);
       }
   
   	/** 
  
  
  
  1.3       +4 -3      jakarta-ant/src/antidote/org/apache/tools/ant/gui/command/EmacsNotifyCmd.java
  
  Index: EmacsNotifyCmd.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/antidote/org/apache/tools/ant/gui/command/EmacsNotifyCmd.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- EmacsNotifyCmd.java	2000/11/24 17:09:16	1.2
  +++ EmacsNotifyCmd.java	2000/11/25 04:31:25	1.3
  @@ -59,7 +59,7 @@
    * Toggle on or off the sending of error events to emacs so that 
    * it can display the source of the error.
    * 
  - * @version $Revision: 1.2 $ 
  + * @version $Revision: 1.3 $ 
    * @author Simeon Fitch 
    */
   public class EmacsNotifyCmd extends AbstractCommand {
  @@ -69,9 +69,10 @@
   	/** 
   	 * Standard ctor.
   	 * 
  -     * @param state True if notifying on, false for notifying off.
  +	 * @param context Application context.
   	 */
  -    public EmacsNotifyCmd() {
  +    public EmacsNotifyCmd(AppContext context) {
  +        super(context);
       }
   
   	/** 
  
  
  
  1.3       +4 -2      jakarta-ant/src/antidote/org/apache/tools/ant/gui/command/ExitCmd.java
  
  Index: ExitCmd.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/antidote/org/apache/tools/ant/gui/command/ExitCmd.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- ExitCmd.java	2000/11/24 17:09:16	1.2
  +++ ExitCmd.java	2000/11/25 04:31:25	1.3
  @@ -62,15 +62,17 @@
   /**
    * Handler for an exit command .
    * 
  - * @version $Revision: 1.2 $ 
  + * @version $Revision: 1.3 $ 
    * @author Simeon Fitch 
    */
   public class ExitCmd extends AbstractCommand {
   	/** 
   	 * Standard constructor. 
   	 * 
  +	 * @param context Application context.
   	 */
  -    public ExitCmd() {
  +    public ExitCmd(AppContext context) {
  +        super(context);
       }
   
   	/** 
  
  
  
  1.5       +4 -2      jakarta-ant/src/antidote/org/apache/tools/ant/gui/command/LoadFileCmd.java
  
  Index: LoadFileCmd.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/antidote/org/apache/tools/ant/gui/command/LoadFileCmd.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- LoadFileCmd.java	2000/11/24 17:09:17	1.4
  +++ LoadFileCmd.java	2000/11/25 04:31:26	1.5
  @@ -61,7 +61,7 @@
   /**
    * Command for reading in a build file and initializing the data model.
    * 
  - * @version $Revision: 1.4 $ 
  + * @version $Revision: 1.5 $ 
    * @author Simeon Fitch 
    */
   public class LoadFileCmd extends  AbstractCommand {
  @@ -71,8 +71,10 @@
   	/** 
   	 * Standard ctor.
   	 * 
  +	 * @param context Application context.
   	 */
  -    public LoadFileCmd() {
  +    public LoadFileCmd(AppContext context) {
  +        super(context);
       }
   
   	/** 
  
  
  
  1.3       +11 -1     jakarta-ant/src/antidote/org/apache/tools/ant/gui/command/NoOpCmd.java
  
  Index: NoOpCmd.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/antidote/org/apache/tools/ant/gui/command/NoOpCmd.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- NoOpCmd.java	2000/11/24 17:09:17	1.2
  +++ NoOpCmd.java	2000/11/25 04:31:26	1.3
  @@ -52,14 +52,24 @@
    * <http://www.apache.org/>.
    */
   package org.apache.tools.ant.gui.command;
  +import org.apache.tools.ant.gui.AppContext;
   
   /**
    * NoOp command.
    * 
  - * @version $Revision: 1.2 $ 
  + * @version $Revision: 1.3 $ 
    * @author Simeon Fitch 
    */
   public class NoOpCmd extends AbstractCommand {
  +	/** 
  +     * Standard ctor.
  +     * 
  +	 * @param context Application context.
  +	 */
  +    public NoOpCmd(AppContext context) {
  +        super(context);
  +    }
  +
   	/** 
   	 * Successfully do nothing.
   	 * 
  
  
  
  1.4       +4 -2      jakarta-ant/src/antidote/org/apache/tools/ant/gui/command/OpenCmd.java
  
  Index: OpenCmd.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/antidote/org/apache/tools/ant/gui/command/OpenCmd.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- OpenCmd.java	2000/11/24 17:09:17	1.3
  +++ OpenCmd.java	2000/11/25 04:31:26	1.4
  @@ -64,15 +64,17 @@
    * user for selecting a build file to open. If a file is selected then an
    * OpenRequestEvent is posted.
    * 
  - * @version $Revision: 1.3 $ 
  + * @version $Revision: 1.4 $ 
    * @author Simeon Fitch 
    */
   public class OpenCmd extends AbstractCommand {
   	/** 
   	 * Standard ctor.
   	 * 
  +	 * @param context Application context.
   	 */
  -    public OpenCmd() {
  +    public OpenCmd(AppContext context) {
  +        super(context);
       }
   
   	/** 
  
  
  
  1.3       +4 -2      jakarta-ant/src/antidote/org/apache/tools/ant/gui/command/SaveAsCmd.java
  
  Index: SaveAsCmd.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/antidote/org/apache/tools/ant/gui/command/SaveAsCmd.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- SaveAsCmd.java	2000/11/24 17:09:17	1.2
  +++ SaveAsCmd.java	2000/11/25 04:31:26	1.3
  @@ -67,7 +67,7 @@
   /**
    * Command for doing a "Save as" type of save.
    * 
  - * @version $Revision: 1.2 $ 
  + * @version $Revision: 1.3 $ 
    * @author Simeon Fitch 
    */
   public class SaveAsCmd extends AbstractCommand {
  @@ -77,8 +77,10 @@
   	/** 
   	 * Standard ctor.
   	 * 
  +	 * @param context Application context.
   	 */
  -    public SaveAsCmd() {
  +    public SaveAsCmd(AppContext context) {
  +        super(context);
       }
   
   	/** 
  
  
  
  1.3       +4 -7      jakarta-ant/src/antidote/org/apache/tools/ant/gui/command/SaveCmd.java
  
  Index: SaveCmd.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/antidote/org/apache/tools/ant/gui/command/SaveCmd.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- SaveCmd.java	2000/11/24 17:09:17	1.2
  +++ SaveCmd.java	2000/11/25 04:31:26	1.3
  @@ -57,21 +57,18 @@
   /**
    * Command to execute the saving of the current build file.
    * 
  - * @version $Revision: 1.2 $ 
  + * @version $Revision: 1.3 $ 
    * @author Simeon Fitch 
    */
   public class SaveCmd extends SaveAsCmd {
   
  -    public SaveCmd() {
  -    }
  -
   	/** 
  -	 * Set the application context.
  +	 * Standard ctor.
   	 * 
   	 * @param context Application context.
   	 */
  -    public void setContext(AppContext context) {
  -        super.setContext(context);
  +    public SaveCmd(AppContext context) {
  +        super(context);
           setFile(context.getProject().getFile());
       }
   }
  
  
  
  1.2       +0 -9      jakarta-ant/src/antidote/org/apache/tools/ant/gui/event/AntBuildEvent.java
  
  Index: AntBuildEvent.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/antidote/org/apache/tools/ant/gui/event/AntBuildEvent.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- AntBuildEvent.java	2000/11/06 12:52:47	1.1
  +++ AntBuildEvent.java	2000/11/25 04:31:28	1.2
  @@ -62,7 +62,7 @@
   /**
    * Wrapper event for the events generated during an Ant build.
    * 
  - * @version $Revision: 1.1 $ 
  + * @version $Revision: 1.2 $ 
    * @author Simeon Fitch 
    */
   public class AntBuildEvent extends AntEvent {
  @@ -106,15 +106,6 @@
           return _type;
       }
   
  -	/** 
  -	 * Create the appropriate default response command to this event.
  -	 * 
  -	 * @return Command representing an appropriate response to this event.
  -	 */
  -    public Command createDefaultCmd() {
  -        return new NoOpCmd();
  -    }
  -    
   	/** 
   	 * Create a string representation of this.
   	 * 
  
  
  
  1.4       +9 -7      jakarta-ant/src/antidote/org/apache/tools/ant/gui/event/AntEvent.java
  
  Index: AntEvent.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/antidote/org/apache/tools/ant/gui/event/AntEvent.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- AntEvent.java	2000/11/24 17:09:21	1.3
  +++ AntEvent.java	2000/11/25 04:31:28	1.4
  @@ -53,13 +53,14 @@
    */
   package org.apache.tools.ant.gui.event;
   import org.apache.tools.ant.gui.command.Command;
  +import org.apache.tools.ant.gui.command.NoOpCmd;
   import org.apache.tools.ant.gui.AppContext;
   import java.util.EventObject;
   
   /**
    * Base class for all Ant specific events. Details TBD.
    * 
  - * @version $Revision: 1.3 $ 
  + * @version $Revision: 1.4 $ 
    * @author Simeon Fitch 
    */
   public abstract class AntEvent extends EventObject {
  @@ -87,11 +88,12 @@
   
   
   	/** 
  -	 * Create the appropriate default response command to this event.
  +	 * Override to create the appropriate default response
  +	 * command to this event.
   	 * 
  -	 * @return Command representing an appropriate response to this event.
  -	 */
  -    public abstract Command createDefaultCmd();
  -
  -
  +	 * @return Command representing an appropriate response to this event.  
  +     */
  +    public Command createDefaultCmd() {
  +        return new NoOpCmd(getContext());
  +    }
   }
  
  
  
  1.2       +0 -10     jakarta-ant/src/antidote/org/apache/tools/ant/gui/event/BuildFinishedEvent.java
  
  Index: BuildFinishedEvent.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/antidote/org/apache/tools/ant/gui/event/BuildFinishedEvent.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- BuildFinishedEvent.java	2000/11/14 21:50:12	1.1
  +++ BuildFinishedEvent.java	2000/11/25 04:31:28	1.2
  @@ -54,15 +54,13 @@
   package org.apache.tools.ant.gui.event;
   import org.apache.tools.ant.BuildEvent;
   import org.apache.tools.ant.gui.AppContext;
  -import org.apache.tools.ant.gui.command.NoOpCmd;
  -import org.apache.tools.ant.gui.command.Command;
   
   
   /**
    * Build finished. This event is a duplication of the information posted as
    * an AntBuildEvent when a build finishes.
    * 
  - * @version $Revision: 1.1 $ 
  + * @version $Revision: 1.2 $ 
    * @author Simeon Fitch 
    */
   public class BuildFinishedEvent extends AntEvent {
  @@ -90,12 +88,4 @@
           return _orig;
       }
   
  -	/** 
  -	 * Create the appropriate response command to this event.
  -	 * 
  -	 * @return Command representing an appropriate response to this event.
  -	 */
  -    public Command createDefaultCmd() {
  -        return new NoOpCmd();
  -    }
   }
  
  
  
  1.2       +0 -10     jakarta-ant/src/antidote/org/apache/tools/ant/gui/event/BuildStartedEvent.java
  
  Index: BuildStartedEvent.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/antidote/org/apache/tools/ant/gui/event/BuildStartedEvent.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- BuildStartedEvent.java	2000/11/14 21:50:12	1.1
  +++ BuildStartedEvent.java	2000/11/25 04:31:28	1.2
  @@ -54,15 +54,13 @@
   package org.apache.tools.ant.gui.event;
   import org.apache.tools.ant.BuildEvent;
   import org.apache.tools.ant.gui.AppContext;
  -import org.apache.tools.ant.gui.command.NoOpCmd;
  -import org.apache.tools.ant.gui.command.Command;
   
   
   /**
    * Build started. This event is a duplication of the information posted as
    * an AntBuildEvent when a build starts.
    * 
  - * @version $Revision: 1.1 $ 
  + * @version $Revision: 1.2 $ 
    * @author Simeon Fitch 
    */
   public class BuildStartedEvent extends AntEvent {
  @@ -90,12 +88,4 @@
           return _orig;
       }
   
  -	/** 
  -	 * Create the appropriate response command to this event.
  -	 * 
  -	 * @return Command representing an appropriate response to this event.
  -	 */
  -    public Command createDefaultCmd() {
  -        return new NoOpCmd();
  -    }
   }
  
  
  
  1.2       +2 -2      jakarta-ant/src/antidote/org/apache/tools/ant/gui/event/BusFilter.java
  
  Index: BusFilter.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/antidote/org/apache/tools/ant/gui/event/BusFilter.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- BusFilter.java	2000/11/03 12:04:29	1.1
  +++ BusFilter.java	2000/11/25 04:31:29	1.2
  @@ -59,7 +59,7 @@
    * Interace for determining whether an event should be given to a BusMember
    * instance.
    * 
  - * @version $Revision: 1.1 $ 
  + * @version $Revision: 1.2 $ 
    * @author Simeon Fitch 
    */
   public interface BusFilter {
  @@ -69,5 +69,5 @@
   	 * @param event Event to test.
   	 * @return True if event should be given to BusMember, false otherwise.
   	 */
  -    public boolean accept(EventObject event);
  +    boolean accept(EventObject event);
   }
  
  
  
  1.3       +3 -3      jakarta-ant/src/antidote/org/apache/tools/ant/gui/event/BusMember.java
  
  Index: BusMember.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/antidote/org/apache/tools/ant/gui/event/BusMember.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- BusMember.java	2000/11/15 21:25:58	1.2
  +++ BusMember.java	2000/11/25 04:31:29	1.3
  @@ -58,7 +58,7 @@
   /**
    * Interface for classes that want to be a member of the EventBus.
    * 
  - * @version $Revision: 1.2 $ 
  + * @version $Revision: 1.3 $ 
    * @author Simeon Fitch 
    */
   public interface BusMember {
  @@ -68,7 +68,7 @@
   	 * 
   	 * @return Filter to use.
   	 */
  -    public BusFilter getBusFilter();
  +    BusFilter getBusFilter();
   
   	/** 
   	 * Called when an event is to be posed to the member.
  @@ -77,6 +77,6 @@
        * @return true if event should be propogated, false if
        * it should be cancelled.
        */
  -    public boolean eventPosted(EventObject event);
  +    boolean eventPosted(EventObject event);
   
   }
  
  
  
  1.2       +1 -11     jakarta-ant/src/antidote/org/apache/tools/ant/gui/event/ElementSelectionEvent.java
  
  Index: ElementSelectionEvent.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/antidote/org/apache/tools/ant/gui/event/ElementSelectionEvent.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- ElementSelectionEvent.java	2000/11/11 04:54:05	1.1
  +++ ElementSelectionEvent.java	2000/11/25 04:31:29	1.2
  @@ -53,14 +53,12 @@
    */
   package org.apache.tools.ant.gui.event;
   import org.apache.tools.ant.gui.acs.ACSElement;
  -import org.apache.tools.ant.gui.command.Command;
  -import org.apache.tools.ant.gui.command.NoOpCmd;
   import org.apache.tools.ant.gui.AppContext;
   
   /**
    * Event indicating that the current set of selected targets has changed.
    * 
  - * @version $Revision: 1.1 $ 
  + * @version $Revision: 1.2 $ 
    * @author Simeon Fitch 
    */
   public class ElementSelectionEvent extends AntEvent {
  @@ -89,12 +87,4 @@
           return _selected;
       }
   
  -	/** 
  -	 * Create the appropriate default response command to this event.
  -	 * 
  -	 * @return Command representing an appropriate response to this event.
  -	 */
  -    public Command createDefaultCmd() {
  -        return new NoOpCmd();
  -    }
   }
  
  
  
  1.3       +2 -3      jakarta-ant/src/antidote/org/apache/tools/ant/gui/event/ErrorEvent.java
  
  Index: ErrorEvent.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/antidote/org/apache/tools/ant/gui/event/ErrorEvent.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- ErrorEvent.java	2000/11/24 17:09:21	1.2
  +++ ErrorEvent.java	2000/11/25 04:31:29	1.3
  @@ -61,7 +61,7 @@
   /**
    * Event fired whenever there is an error of any sort.
    * 
  - * @version $Revision: 1.2 $ 
  + * @version $Revision: 1.3 $ 
    * @author Simeon Fitch 
    */
   public class ErrorEvent extends AntEvent {
  @@ -109,8 +109,7 @@
   	 * @return Command representing an appropriate response to this event.
   	 */
       public Command createDefaultCmd() {
  -        Command retval = new DisplayErrorCmd(_message, _ex);
  -        retval.setContext(getContext());
  +        Command retval = new DisplayErrorCmd(getContext(), _message, _ex);
           return retval;
       }
   
  
  
  
  1.2       +1 -12     jakarta-ant/src/antidote/org/apache/tools/ant/gui/event/NewProjectEvent.java
  
  Index: NewProjectEvent.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/antidote/org/apache/tools/ant/gui/event/NewProjectEvent.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- NewProjectEvent.java	2000/11/03 12:04:30	1.1
  +++ NewProjectEvent.java	2000/11/25 04:31:29	1.2
  @@ -52,14 +52,12 @@
    * <http://www.apache.org/>.
    */
   package org.apache.tools.ant.gui.event;
  -import org.apache.tools.ant.gui.command.Command;
  -import org.apache.tools.ant.gui.command.NoOpCmd;
   import org.apache.tools.ant.gui.AppContext;
   
   /**
    * Event providing notification of a change in the current project.
    * 
  - * @version $Revision: 1.1 $ 
  + * @version $Revision: 1.2 $ 
    * @author Simeon Fitch 
    */
   public class NewProjectEvent extends AntEvent {
  @@ -71,14 +69,5 @@
   	 */
       public NewProjectEvent(AppContext context) {
           super(context);
  -    }
  -
  -	/** 
  -	 * Create the appropriate default response command to this event.
  -	 * 
  -	 * @return Command representing an appropriate response to this event.
  -	 */
  -    public Command createDefaultCmd() {
  -        return new NoOpCmd();
       }
   }
  
  
  
  1.3       +2 -3      jakarta-ant/src/antidote/org/apache/tools/ant/gui/event/OpenRequestEvent.java
  
  Index: OpenRequestEvent.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/antidote/org/apache/tools/ant/gui/event/OpenRequestEvent.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- OpenRequestEvent.java	2000/11/24 17:09:21	1.2
  +++ OpenRequestEvent.java	2000/11/25 04:31:29	1.3
  @@ -60,7 +60,7 @@
   /**
    * Event for requesting that the given file be opened.
    * 
  - * @version $Revision: 1.2 $ 
  + * @version $Revision: 1.3 $ 
    * @author Simeon Fitch 
    */
   public class OpenRequestEvent extends AntEvent {
  @@ -85,9 +85,8 @@
   	 * @return Load command.
   	 */
       public Command createDefaultCmd() {
  -        LoadFileCmd load = new LoadFileCmd();
  +        LoadFileCmd load = new LoadFileCmd(getContext());
           load.setFile(_file);
  -        load.setContext(getContext());
           return load;
       }
   }
  
  
  
  1.2       +0 -12     jakarta-ant/src/antidote/org/apache/tools/ant/gui/event/ProjectClosedEvent.java
  
  Index: ProjectClosedEvent.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/antidote/org/apache/tools/ant/gui/event/ProjectClosedEvent.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- ProjectClosedEvent.java	2000/11/14 21:50:12	1.1
  +++ ProjectClosedEvent.java	2000/11/25 04:31:29	1.2
  @@ -53,19 +53,16 @@
    */
   package org.apache.tools.ant.gui.event;
   import org.apache.tools.ant.gui.AppContext;
  -import org.apache.tools.ant.gui.command.NoOpCmd;
  -import org.apache.tools.ant.gui.command.Command;
   
   
   /**
    * Provides notification that the project was closed.
    * 
  - * @version $Revision: 1.1 $ 
  + * @version $Revision: 1.2 $ 
    * @author Simeon Fitch 
    */
   public class ProjectClosedEvent extends AntEvent {
   
  -
   	/** 
   	 * Standard ctor.
   	 * 
  @@ -73,14 +70,5 @@
   	 */
       public ProjectClosedEvent(AppContext context) {
           super(context);
  -    }
  -
  -	/** 
  -	 * Create the appropriate response command to this event.
  -	 * 
  -	 * @return Command representing an appropriate response to this event.
  -	 */
  -    public Command createDefaultCmd() {
  -        return new NoOpCmd();
       }
   }
  
  
  

Mime
View raw message