Browse Source

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.


git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@268251 13f79535-47bb-0310-9956-ffa450edef68
master
metasim 24 years ago
parent
commit
aefb450f22
11 changed files with 523 additions and 10 deletions
  1. +26
    -1
      src/antidote/org/apache/tools/ant/gui/ActionManager.java
  2. +5
    -0
      src/antidote/org/apache/tools/ant/gui/EventResponder.java
  3. +28
    -3
      src/antidote/org/apache/tools/ant/gui/ProjectNavigator.java
  4. +46
    -3
      src/antidote/org/apache/tools/ant/gui/event/ElementSelectionEvent.java
  5. +74
    -0
      src/antidote/org/apache/tools/ant/gui/event/NullSelectionEvent.java
  6. +75
    -0
      src/antidote/org/apache/tools/ant/gui/event/ProjectSelectionEvent.java
  7. +75
    -0
      src/antidote/org/apache/tools/ant/gui/event/PropertySelectionEvent.java
  8. +75
    -0
      src/antidote/org/apache/tools/ant/gui/event/TargetSelectionEvent.java
  9. +75
    -0
      src/antidote/org/apache/tools/ant/gui/event/TaskSelectionEvent.java
  10. +42
    -3
      src/antidote/org/apache/tools/ant/gui/resources/action.properties
  11. +2
    -0
      src/antidote/org/apache/tools/ant/gui/resources/antidote.properties

+ 26
- 1
src/antidote/org/apache/tools/ant/gui/ActionManager.java View File

@@ -225,7 +225,9 @@ public class ActionManager {
new JCheckBoxMenuItem(action.getName()); new JCheckBoxMenuItem(action.getName());
b.setActionCommand(action.getID()); b.setActionCommand(action.getID());
b.addActionListener(action); 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); addNiceStuff(b, action);
menu.add(b); menu.add(b);
} }
@@ -259,6 +261,29 @@ public class ActionManager {
} }
} }


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);
}
}

return retval; return retval;
} }




+ 5
- 0
src/antidote/org/apache/tools/ant/gui/EventResponder.java View File

@@ -123,6 +123,11 @@ class EventResponder {
else { else {
// XXX log me. // XXX log me.
System.err.println("Unhandled action: " + command); System.err.println("Unhandled action: " + command);
// XXX temporary.
new DisplayErrorCmd(
_context,
"Sorry. \"" + command +
"\" not implemented yet. Care to help out?").run();
return true; return true;
} }
} }


+ 28
- 3
src/antidote/org/apache/tools/ant/gui/ProjectNavigator.java View File

@@ -56,6 +56,8 @@ import org.apache.tools.ant.gui.event.*;
import javax.swing.*; import javax.swing.*;
import java.awt.GridLayout; import java.awt.GridLayout;
import java.awt.Dimension; import java.awt.Dimension;
import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;
import java.util.EventObject; import java.util.EventObject;


/** /**
@@ -83,11 +85,12 @@ class ProjectNavigator extends AntEditor {
_tree = new JTree(); _tree = new JTree();
_tree.setModel(null); _tree.setModel(null);
_tree.setCellRenderer(new AntTreeCellRenderer()); _tree.setCellRenderer(new AntTreeCellRenderer());
_tree.addMouseListener(new PopupHandler());
JScrollPane scroller = new JScrollPane(_tree); JScrollPane scroller = new JScrollPane(_tree);
add(scroller); 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. */ /** Class for handling project events. */
@@ -112,7 +115,7 @@ class ProjectNavigator extends AntEditor {
* it should be cancelled. * it should be cancelled.
*/ */
public boolean eventPosted(EventObject event) { public boolean eventPosted(EventObject event) {
ProjectProxy project = getAppContext().getProject();
ProjectProxy project = getContext().getProject();


if(project == null) { if(project == null) {
// The project has been closed. // The project has been closed.
@@ -142,4 +145,26 @@ class ProjectNavigator extends AntEditor {
} }
} }


/** 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);
}
}
} }

+ 46
- 3
src/antidote/org/apache/tools/ant/gui/event/ElementSelectionEvent.java View File

@@ -52,7 +52,9 @@
* <http://www.apache.org/>. * <http://www.apache.org/>.
*/ */
package org.apache.tools.ant.gui.event; 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; import org.apache.tools.ant.gui.AppContext;


/** /**
@@ -72,8 +74,8 @@ public class ElementSelectionEvent extends AntEvent {
* @param context application context. * @param context application context.
* @param selected the selected Elements. * @param selected the selected Elements.
*/ */
public ElementSelectionEvent(AppContext context,
ACSElement[] selected) {
protected ElementSelectionEvent(AppContext context,
ACSElement[] selected) {
super(context); super(context);
_selected = selected; _selected = selected;
} }
@@ -87,4 +89,45 @@ public class ElementSelectionEvent extends AntEvent {
return _selected; 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;
}
} }

+ 74
- 0
src/antidote/org/apache/tools/ant/gui/event/NullSelectionEvent.java View File

@@ -0,0 +1,74 @@
/*
* 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$
* @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);
}
}

+ 75
- 0
src/antidote/org/apache/tools/ant/gui/event/ProjectSelectionEvent.java View File

@@ -0,0 +1,75 @@
/*
* 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$
* @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);
}
}

+ 75
- 0
src/antidote/org/apache/tools/ant/gui/event/PropertySelectionEvent.java View File

@@ -0,0 +1,75 @@
/*
* 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$
* @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);
}
}

+ 75
- 0
src/antidote/org/apache/tools/ant/gui/event/TargetSelectionEvent.java View File

@@ -0,0 +1,75 @@
/*
* 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 targets are selected.
*
* @version $Revision$
* @author Simeon Fitch
*/
public class TargetSelectionEvent extends ElementSelectionEvent {
/**
* Standard ctor.
*
* @param context application context.
* @param selected the selected Elements.
*/
public TargetSelectionEvent(AppContext context,
ACSElement[] selected) {
super(context, selected);
}
}

+ 75
- 0
src/antidote/org/apache/tools/ant/gui/event/TaskSelectionEvent.java View File

@@ -0,0 +1,75 @@
/*
* 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$
* @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);
}
}

+ 42
- 3
src/antidote/org/apache/tools/ant/gui/resources/action.properties View File

@@ -3,8 +3,10 @@ menus=File, Build, Options, Help


# Declare the list of known actions. # Declare the list of known actions.
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. # Configure the decalred actions.


@@ -94,6 +96,43 @@ stopBuild.enableOn=\
stopBuild.disableOn=\ stopBuild.disableOn=\
org.apache.tools.ant.gui.event.BuildFinishedEvent 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.name=Look and Feel...
changeLookAndFeel.shortDescription=Change the Look and Feel changeLookAndFeel.shortDescription=Change the Look and Feel
changeLookAndFeel.parentMenuName=Options changeLookAndFeel.parentMenuName=Options
@@ -103,7 +142,7 @@ changeLookAndFeel.separator=true


notifyEmacs.name=Notify Emacs notifyEmacs.name=Notify Emacs
notifyEmacs.shortDescription=\ notifyEmacs.shortDescription=\
Send a notification event to Emacs on build errors.
Send a notification event to Emacs on build errors
notifyEmacs.parentMenuName=Options notifyEmacs.parentMenuName=Options
notifyEmacs.toggle=true notifyEmacs.toggle=true
notifyEmacs.command=org.apache.tools.ant.gui.command.EmacsNotifyCmd notifyEmacs.command=org.apache.tools.ant.gui.command.EmacsNotifyCmd

+ 2
- 0
src/antidote/org/apache/tools/ant/gui/resources/antidote.properties View File

@@ -23,6 +23,8 @@ org.apache.tools.ant.gui.SourceEditor.name=Source
org.apache.tools.ant.gui.PropertyEditor.name=Properties org.apache.tools.ant.gui.PropertyEditor.name=Properties


org.apache.tools.ant.gui.ProjectNavigator.name=Project 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.name=Selected Target(s)
org.apache.tools.ant.gui.TargetMonitor.defText=[none] org.apache.tools.ant.gui.TargetMonitor.defText=[none]


Loading…
Cancel
Save