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/resources action.properties antidote.properties
Date Tue, 28 Nov 2000 05:05:14 GMT
metasim     00/11/27 21:05:13

  Modified:    src/antidote/org/apache/tools/ant/gui ActionManager.java
                        EventResponder.java ProjectNavigator.java
               src/antidote/org/apache/tools/ant/gui/event
                        ElementSelectionEvent.java
               src/antidote/org/apache/tools/ant/gui/resources
                        action.properties antidote.properties
  Added:       src/antidote/org/apache/tools/ant/gui/event
                        NullSelectionEvent.java ProjectSelectionEvent.java
                        PropertySelectionEvent.java
                        TargetSelectionEvent.java TaskSelectionEvent.java
  Log:
  Added infrastructure for generating popup menus from configured
  actions. The popup menu will then have options who's status is in sync
  with the menu and toolbar actions. Also added finer grained element
  selection code so that specific events are generated for specific
  element types. As a test, added stubbed out actions for adding new
  elements to the build file.
  
  Revision  Changes    Path
  1.8       +27 -2     jakarta-ant/src/antidote/org/apache/tools/ant/gui/ActionManager.java
  
  Index: ActionManager.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/antidote/org/apache/tools/ant/gui/ActionManager.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- ActionManager.java	2000/11/25 04:33:03	1.7
  +++ ActionManager.java	2000/11/28 05:05:09	1.8
  @@ -110,7 +110,7 @@
    * Manager of antidote actions. Receives its configuration from the action
    * ResourceBundle.
    * 
  - * @version $Revision: 1.7 $ 
  + * @version $Revision: 1.8 $ 
    * @author Simeon Fitch 
    */
   public class ActionManager {
  @@ -225,7 +225,9 @@
                           new JCheckBoxMenuItem(action.getName());
                       b.setActionCommand(action.getID());
                       b.addActionListener(action);
  -                    b.setAction(action);
  +                    // XXX eck. This is a 1.3 feature. Fix ME!
  +                    // Need to provide binding between action and widget.
  +//                    b.setAction(action);
                       addNiceStuff(b, action);
                       menu.add(b);
                   }
  @@ -256,6 +258,29 @@
                   button.setText(null);
   
                   addNiceStuff(button, action);
  +            }
  +        }
  +
  +        return retval;
  +    }
  +
  +	/** 
  +	 * Create a popup menu with the given actionIDs.
  +     * XXX check this for object leak. Does the button
  +     * get added to the action as a listener? There are also some
  +     * changes to this behavior in 1.3.
  +	 * 
  +	 * @param actionIDs List of action IDs for actions
  +     *  to appear in popup menu.
  +	 * @return Popup menu to display.
  +	 */
  +    public JPopupMenu createPopup(String[] actionIDs) {
  +        JPopupMenu retval = new JPopupMenu();
  +
  +        for(int i = 0; i < actionIDs.length; i++) {
  +            AntAction action = (AntAction) _actions.get(actionIDs[i]);
  +            if(action != null) {
  +                retval.add(action);
               }
           }
   
  
  
  
  1.8       +6 -1      jakarta-ant/src/antidote/org/apache/tools/ant/gui/EventResponder.java
  
  Index: EventResponder.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/antidote/org/apache/tools/ant/gui/EventResponder.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- EventResponder.java	2000/11/24 17:09:12	1.7
  +++ EventResponder.java	2000/11/28 05:05:09	1.8
  @@ -63,7 +63,7 @@
    * The purpose of this class is to watch for events that require some sort
    * of action, like opening a file.
    * 
  - * @version $Revision: 1.7 $ 
  + * @version $Revision: 1.8 $ 
    * @author Simeon Fitch 
    */
   class EventResponder {
  @@ -123,6 +123,11 @@
               else {
   				// XXX log me.
                   System.err.println("Unhandled action: " + command);
  +                // XXX temporary.
  +                new DisplayErrorCmd(
  +                    _context, 
  +                    "Sorry. \"" + command + 
  +                    "\" not implemented yet. Care to help out?").run();
                   return true;
               }
           }
  
  
  
  1.7       +29 -4     jakarta-ant/src/antidote/org/apache/tools/ant/gui/ProjectNavigator.java
  
  Index: ProjectNavigator.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/antidote/org/apache/tools/ant/gui/ProjectNavigator.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- ProjectNavigator.java	2000/11/15 21:25:33	1.6
  +++ ProjectNavigator.java	2000/11/28 05:05:09	1.7
  @@ -56,12 +56,14 @@
   import javax.swing.*;
   import java.awt.GridLayout;
   import java.awt.Dimension;
  +import java.awt.event.MouseAdapter;
  +import java.awt.event.MouseEvent;
   import java.util.EventObject;
   
   /**
    * AntEditor for displaying the project target in a 
    * 
  - * @version $Revision: 1.6 $ 
  + * @version $Revision: 1.7 $ 
    * @author Simeon Fitch 
    */
   class ProjectNavigator extends AntEditor {
  @@ -83,11 +85,12 @@
           _tree = new JTree();
           _tree.setModel(null);
           _tree.setCellRenderer(new AntTreeCellRenderer());
  +        _tree.addMouseListener(new PopupHandler());
           JScrollPane scroller = new JScrollPane(_tree);
           add(scroller);
   
  -        setPreferredSize(new Dimension(150, 100));
  -        setMinimumSize(new Dimension(150, 100));
  +        setPreferredSize(new Dimension(200, 100));
  +        setMinimumSize(new Dimension(200, 100));
   	}
   
       /** Class for handling project events. */
  @@ -112,7 +115,7 @@
            * it should be cancelled.
            */
           public boolean eventPosted(EventObject event) {
  -            ProjectProxy project = getAppContext().getProject();
  +            ProjectProxy project = getContext().getProject();
   
               if(project == null) {
                   // The project has been closed.
  @@ -142,4 +145,26 @@
           }
       }
   
  +    /** Mouse listener for showing popup menu. */
  +    private class PopupHandler extends MouseAdapter {
  +        private void handle(MouseEvent e) {
  +            if(e.isPopupTrigger()) {
  +                ActionManager mgr = getContext().getActions();
  +                JPopupMenu menu = mgr.createPopup(
  +                    getContext().getResources().getStringArray(
  +                        ProjectNavigator.class, "popupActions"));
  +                menu.show((JComponent)e.getSource(), e.getX(), e.getY());
  +            }
  +        }
  +
  +        public void mousePressed(MouseEvent e) {
  +            handle(e);
  +        }
  +        public void mouseReleased(MouseEvent e) {
  +            handle(e);
  +        }
  +        public void mouseClicked(MouseEvent e) {
  +            handle(e);
  +        }
  +    }
   }
  
  
  
  1.3       +47 -4     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.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- ElementSelectionEvent.java	2000/11/25 04:31:29	1.2
  +++ ElementSelectionEvent.java	2000/11/28 05:05:11	1.3
  @@ -52,13 +52,15 @@
    * <http://www.apache.org/>.
    */
   package org.apache.tools.ant.gui.event;
  -import org.apache.tools.ant.gui.acs.ACSElement;
  +import org.apache.tools.ant.gui.acs.*;
  +import org.apache.tools.ant.gui.command.Command;
  +import org.apache.tools.ant.gui.command.DisplayErrorCmd;
   import org.apache.tools.ant.gui.AppContext;
   
   /**
    * Event indicating that the current set of selected targets has changed.
    * 
  - * @version $Revision: 1.2 $ 
  + * @version $Revision: 1.3 $ 
    * @author Simeon Fitch 
    */
   public class ElementSelectionEvent extends AntEvent {
  @@ -72,8 +74,8 @@
   	 * @param context application context.
        * @param selected the selected Elements.
   	 */
  -    public ElementSelectionEvent(AppContext context, 
  -                                 ACSElement[] selected) {
  +    protected ElementSelectionEvent(AppContext context, 
  +                                    ACSElement[] selected) {
           super(context);
           _selected = selected;
       }
  @@ -87,4 +89,45 @@
           return _selected;
       }
   
  +
  +	/** 
  +	 * Factory method for creating the appropriate specialization of this
  +     * for communicating an element selection.
  +	 * 
  +	 * @param context App context.
  +	 * @param selected The set of selected events. The last elemetn in the 
  +     *                 array is used to determine the specialization of this
  +     *                 that should be returned.
  +	 * @return Event to communicate selection to.
  +	 */
  +    public static ElementSelectionEvent createEvent(AppContext context, 
  +                                                    ACSElement[] selected) {
  +        ElementSelectionEvent retval = null;
  +
  +        if(selected != null && selected.length > 0) {
  +            Class type = selected[selected.length - 1].getClass();
  +            if(type.isAssignableFrom(ACSTargetElement.class)) {
  +                retval = new TargetSelectionEvent(context, selected);
  +            }
  +            else if(type.isAssignableFrom(ACSTaskElement.class)) {
  +                retval = new TaskSelectionEvent(context, selected);
  +            }
  +            else if(type.isAssignableFrom(ACSPropertyElement.class)) {
  +                retval = new PropertySelectionEvent(context, selected);
  +            }
  +            else if(type.isAssignableFrom(ACSProjectElement.class)) {
  +                retval = new ProjectSelectionEvent(context, selected);
  +            }
  +            else {
  +                // For elements without a specific event
  +                // type just send and instance of this.
  +                retval = new ElementSelectionEvent(context, selected);
  +            }
  +        }
  +        else {
  +            retval = new NullSelectionEvent(context);
  +        }
  +
  +        return retval;
  +    }
   }
  
  
  
  1.1                  jakarta-ant/src/antidote/org/apache/tools/ant/gui/event/NullSelectionEvent.java
  
  Index: NullSelectionEvent.java
  ===================================================================
  /*
   * The Apache Software License, Version 1.1
   *
   * Copyright (c) 1999, 2000 The Apache Software Foundation.  All rights
   * reserved.
   *
   * Redistribution and use in source and binary forms, with or without
   * modification, are permitted provided that the following conditions
   * are met:
   *
   * 1. Redistributions of source code must retain the above copyright
   *    notice, this list of conditions and the following disclaimer.
   *
   * 2. Redistributions in binary form must reproduce the above copyright
   *    notice, this list of conditions and the following disclaimer in
   *    the documentation and/or other materials provided with the
   *    distribution.
   *
   * 3. The end-user documentation included with the redistribution, if
   *    any, must include the following acknowlegement:
   *       "This product includes software developed by the
   *        Apache Software Foundation (http://www.apache.org/)."
   *    Alternately, this acknowlegement may appear in the software itself,
   *    if and wherever such third-party acknowlegements normally appear.
   *
   * 4. The names "The Jakarta Project", "Tomcat", and "Apache Software
   *    Foundation" must not be used to endorse or promote products derived
   *    from this software without prior written permission. For written
   *    permission, please contact apache@apache.org.
   *
   * 5. Products derived from this software may not be called "Apache"
   *    nor may "Apache" appear in their names without prior written
   *    permission of the Apache Group.
   *
   * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
   * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
   * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
   * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
   * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
   * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
   * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
   * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
   * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
   * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
   * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
   * SUCH DAMAGE.
   * ====================================================================
   *
   * This software consists of voluntary contributions made by many
   * individuals on behalf of the Apache Software Foundation.  For more
   * information on the Apache Software Foundation, please see
   * <http://www.apache.org/>.
   */
  package org.apache.tools.ant.gui.event;
  import org.apache.tools.ant.gui.acs.ACSElement;
  import org.apache.tools.ant.gui.AppContext;
  
  /**
   * Event fired when no elements are selected.
   * 
   * @version $Revision: 1.1 $ 
   * @author Simeon Fitch 
   */
  public class NullSelectionEvent extends ElementSelectionEvent {
  	/** 
  	 * Standard ctor.
  	 * 
  	 * @param context application context.
       * @param selected the selected Elements.
  	 */
      public NullSelectionEvent(AppContext context) {
          super(context, null);
      }
  }
  
  
  
  1.1                  jakarta-ant/src/antidote/org/apache/tools/ant/gui/event/ProjectSelectionEvent.java
  
  Index: ProjectSelectionEvent.java
  ===================================================================
  /*
   * The Apache Software License, Version 1.1
   *
   * Copyright (c) 1999, 2000 The Apache Software Foundation.  All rights
   * reserved.
   *
   * Redistribution and use in source and binary forms, with or without
   * modification, are permitted provided that the following conditions
   * are met:
   *
   * 1. Redistributions of source code must retain the above copyright
   *    notice, this list of conditions and the following disclaimer.
   *
   * 2. Redistributions in binary form must reproduce the above copyright
   *    notice, this list of conditions and the following disclaimer in
   *    the documentation and/or other materials provided with the
   *    distribution.
   *
   * 3. The end-user documentation included with the redistribution, if
   *    any, must include the following acknowlegement:
   *       "This product includes software developed by the
   *        Apache Software Foundation (http://www.apache.org/)."
   *    Alternately, this acknowlegement may appear in the software itself,
   *    if and wherever such third-party acknowlegements normally appear.
   *
   * 4. The names "The Jakarta Project", "Tomcat", and "Apache Software
   *    Foundation" must not be used to endorse or promote products derived
   *    from this software without prior written permission. For written
   *    permission, please contact apache@apache.org.
   *
   * 5. Products derived from this software may not be called "Apache"
   *    nor may "Apache" appear in their names without prior written
   *    permission of the Apache Group.
   *
   * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
   * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
   * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
   * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
   * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
   * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
   * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
   * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
   * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
   * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
   * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
   * SUCH DAMAGE.
   * ====================================================================
   *
   * This software consists of voluntary contributions made by many
   * individuals on behalf of the Apache Software Foundation.  For more
   * information on the Apache Software Foundation, please see
   * <http://www.apache.org/>.
   */
  package org.apache.tools.ant.gui.event;
  import org.apache.tools.ant.gui.acs.ACSElement;
  import org.apache.tools.ant.gui.AppContext;
  
  /**
   * Event fired when the project node is selected.
   * 
   * @version $Revision: 1.1 $ 
   * @author Simeon Fitch 
   */
  public class ProjectSelectionEvent extends ElementSelectionEvent {
  	/** 
  	 * Standard ctor.
  	 * 
  	 * @param context application context.
       * @param selected the selected Elements.
  	 */
      public ProjectSelectionEvent(AppContext context, 
                                   ACSElement[] selected) {
          super(context, selected);
      }
  }
  
  
  
  1.1                  jakarta-ant/src/antidote/org/apache/tools/ant/gui/event/PropertySelectionEvent.java
  
  Index: PropertySelectionEvent.java
  ===================================================================
  /*
   * The Apache Software License, Version 1.1
   *
   * Copyright (c) 1999, 2000 The Apache Software Foundation.  All rights
   * reserved.
   *
   * Redistribution and use in source and binary forms, with or without
   * modification, are permitted provided that the following conditions
   * are met:
   *
   * 1. Redistributions of source code must retain the above copyright
   *    notice, this list of conditions and the following disclaimer.
   *
   * 2. Redistributions in binary form must reproduce the above copyright
   *    notice, this list of conditions and the following disclaimer in
   *    the documentation and/or other materials provided with the
   *    distribution.
   *
   * 3. The end-user documentation included with the redistribution, if
   *    any, must include the following acknowlegement:
   *       "This product includes software developed by the
   *        Apache Software Foundation (http://www.apache.org/)."
   *    Alternately, this acknowlegement may appear in the software itself,
   *    if and wherever such third-party acknowlegements normally appear.
   *
   * 4. The names "The Jakarta Project", "Tomcat", and "Apache Software
   *    Foundation" must not be used to endorse or promote products derived
   *    from this software without prior written permission. For written
   *    permission, please contact apache@apache.org.
   *
   * 5. Products derived from this software may not be called "Apache"
   *    nor may "Apache" appear in their names without prior written
   *    permission of the Apache Group.
   *
   * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
   * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
   * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
   * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
   * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
   * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
   * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
   * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
   * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
   * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
   * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
   * SUCH DAMAGE.
   * ====================================================================
   *
   * This software consists of voluntary contributions made by many
   * individuals on behalf of the Apache Software Foundation.  For more
   * information on the Apache Software Foundation, please see
   * <http://www.apache.org/>.
   */
  package org.apache.tools.ant.gui.event;
  import org.apache.tools.ant.gui.acs.ACSElement;
  import org.apache.tools.ant.gui.AppContext;
  
  /**
   * Event fired when one or more tasks are selected.
   * 
   * @version $Revision: 1.1 $ 
   * @author Simeon Fitch 
   */
  public class PropertySelectionEvent extends ElementSelectionEvent {
  	/** 
  	 * Standard ctor.
  	 * 
  	 * @param context application context.
       * @param selected the selected Elements.
  	 */
      public PropertySelectionEvent(AppContext context, 
                                ACSElement[] selected) {
          super(context, selected);
      }
  }
  
  
  
  1.4       +7 -31     jakarta-ant/src/antidote/org/apache/tools/ant/gui/event/TargetSelectionEvent.java
  
  
  
  
  1.1                  jakarta-ant/src/antidote/org/apache/tools/ant/gui/event/TaskSelectionEvent.java
  
  Index: TaskSelectionEvent.java
  ===================================================================
  /*
   * The Apache Software License, Version 1.1
   *
   * Copyright (c) 1999, 2000 The Apache Software Foundation.  All rights
   * reserved.
   *
   * Redistribution and use in source and binary forms, with or without
   * modification, are permitted provided that the following conditions
   * are met:
   *
   * 1. Redistributions of source code must retain the above copyright
   *    notice, this list of conditions and the following disclaimer.
   *
   * 2. Redistributions in binary form must reproduce the above copyright
   *    notice, this list of conditions and the following disclaimer in
   *    the documentation and/or other materials provided with the
   *    distribution.
   *
   * 3. The end-user documentation included with the redistribution, if
   *    any, must include the following acknowlegement:
   *       "This product includes software developed by the
   *        Apache Software Foundation (http://www.apache.org/)."
   *    Alternately, this acknowlegement may appear in the software itself,
   *    if and wherever such third-party acknowlegements normally appear.
   *
   * 4. The names "The Jakarta Project", "Tomcat", and "Apache Software
   *    Foundation" must not be used to endorse or promote products derived
   *    from this software without prior written permission. For written
   *    permission, please contact apache@apache.org.
   *
   * 5. Products derived from this software may not be called "Apache"
   *    nor may "Apache" appear in their names without prior written
   *    permission of the Apache Group.
   *
   * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
   * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
   * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
   * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
   * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
   * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
   * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
   * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
   * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
   * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
   * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
   * SUCH DAMAGE.
   * ====================================================================
   *
   * This software consists of voluntary contributions made by many
   * individuals on behalf of the Apache Software Foundation.  For more
   * information on the Apache Software Foundation, please see
   * <http://www.apache.org/>.
   */
  package org.apache.tools.ant.gui.event;
  import org.apache.tools.ant.gui.acs.ACSElement;
  import org.apache.tools.ant.gui.AppContext;
  
  /**
   * Event fired when one or more tasks are selected.
   * 
   * @version $Revision: 1.1 $ 
   * @author Simeon Fitch 
   */
  public class TaskSelectionEvent extends ElementSelectionEvent {
  	/** 
  	 * Standard ctor.
  	 * 
  	 * @param context application context.
       * @param selected the selected Elements.
  	 */
      public TaskSelectionEvent(AppContext context, 
                                ACSElement[] selected) {
          super(context, selected);
      }
  }
  
  
  
  1.9       +42 -3     jakarta-ant/src/antidote/org/apache/tools/ant/gui/resources/action.properties
  
  Index: action.properties
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/antidote/org/apache/tools/ant/gui/resources/action.properties,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- action.properties	2000/11/24 17:09:22	1.8
  +++ action.properties	2000/11/28 05:05:13	1.9
  @@ -3,8 +3,10 @@
   
   # Declare the list of known actions.
   actions=\
  -    open, save, saveas, close, exit, about, startBuild, stopBuild, \
  -    notifyEmacs, changeLookAndFeel 
  +    open, save, saveas, close, exit, about, \
  +    newTarget, newTask, newProperty \
  +    startBuild, stopBuild, \
  +    notifyEmacs, changeLookAndFeel
   
   # Configure the decalred actions.
   
  @@ -94,6 +96,43 @@
   stopBuild.disableOn=\
       org.apache.tools.ant.gui.event.BuildFinishedEvent
   
  +newTarget.name=New Target
  +newTarget.shortDescription=Create a new target
  +newTarget.icon=new-target.gif
  +newTarget.enabled=false
  +newTarget.separator=true
  +newTarget.enableOn=\
  +    org.apache.tools.ant.gui.event.ProjectSelectionEvent
  +newTarget.disableOn=\
  +    org.apache.tools.ant.gui.event.TargetSelectionEvent, \
  +    org.apache.tools.ant.gui.event.TaskSelectionEvent, \
  +    org.apache.tools.ant.gui.event.PropertySelectionEvent, \
  +    org.apache.tools.ant.gui.event.NullSelectionEvent
  +
  +newTask.name=New Task
  +newTask.shortDescription=Create a new task under the selected target
  +newTask.icon=new-task.gif
  +newTask.enabled=false
  +newTask.enableOn=\
  +    org.apache.tools.ant.gui.event.TargetSelectionEvent
  +newTask.disableOn=\
  +    org.apache.tools.ant.gui.event.ProjectClosedEvent, \
  +    org.apache.tools.ant.gui.event.TaskSelectionEvent, \
  +    org.apache.tools.ant.gui.event.PropertySelectionEvent, \
  +    org.apache.tools.ant.gui.event.NullSelectionEvent
  +
  +newProperty.name=New Property
  +newProperty.shortDescription=Create a new property under the selected element
  +newProperty.icon=new-property.gif
  +newProperty.enabled=false
  +newProperty.enableOn=\
  +    org.apache.tools.ant.gui.event.ProjectSelectionEvent, \
  +    org.apache.tools.ant.gui.event.TargetSelectionEvent, \
  +    org.apache.tools.ant.gui.event.TaskSelectionEvent
  +newProperty.disableOn=\
  +    org.apache.tools.ant.gui.event.PropertySelectionEvent, \
  +    org.apache.tools.ant.gui.event.NullSelectionEvent
  +
   changeLookAndFeel.name=Look and Feel...
   changeLookAndFeel.shortDescription=Change the Look and Feel
   changeLookAndFeel.parentMenuName=Options
  @@ -103,7 +142,7 @@
   
   notifyEmacs.name=Notify Emacs
   notifyEmacs.shortDescription=\
  -    Send a notification event to Emacs on build errors.
  +    Send a notification event to Emacs on build errors
   notifyEmacs.parentMenuName=Options
   notifyEmacs.toggle=true
   notifyEmacs.command=org.apache.tools.ant.gui.command.EmacsNotifyCmd
  
  
  
  1.14      +2 -0      jakarta-ant/src/antidote/org/apache/tools/ant/gui/resources/antidote.properties
  
  Index: antidote.properties
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/antidote/org/apache/tools/ant/gui/resources/antidote.properties,v
  retrieving revision 1.13
  retrieving revision 1.14
  diff -u -r1.13 -r1.14
  --- antidote.properties	2000/11/21 01:06:16	1.13
  +++ antidote.properties	2000/11/28 05:05:13	1.14
  @@ -23,6 +23,8 @@
   org.apache.tools.ant.gui.PropertyEditor.name=Properties
   
   org.apache.tools.ant.gui.ProjectNavigator.name=Project
  +org.apache.tools.ant.gui.ProjectNavigator.popupActions=\
  +    newTarget, newTask, newProperty
   
   org.apache.tools.ant.gui.TargetMonitor.name=Selected Target(s)
   org.apache.tools.ant.gui.TargetMonitor.defText=[none]
  
  
  

Mime
View raw message