git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@268382 13f79535-47bb-0310-9956-ffa450edef68master
| @@ -54,6 +54,7 @@ | |||||
| package org.apache.tools.ant.gui; | package org.apache.tools.ant.gui; | ||||
| import org.apache.tools.ant.gui.util.WindowUtils; | import org.apache.tools.ant.gui.util.WindowUtils; | ||||
| import org.apache.tools.ant.gui.core.AppContext; | |||||
| import javax.swing.*; | import javax.swing.*; | ||||
| import java.io.IOException; | import java.io.IOException; | ||||
| import java.util.*; | import java.util.*; | ||||
| @@ -52,7 +52,7 @@ | |||||
| * <http://www.apache.org/>. | * <http://www.apache.org/>. | ||||
| */ | */ | ||||
| package org.apache.tools.ant.gui; | package org.apache.tools.ant.gui; | ||||
| import org.apache.tools.ant.gui.core.*; | |||||
| import javax.swing.*; | import javax.swing.*; | ||||
| import java.awt.BorderLayout; | import java.awt.BorderLayout; | ||||
| import java.awt.Dimension; | import java.awt.Dimension; | ||||
| @@ -52,6 +52,8 @@ | |||||
| * <http://www.apache.org/>. | * <http://www.apache.org/>. | ||||
| */ | */ | ||||
| package org.apache.tools.ant.gui; | package org.apache.tools.ant.gui; | ||||
| import org.apache.tools.ant.gui.core.*; | |||||
| import org.apache.tools.ant.gui.util.XMLHelper; | |||||
| import org.apache.tools.ant.gui.command.LoadFileCmd; | import org.apache.tools.ant.gui.command.LoadFileCmd; | ||||
| import javax.swing.*; | import javax.swing.*; | ||||
| import java.awt.BorderLayout; | import java.awt.BorderLayout; | ||||
| @@ -1,94 +0,0 @@ | |||||
| /* | |||||
| * 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; | |||||
| import org.apache.tools.ant.Project; | |||||
| import javax.swing.text.DefaultStyledDocument; | |||||
| import java.io.*; | |||||
| /** | |||||
| * Provides a Document view on the Project XML source. | |||||
| * NB: This class currently looks nothing like it should. | |||||
| * Rather than just rendering a copy of the build file contents, | |||||
| * this class should implement a true document model, representing | |||||
| * the true XML sturcture of the build file. This is just a temporary | |||||
| * implementation. | |||||
| * | |||||
| * @version $Revision$ | |||||
| * @author Simeon Fitch | |||||
| */ | |||||
| public class ProjectDocument extends DefaultStyledDocument { | |||||
| // This is what the real constructor needs to look like... | |||||
| //public ProjectDocument(Project project) { | |||||
| //} | |||||
| public ProjectDocument(File f) { | |||||
| // XXX stubbed method. will go away. | |||||
| try { | |||||
| // XXX hack hack hack.... | |||||
| Reader reader = new BufferedReader(new FileReader(f)); | |||||
| char[] buf = new char[1024]; | |||||
| int num = 0; | |||||
| while((num = reader.read(buf)) >= 0) { | |||||
| insertString(getLength(), new String(buf, 0, num), null); | |||||
| } | |||||
| } | |||||
| catch(Exception ex) { | |||||
| // XXX log me. | |||||
| ex.printStackTrace(); | |||||
| } | |||||
| } | |||||
| } | |||||
| @@ -53,7 +53,7 @@ | |||||
| */ | */ | ||||
| package org.apache.tools.ant.gui.acs; | package org.apache.tools.ant.gui.acs; | ||||
| import org.apache.tools.ant.gui.ResourceManager; | |||||
| import org.apache.tools.ant.gui.core.ResourceManager; | |||||
| import java.beans.*; | import java.beans.*; | ||||
| /** | /** | ||||
| @@ -53,7 +53,7 @@ | |||||
| */ | */ | ||||
| package org.apache.tools.ant.gui.acs; | package org.apache.tools.ant.gui.acs; | ||||
| import org.apache.tools.ant.gui.ResourceManager; | |||||
| import org.apache.tools.ant.gui.core.ResourceManager; | |||||
| import org.apache.tools.ant.gui.customizer.DynamicCustomizer; | import org.apache.tools.ant.gui.customizer.DynamicCustomizer; | ||||
| import java.beans.*; | import java.beans.*; | ||||
| import javax.swing.ImageIcon; | import javax.swing.ImageIcon; | ||||
| @@ -51,7 +51,7 @@ | |||||
| * information on the Apache Software Foundation, please see | * information on the Apache Software Foundation, please see | ||||
| * <http://www.apache.org/>. | * <http://www.apache.org/>. | ||||
| */ | */ | ||||
| package org.apache.tools.ant.gui; | |||||
| package org.apache.tools.ant.gui.acs; | |||||
| import javax.swing.tree.DefaultTreeModel; | import javax.swing.tree.DefaultTreeModel; | ||||
| @@ -64,8 +64,8 @@ import org.apache.tools.ant.gui.acs.ACSProjectElement; | |||||
| * | * | ||||
| * @version $Revision$ | * @version $Revision$ | ||||
| * @author Simeon H.K. Fitch */ | * @author Simeon H.K. Fitch */ | ||||
| public class ProjectTreeModel extends DefaultTreeModel { | |||||
| public ProjectTreeModel(ACSProjectElement root) { | |||||
| public class ElementTreeModel extends DefaultTreeModel { | |||||
| public ElementTreeModel(ACSProjectElement root) { | |||||
| super(root); | super(root); | ||||
| } | } | ||||
| } | } | ||||
| @@ -51,7 +51,7 @@ | |||||
| * information on the Apache Software Foundation, please see | * information on the Apache Software Foundation, please see | ||||
| * <http://www.apache.org/>. | * <http://www.apache.org/>. | ||||
| */ | */ | ||||
| package org.apache.tools.ant.gui; | |||||
| package org.apache.tools.ant.gui.acs; | |||||
| import org.apache.tools.ant.gui.acs.ACSElement; | import org.apache.tools.ant.gui.acs.ACSElement; | ||||
| import org.apache.tools.ant.gui.acs.ACSTargetElement; | import org.apache.tools.ant.gui.acs.ACSTargetElement; | ||||
| @@ -65,12 +65,12 @@ import java.util.*; | |||||
| * @version $Revision$ | * @version $Revision$ | ||||
| * @author Simeon Fitch | * @author Simeon Fitch | ||||
| */ | */ | ||||
| class ElementSelectionModel extends DefaultTreeSelectionModel { | |||||
| public class ElementTreeSelectionModel extends DefaultTreeSelectionModel { | |||||
| /** | /** | ||||
| * Default ctor. | * Default ctor. | ||||
| * | * | ||||
| */ | */ | ||||
| public ElementSelectionModel() { | |||||
| public ElementTreeSelectionModel() { | |||||
| setSelectionMode(DISCONTIGUOUS_TREE_SELECTION); | setSelectionMode(DISCONTIGUOUS_TREE_SELECTION); | ||||
| } | } | ||||
| @@ -52,7 +52,7 @@ | |||||
| * <http://www.apache.org/>. | * <http://www.apache.org/>. | ||||
| */ | */ | ||||
| package org.apache.tools.ant.gui.command; | package org.apache.tools.ant.gui.command; | ||||
| import org.apache.tools.ant.gui.AppContext; | |||||
| import org.apache.tools.ant.gui.core.AppContext; | |||||
| import org.apache.tools.ant.gui.About; | import org.apache.tools.ant.gui.About; | ||||
| import java.awt.Window; | import java.awt.Window; | ||||
| import java.awt.event.WindowEvent; | import java.awt.event.WindowEvent; | ||||
| @@ -52,7 +52,7 @@ | |||||
| * <http://www.apache.org/>. | * <http://www.apache.org/>. | ||||
| */ | */ | ||||
| package org.apache.tools.ant.gui.command; | package org.apache.tools.ant.gui.command; | ||||
| import org.apache.tools.ant.gui.AppContext; | |||||
| import org.apache.tools.ant.gui.core.AppContext; | |||||
| /** | /** | ||||
| @@ -52,8 +52,8 @@ q * | |||||
| * <http://www.apache.org/>. | * <http://www.apache.org/>. | ||||
| */ | */ | ||||
| package org.apache.tools.ant.gui.command; | package org.apache.tools.ant.gui.command; | ||||
| import org.apache.tools.ant.gui.AppContext; | |||||
| import org.apache.tools.ant.gui.ProjectProxy; | |||||
| import org.apache.tools.ant.gui.core.AppContext; | |||||
| import org.apache.tools.ant.gui.core.ProjectProxy; | |||||
| import org.apache.tools.ant.gui.event.ErrorEvent; | import org.apache.tools.ant.gui.event.ErrorEvent; | ||||
| /** | /** | ||||
| @@ -52,8 +52,8 @@ | |||||
| * <http://www.apache.org/>. | * <http://www.apache.org/>. | ||||
| */ | */ | ||||
| package org.apache.tools.ant.gui.command; | package org.apache.tools.ant.gui.command; | ||||
| import org.apache.tools.ant.gui.AppContext; | |||||
| import org.apache.tools.ant.gui.ChangeLookAndFeel; | |||||
| import org.apache.tools.ant.gui.core.AppContext; | |||||
| import org.apache.tools.ant.gui.util.ChangeLookAndFeel; | |||||
| /** | /** | ||||
| * ChangeLookAndFeel command. | * ChangeLookAndFeel command. | ||||
| @@ -52,7 +52,7 @@ | |||||
| * <http://www.apache.org/>. | * <http://www.apache.org/>. | ||||
| */ | */ | ||||
| package org.apache.tools.ant.gui.command; | package org.apache.tools.ant.gui.command; | ||||
| import org.apache.tools.ant.gui.AppContext; | |||||
| import org.apache.tools.ant.gui.core.AppContext; | |||||
| import org.apache.tools.ant.gui.event.ProjectClosedEvent; | import org.apache.tools.ant.gui.event.ProjectClosedEvent; | ||||
| @@ -52,7 +52,7 @@ | |||||
| * <http://www.apache.org/>. | * <http://www.apache.org/>. | ||||
| */ | */ | ||||
| package org.apache.tools.ant.gui.command; | package org.apache.tools.ant.gui.command; | ||||
| import org.apache.tools.ant.gui.AppContext; | |||||
| import org.apache.tools.ant.gui.core.AppContext; | |||||
| @@ -52,7 +52,7 @@ | |||||
| * <http://www.apache.org/>. | * <http://www.apache.org/>. | ||||
| */ | */ | ||||
| package org.apache.tools.ant.gui.command; | package org.apache.tools.ant.gui.command; | ||||
| import org.apache.tools.ant.gui.AppContext; | |||||
| import org.apache.tools.ant.gui.core.AppContext; | |||||
| import org.apache.tools.ant.gui.util.StackFrame; | import org.apache.tools.ant.gui.util.StackFrame; | ||||
| import javax.swing.*; | import javax.swing.*; | ||||
| import java.awt.FlowLayout; | import java.awt.FlowLayout; | ||||
| @@ -52,7 +52,7 @@ | |||||
| * <http://www.apache.org/>. | * <http://www.apache.org/>. | ||||
| */ | */ | ||||
| package org.apache.tools.ant.gui.command; | package org.apache.tools.ant.gui.command; | ||||
| import org.apache.tools.ant.gui.AppContext; | |||||
| import org.apache.tools.ant.gui.core.AppContext; | |||||
| import org.apache.tools.ant.gui.ide.EmacsNotifier; | import org.apache.tools.ant.gui.ide.EmacsNotifier; | ||||
| /** | /** | ||||
| @@ -52,7 +52,7 @@ | |||||
| * <http://www.apache.org/>. | * <http://www.apache.org/>. | ||||
| */ | */ | ||||
| package org.apache.tools.ant.gui.command; | package org.apache.tools.ant.gui.command; | ||||
| import org.apache.tools.ant.gui.AppContext; | |||||
| import org.apache.tools.ant.gui.core.AppContext; | |||||
| import org.apache.tools.ant.gui.util.WindowUtils; | import org.apache.tools.ant.gui.util.WindowUtils; | ||||
| import java.awt.Window; | import java.awt.Window; | ||||
| @@ -52,8 +52,8 @@ | |||||
| * <http://www.apache.org/>. | * <http://www.apache.org/>. | ||||
| */ | */ | ||||
| package org.apache.tools.ant.gui.command; | package org.apache.tools.ant.gui.command; | ||||
| import org.apache.tools.ant.gui.AppContext; | |||||
| import org.apache.tools.ant.gui.ProjectProxy; | |||||
| import org.apache.tools.ant.gui.core.AppContext; | |||||
| import org.apache.tools.ant.gui.core.ProjectProxy; | |||||
| import org.apache.tools.ant.gui.event.ErrorEvent; | import org.apache.tools.ant.gui.event.ErrorEvent; | ||||
| import java.io.File; | import java.io.File; | ||||
| import java.io.IOException; | import java.io.IOException; | ||||
| @@ -52,7 +52,7 @@ | |||||
| * <http://www.apache.org/>. | * <http://www.apache.org/>. | ||||
| */ | */ | ||||
| package org.apache.tools.ant.gui.command; | package org.apache.tools.ant.gui.command; | ||||
| import org.apache.tools.ant.gui.AppContext; | |||||
| import org.apache.tools.ant.gui.core.AppContext; | |||||
| /** | /** | ||||
| * NoOp command. | * NoOp command. | ||||
| @@ -52,9 +52,9 @@ | |||||
| * <http://www.apache.org/>. | * <http://www.apache.org/>. | ||||
| */ | */ | ||||
| package org.apache.tools.ant.gui.command; | package org.apache.tools.ant.gui.command; | ||||
| import org.apache.tools.ant.gui.AppContext; | |||||
| import org.apache.tools.ant.gui.core.AppContext; | |||||
| import org.apache.tools.ant.gui.event.OpenRequestEvent; | import org.apache.tools.ant.gui.event.OpenRequestEvent; | ||||
| import org.apache.tools.ant.gui.XMLFileFilter; | |||||
| import org.apache.tools.ant.gui.core.XMLFileFilter; | |||||
| import javax.swing.JFileChooser; | import javax.swing.JFileChooser; | ||||
| import javax.swing.filechooser.FileFilter; | import javax.swing.filechooser.FileFilter; | ||||
| import java.io.File; | import java.io.File; | ||||
| @@ -52,13 +52,13 @@ | |||||
| * <http://www.apache.org/>. | * <http://www.apache.org/>. | ||||
| */ | */ | ||||
| package org.apache.tools.ant.gui.command; | package org.apache.tools.ant.gui.command; | ||||
| import org.apache.tools.ant.gui.AppContext; | |||||
| import org.apache.tools.ant.gui.ProjectProxy; | |||||
| import org.apache.tools.ant.gui.core.AppContext; | |||||
| import org.apache.tools.ant.gui.core.ProjectProxy; | |||||
| import org.apache.tools.ant.gui.event.ErrorEvent; | import org.apache.tools.ant.gui.event.ErrorEvent; | ||||
| import java.io.File; | import java.io.File; | ||||
| import java.io.FileWriter; | import java.io.FileWriter; | ||||
| import java.io.IOException; | import java.io.IOException; | ||||
| import org.apache.tools.ant.gui.XMLFileFilter; | |||||
| import org.apache.tools.ant.gui.core.XMLFileFilter; | |||||
| import javax.swing.JFileChooser; | import javax.swing.JFileChooser; | ||||
| import javax.swing.filechooser.FileFilter; | import javax.swing.filechooser.FileFilter; | ||||
| import javax.swing.JOptionPane; | import javax.swing.JOptionPane; | ||||
| @@ -52,7 +52,7 @@ | |||||
| * <http://www.apache.org/>. | * <http://www.apache.org/>. | ||||
| */ | */ | ||||
| package org.apache.tools.ant.gui.command; | package org.apache.tools.ant.gui.command; | ||||
| import org.apache.tools.ant.gui.AppContext; | |||||
| import org.apache.tools.ant.gui.core.AppContext; | |||||
| /** | /** | ||||
| * Command to execute the saving of the current build file. | * Command to execute the saving of the current build file. | ||||
| @@ -1,50 +1,3 @@ | |||||
| /* | |||||
| * The Apache Software License, Version 1.1 | |||||
| * | |||||
| * Copyright (C) 2000 The Apache Software Foundation. All rights reserved. | |||||
| * | |||||
| * Redistribution and use in source and binary forms, with or without modifica- | |||||
| * tion, 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 acknowledgment: "This product includes software | |||||
| * developed by the Apache Software Foundation (http://www.apache.org/)." | |||||
| * Alternately, this acknowledgment may appear in the software itself, if | |||||
| * and wherever such third-party acknowledgments normally appear. | |||||
| * | |||||
| * 4. The names "Ant" 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 name, without prior written permission of the | |||||
| * Apache Software Foundation. | |||||
| * | |||||
| * 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 (INCLU- | |||||
| * DING, 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/>. | |||||
| * | |||||
| */ | |||||
| /* | /* | ||||
| * The Apache Software License, Version 1.1 | * The Apache Software License, Version 1.1 | ||||
| * | * | ||||
| @@ -98,7 +51,7 @@ | |||||
| * information on the Apache Software Foundation, please see | * information on the Apache Software Foundation, please see | ||||
| * <http://www.apache.org/>. | * <http://www.apache.org/>. | ||||
| */ | */ | ||||
| package org.apache.tools.ant.gui; | |||||
| package org.apache.tools.ant.gui.core; | |||||
| import org.apache.tools.ant.gui.event.*; | import org.apache.tools.ant.gui.event.*; | ||||
| import org.apache.tools.ant.gui.command.Command; | import org.apache.tools.ant.gui.command.Command; | ||||
| @@ -51,7 +51,7 @@ | |||||
| * information on the Apache Software Foundation, please see | * information on the Apache Software Foundation, please see | ||||
| * <http://www.apache.org/>. | * <http://www.apache.org/>. | ||||
| */ | */ | ||||
| package org.apache.tools.ant.gui; | |||||
| package org.apache.tools.ant.gui.core; | |||||
| import javax.swing.*; | import javax.swing.*; | ||||
| import java.net.URL; | import java.net.URL; | ||||
| @@ -51,7 +51,7 @@ | |||||
| * information on the Apache Software Foundation, please see | * information on the Apache Software Foundation, please see | ||||
| * <http://www.apache.org/>. | * <http://www.apache.org/>. | ||||
| */ | */ | ||||
| package org.apache.tools.ant.gui; | |||||
| package org.apache.tools.ant.gui.core; | |||||
| import javax.swing.JComponent; | import javax.swing.JComponent; | ||||
| import javax.swing.BorderFactory; | import javax.swing.BorderFactory; | ||||
| @@ -51,7 +51,7 @@ | |||||
| * information on the Apache Software Foundation, please see | * information on the Apache Software Foundation, please see | ||||
| * <http://www.apache.org/>. | * <http://www.apache.org/>. | ||||
| */ | */ | ||||
| package org.apache.tools.ant.gui; | |||||
| package org.apache.tools.ant.gui.core; | |||||
| import org.apache.tools.ant.BuildListener; | import org.apache.tools.ant.BuildListener; | ||||
| import org.apache.tools.ant.gui.event.*; | import org.apache.tools.ant.gui.event.*; | ||||
| import java.awt.Frame; | import java.awt.Frame; | ||||
| @@ -81,7 +81,6 @@ public class AppContext { | |||||
| /** The current data model. */ | /** The current data model. */ | ||||
| private ProjectProxy _project = null; | private ProjectProxy _project = null; | ||||
| public AppContext(Frame parent) { | public AppContext(Frame parent) { | ||||
| _parentFrame = parent; | _parentFrame = parent; | ||||
| // Add the build listener for dispatching BuildEvent | // Add the build listener for dispatching BuildEvent | ||||
| @@ -51,7 +51,8 @@ | |||||
| * information on the Apache Software Foundation, please see | * information on the Apache Software Foundation, please see | ||||
| * <http://www.apache.org/>. | * <http://www.apache.org/>. | ||||
| */ | */ | ||||
| package org.apache.tools.ant.gui; | |||||
| package org.apache.tools.ant.gui.core; | |||||
| import org.apache.tools.ant.gui.event.*; | import org.apache.tools.ant.gui.event.*; | ||||
| import org.apache.tools.ant.BuildListener; | import org.apache.tools.ant.BuildListener; | ||||
| import org.apache.tools.ant.BuildEvent; | import org.apache.tools.ant.BuildEvent; | ||||
| @@ -51,7 +51,7 @@ | |||||
| * information on the Apache Software Foundation, please see | * information on the Apache Software Foundation, please see | ||||
| * <http://www.apache.org/>. | * <http://www.apache.org/>. | ||||
| */ | */ | ||||
| package org.apache.tools.ant.gui; | |||||
| package org.apache.tools.ant.gui.core; | |||||
| import org.apache.tools.ant.gui.event.*; | import org.apache.tools.ant.gui.event.*; | ||||
| import org.apache.tools.ant.gui.command.*; | import org.apache.tools.ant.gui.command.*; | ||||
| @@ -66,7 +66,7 @@ import javax.swing.*; | |||||
| * @version $Revision$ | * @version $Revision$ | ||||
| * @author Simeon Fitch | * @author Simeon Fitch | ||||
| */ | */ | ||||
| class EventResponder { | |||||
| public class EventResponder { | |||||
| /** The application context. */ | /** The application context. */ | ||||
| private AppContext _context = null; | private AppContext _context = null; | ||||
| @@ -51,7 +51,7 @@ | |||||
| * information on the Apache Software Foundation, please see | * information on the Apache Software Foundation, please see | ||||
| * <http://www.apache.org/>. | * <http://www.apache.org/>. | ||||
| */ | */ | ||||
| package org.apache.tools.ant.gui; | |||||
| package org.apache.tools.ant.gui.core; | |||||
| import java.util.*; | import java.util.*; | ||||
| /** | /** | ||||
| @@ -71,8 +71,11 @@ class EventToActionMapper { | |||||
| private Map _disableOn = new HashMap(); | private Map _disableOn = new HashMap(); | ||||
| /** | |||||
| * Defaul ctor. | |||||
| * | |||||
| */ | |||||
| public EventToActionMapper() { | public EventToActionMapper() { | ||||
| } | } | ||||
| /** | /** | ||||
| @@ -85,7 +88,6 @@ class EventToActionMapper { | |||||
| putAction(action, action.getDisableOnEvents(), _disableOn); | putAction(action, action.getDisableOnEvents(), _disableOn); | ||||
| } | } | ||||
| /** | /** | ||||
| * For the given action store it in the event type mapping | * For the given action store it in the event type mapping | ||||
| * for each of the given types. | * for each of the given types. | ||||
| @@ -107,8 +109,6 @@ class EventToActionMapper { | |||||
| values.add(action); | values.add(action); | ||||
| } | } | ||||
| } | } | ||||
| /** | /** | ||||
| * For the given event change the state of any actions that | * For the given event change the state of any actions that | ||||
| * have been registered as needing a transition as a result of | * have been registered as needing a transition as a result of | ||||
| @@ -142,6 +142,4 @@ class EventToActionMapper { | |||||
| action.setEnabled(state); | action.setEnabled(state); | ||||
| } | } | ||||
| } | } | ||||
| } | } | ||||
| @@ -51,9 +51,12 @@ | |||||
| * information on the Apache Software Foundation, please see | * information on the Apache Software Foundation, please see | ||||
| * <http://www.apache.org/>. | * <http://www.apache.org/>. | ||||
| */ | */ | ||||
| package org.apache.tools.ant.gui; | |||||
| package org.apache.tools.ant.gui.core; | |||||
| import org.apache.tools.ant.*; | import org.apache.tools.ant.*; | ||||
| import org.apache.tools.ant.gui.*; | |||||
| import org.apache.tools.ant.gui.event.*; | import org.apache.tools.ant.gui.event.*; | ||||
| import org.apache.tools.ant.gui.acs.ElementTreeSelectionModel; | |||||
| import org.apache.tools.ant.gui.acs.*; | import org.apache.tools.ant.gui.acs.*; | ||||
| import java.io.File; | import java.io.File; | ||||
| import java.io.Writer; | import java.io.Writer; | ||||
| @@ -86,7 +89,7 @@ public class ProjectProxy { | |||||
| /** The current thread executing a build. */ | /** The current thread executing a build. */ | ||||
| private Thread _buildThread = null; | private Thread _buildThread = null; | ||||
| /** The selection model for selected targets. */ | /** The selection model for selected targets. */ | ||||
| private ElementSelectionModel _selections = null; | |||||
| private ElementTreeSelectionModel _selections = null; | |||||
| /** | /** | ||||
| * File loading ctor. | * File loading ctor. | ||||
| @@ -106,7 +109,7 @@ public class ProjectProxy { | |||||
| */ | */ | ||||
| private void loadProject() throws IOException, SAXException { | private void loadProject() throws IOException, SAXException { | ||||
| _project = ACSFactory.getInstance().load(_file); | _project = ACSFactory.getInstance().load(_file); | ||||
| _selections = new ElementSelectionModel(); | |||||
| _selections = new ElementTreeSelectionModel(); | |||||
| _selections.addTreeSelectionListener(new SelectionForwarder()); | _selections.addTreeSelectionListener(new SelectionForwarder()); | ||||
| } | } | ||||
| @@ -174,7 +177,7 @@ public class ProjectProxy { | |||||
| */ | */ | ||||
| public TreeModel getTreeModel() { | public TreeModel getTreeModel() { | ||||
| if(_project != null) { | if(_project != null) { | ||||
| return new ProjectTreeModel(_project); | |||||
| return new ElementTreeModel(_project); | |||||
| } | } | ||||
| return null; | return null; | ||||
| } | } | ||||
| @@ -184,7 +187,7 @@ public class ProjectProxy { | |||||
| * | * | ||||
| * @return Selection model. | * @return Selection model. | ||||
| */ | */ | ||||
| public ElementSelectionModel getTreeSelectionModel() { | |||||
| public ElementTreeSelectionModel getTreeSelectionModel() { | |||||
| return _selections; | return _selections; | ||||
| } | } | ||||
| @@ -51,7 +51,7 @@ | |||||
| * information on the Apache Software Foundation, please see | * information on the Apache Software Foundation, please see | ||||
| * <http://www.apache.org/>. | * <http://www.apache.org/>. | ||||
| */ | */ | ||||
| package org.apache.tools.ant.gui; | |||||
| package org.apache.tools.ant.gui.core; | |||||
| import java.util.*; | import java.util.*; | ||||
| import java.text.MessageFormat; | import java.text.MessageFormat; | ||||
| @@ -67,6 +67,18 @@ import java.io.File; | |||||
| * @author Simeon H.K. Fitch | * @author Simeon H.K. Fitch | ||||
| */ | */ | ||||
| public class ResourceManager { | public class ResourceManager { | ||||
| /** Path to default resources. */ | |||||
| private static final String RESOURCE_PKG = | |||||
| "org.apache.tools.ant.gui.resources"; | |||||
| /** Path to default resources. */ | |||||
| private static final String DEF_PROPERTIES = | |||||
| RESOURCE_PKG + ".antidote"; | |||||
| /** Image path. */ | |||||
| private static final String IMG_PATH = | |||||
| "/" + RESOURCE_PKG.replace('.', '/'); | |||||
| /** Resources to reference. */ | /** Resources to reference. */ | ||||
| private ResourceBundle _resources = null; | private ResourceBundle _resources = null; | ||||
| @@ -75,7 +87,7 @@ public class ResourceManager { | |||||
| * | * | ||||
| */ | */ | ||||
| public ResourceManager() { | public ResourceManager() { | ||||
| this("org.apache.tools.ant.gui.resources.antidote"); | |||||
| this(DEF_PROPERTIES); | |||||
| } | } | ||||
| /** | /** | ||||
| @@ -186,7 +198,7 @@ public class ResourceManager { | |||||
| ImageIcon icon = null; | ImageIcon icon = null; | ||||
| URL location = getClass().getResource("resources/" + fileName); | |||||
| URL location = getClass().getResource(IMG_PATH + "/" + fileName); | |||||
| if(location != null) { | if(location != null) { | ||||
| icon = new ImageIcon(location); | icon = new ImageIcon(location); | ||||
| @@ -51,7 +51,7 @@ | |||||
| * information on the Apache Software Foundation, please see | * information on the Apache Software Foundation, please see | ||||
| * <http://www.apache.org/>. | * <http://www.apache.org/>. | ||||
| */ | */ | ||||
| package org.apache.tools.ant.gui; | |||||
| package org.apache.tools.ant.gui.core; | |||||
| import javax.swing.filechooser.FileFilter; | import javax.swing.filechooser.FileFilter; | ||||
| import java.io.File; | import java.io.File; | ||||
| @@ -53,7 +53,7 @@ | |||||
| */ | */ | ||||
| package org.apache.tools.ant.gui.customizer; | package org.apache.tools.ant.gui.customizer; | ||||
| import org.apache.tools.ant.gui.LabelFieldGBC; | |||||
| import org.apache.tools.ant.gui.util.LabelFieldGBC; | |||||
| import java.lang.reflect.*; | import java.lang.reflect.*; | ||||
| import java.beans.*; | import java.beans.*; | ||||
| import javax.swing.*; | import javax.swing.*; | ||||
| @@ -56,7 +56,7 @@ import org.apache.tools.ant.BuildEvent; | |||||
| import org.apache.tools.ant.gui.util.StackFrame; | import org.apache.tools.ant.gui.util.StackFrame; | ||||
| import org.apache.tools.ant.gui.command.Command; | import org.apache.tools.ant.gui.command.Command; | ||||
| import org.apache.tools.ant.gui.command.NoOpCmd; | import org.apache.tools.ant.gui.command.NoOpCmd; | ||||
| import org.apache.tools.ant.gui.AppContext; | |||||
| import org.apache.tools.ant.gui.core.AppContext; | |||||
| import java.util.EventObject; | import java.util.EventObject; | ||||
| /** | /** | ||||
| @@ -78,7 +78,7 @@ public class AntBuildEvent extends AntEvent { | |||||
| * @param context application context. | * @param context application context. | ||||
| */ | */ | ||||
| public AntBuildEvent(AppContext context, | public AntBuildEvent(AppContext context, | ||||
| BuildEvent buildEvent, BuildEventType type) { | |||||
| BuildEvent buildEvent, BuildEventType type) { | |||||
| super(context); | super(context); | ||||
| _buildEvent = buildEvent; | _buildEvent = buildEvent; | ||||
| _type = type; | _type = type; | ||||
| @@ -54,7 +54,7 @@ | |||||
| package org.apache.tools.ant.gui.event; | package org.apache.tools.ant.gui.event; | ||||
| import org.apache.tools.ant.gui.command.Command; | import org.apache.tools.ant.gui.command.Command; | ||||
| import org.apache.tools.ant.gui.command.NoOpCmd; | import org.apache.tools.ant.gui.command.NoOpCmd; | ||||
| import org.apache.tools.ant.gui.AppContext; | |||||
| import org.apache.tools.ant.gui.core.AppContext; | |||||
| import java.util.EventObject; | import java.util.EventObject; | ||||
| /** | /** | ||||
| @@ -53,7 +53,7 @@ | |||||
| */ | */ | ||||
| package org.apache.tools.ant.gui.event; | package org.apache.tools.ant.gui.event; | ||||
| import org.apache.tools.ant.BuildEvent; | import org.apache.tools.ant.BuildEvent; | ||||
| import org.apache.tools.ant.gui.AppContext; | |||||
| import org.apache.tools.ant.gui.core.AppContext; | |||||
| /** | /** | ||||
| @@ -53,7 +53,7 @@ | |||||
| */ | */ | ||||
| package org.apache.tools.ant.gui.event; | package org.apache.tools.ant.gui.event; | ||||
| import org.apache.tools.ant.BuildEvent; | import org.apache.tools.ant.BuildEvent; | ||||
| import org.apache.tools.ant.gui.AppContext; | |||||
| import org.apache.tools.ant.gui.core.AppContext; | |||||
| /** | /** | ||||
| @@ -55,7 +55,7 @@ package org.apache.tools.ant.gui.event; | |||||
| import org.apache.tools.ant.gui.acs.*; | import org.apache.tools.ant.gui.acs.*; | ||||
| import org.apache.tools.ant.gui.command.Command; | import org.apache.tools.ant.gui.command.Command; | ||||
| import org.apache.tools.ant.gui.command.DisplayErrorCmd; | import org.apache.tools.ant.gui.command.DisplayErrorCmd; | ||||
| import org.apache.tools.ant.gui.AppContext; | |||||
| import org.apache.tools.ant.gui.core.AppContext; | |||||
| /** | /** | ||||
| * Event indicating that the current set of selected targets has changed. | * Event indicating that the current set of selected targets has changed. | ||||
| @@ -52,7 +52,7 @@ | |||||
| * <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.AppContext; | |||||
| import org.apache.tools.ant.gui.core.AppContext; | |||||
| import org.apache.tools.ant.gui.command.DisplayErrorCmd; | import org.apache.tools.ant.gui.command.DisplayErrorCmd; | ||||
| import org.apache.tools.ant.gui.command.Command; | import org.apache.tools.ant.gui.command.Command; | ||||
| import org.apache.tools.ant.gui.util.StackFrame; | import org.apache.tools.ant.gui.util.StackFrame; | ||||
| @@ -52,7 +52,7 @@ | |||||
| * <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.AppContext; | |||||
| import org.apache.tools.ant.gui.core.AppContext; | |||||
| /** | /** | ||||
| * Event providing notification of a change in the current project. | * Event providing notification of a change in the current project. | ||||
| @@ -53,7 +53,7 @@ | |||||
| */ | */ | ||||
| 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.ACSElement; | ||||
| import org.apache.tools.ant.gui.AppContext; | |||||
| import org.apache.tools.ant.gui.core.AppContext; | |||||
| /** | /** | ||||
| * Event fired when no elements are selected. | * Event fired when no elements are selected. | ||||
| @@ -52,7 +52,7 @@ | |||||
| * <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.AppContext; | |||||
| import org.apache.tools.ant.gui.core.AppContext; | |||||
| import org.apache.tools.ant.gui.command.Command; | import org.apache.tools.ant.gui.command.Command; | ||||
| import org.apache.tools.ant.gui.command.LoadFileCmd; | import org.apache.tools.ant.gui.command.LoadFileCmd; | ||||
| @@ -52,7 +52,7 @@ | |||||
| * <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.AppContext; | |||||
| import org.apache.tools.ant.gui.core.AppContext; | |||||
| /** | /** | ||||
| @@ -53,7 +53,7 @@ | |||||
| */ | */ | ||||
| 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.ACSElement; | ||||
| import org.apache.tools.ant.gui.AppContext; | |||||
| import org.apache.tools.ant.gui.core.AppContext; | |||||
| /** | /** | ||||
| * Event fired when the project node is selected. | * Event fired when the project node is selected. | ||||
| @@ -53,7 +53,7 @@ | |||||
| */ | */ | ||||
| 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.ACSElement; | ||||
| import org.apache.tools.ant.gui.AppContext; | |||||
| import org.apache.tools.ant.gui.core.AppContext; | |||||
| /** | /** | ||||
| * Event fired when one or more tasks are selected. | * Event fired when one or more tasks are selected. | ||||
| @@ -53,7 +53,7 @@ | |||||
| */ | */ | ||||
| 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.ACSElement; | ||||
| import org.apache.tools.ant.gui.AppContext; | |||||
| import org.apache.tools.ant.gui.core.AppContext; | |||||
| /** | /** | ||||
| * Event fired when one or more targets are selected. | * Event fired when one or more targets are selected. | ||||
| @@ -53,7 +53,7 @@ | |||||
| */ | */ | ||||
| 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.ACSElement; | ||||
| import org.apache.tools.ant.gui.AppContext; | |||||
| import org.apache.tools.ant.gui.core.AppContext; | |||||
| /** | /** | ||||
| * Event fired when one or more tasks are selected. | * Event fired when one or more tasks are selected. | ||||
| @@ -51,9 +51,11 @@ | |||||
| * information on the Apache Software Foundation, please see | * information on the Apache Software Foundation, please see | ||||
| * <http://www.apache.org/>. | * <http://www.apache.org/>. | ||||
| */ | */ | ||||
| package org.apache.tools.ant.gui; | |||||
| package org.apache.tools.ant.gui.modules; | |||||
| import org.apache.tools.ant.gui.core.*; | |||||
| import org.apache.tools.ant.gui.event.*; | import org.apache.tools.ant.gui.event.*; | ||||
| import org.apache.tools.ant.gui.acs.ACSTargetElement; | import org.apache.tools.ant.gui.acs.ACSTargetElement; | ||||
| import org.apache.tools.ant.gui.acs.ElementTreeSelectionModel; | |||||
| import javax.swing.*; | import javax.swing.*; | ||||
| import javax.swing.plaf.ComponentUI; | import javax.swing.plaf.ComponentUI; | ||||
| import javax.swing.text.Document; | import javax.swing.text.Document; | ||||
| @@ -140,7 +142,8 @@ public class TargetMonitor extends AntModule { | |||||
| ProjectProxy p = getContext().getProject(); | ProjectProxy p = getContext().getProject(); | ||||
| if(p != null) { | if(p != null) { | ||||
| ElementSelectionModel selections = p.getTreeSelectionModel(); | |||||
| ElementTreeSelectionModel selections = | |||||
| p.getTreeSelectionModel(); | |||||
| ACSTargetElement[] targets = selections.getSelectedTargets(); | ACSTargetElement[] targets = selections.getSelectedTargets(); | ||||
| if(targets != null && targets.length > 0) { | if(targets != null && targets.length > 0) { | ||||
| StringBuffer buf = new StringBuffer(); | StringBuffer buf = new StringBuffer(); | ||||
| @@ -51,7 +51,10 @@ | |||||
| * information on the Apache Software Foundation, please see | * information on the Apache Software Foundation, please see | ||||
| * <http://www.apache.org/>. | * <http://www.apache.org/>. | ||||
| */ | */ | ||||
| package org.apache.tools.ant.gui; | |||||
| package org.apache.tools.ant.gui.modules; | |||||
| import org.apache.tools.ant.gui.core.AntModule; | |||||
| import org.apache.tools.ant.gui.core.AppContext; | |||||
| import org.apache.tools.ant.gui.event.*; | import org.apache.tools.ant.gui.event.*; | ||||
| import javax.swing.*; | import javax.swing.*; | ||||
| import javax.swing.plaf.ComponentUI; | import javax.swing.plaf.ComponentUI; | ||||
| @@ -68,7 +71,7 @@ import java.util.EventObject; | |||||
| * @version $Revision$ | * @version $Revision$ | ||||
| * @author Simeon Fitch | * @author Simeon Fitch | ||||
| */ | */ | ||||
| public class Console extends AntModule { | |||||
| public class BuildConsole extends AntModule { | |||||
| /** Area where messages are printed. */ | /** Area where messages are printed. */ | ||||
| private JTextPane _text = null; | private JTextPane _text = null; | ||||
| /** Selection of logging levels. */ | /** Selection of logging levels. */ | ||||
| @@ -79,7 +82,7 @@ public class Console extends AntModule { | |||||
| /** | /** | ||||
| * Default ctor. | * Default ctor. | ||||
| */ | */ | ||||
| public Console() { | |||||
| public BuildConsole() { | |||||
| } | } | ||||
| @@ -51,7 +51,7 @@ | |||||
| * information on the Apache Software Foundation, please see | * information on the Apache Software Foundation, please see | ||||
| * <http://www.apache.org/>. | * <http://www.apache.org/>. | ||||
| */ | */ | ||||
| package org.apache.tools.ant.gui; | |||||
| package org.apache.tools.ant.gui.modules; | |||||
| /** | /** | ||||
| * Enumeration class of the different log levels. | * Enumeration class of the different log levels. | ||||
| @@ -51,7 +51,8 @@ | |||||
| * information on the Apache Software Foundation, please see | * information on the Apache Software Foundation, please see | ||||
| * <http://www.apache.org/>. | * <http://www.apache.org/>. | ||||
| */ | */ | ||||
| package org.apache.tools.ant.gui; | |||||
| package org.apache.tools.ant.gui.modules.edit; | |||||
| import org.apache.tools.ant.gui.core.*; | |||||
| import org.apache.tools.ant.gui.event.*; | import org.apache.tools.ant.gui.event.*; | ||||
| import javax.swing.*; | import javax.swing.*; | ||||
| import java.awt.GridLayout; | import java.awt.GridLayout; | ||||
| @@ -61,12 +62,12 @@ import java.awt.event.MouseEvent; | |||||
| import java.util.EventObject; | import java.util.EventObject; | ||||
| /** | /** | ||||
| * AntEditor for displaying the project target in a | |||||
| * Module for navigating build file elemenets. | |||||
| * | * | ||||
| * @version $Revision$ | * @version $Revision$ | ||||
| * @author Simeon Fitch | * @author Simeon Fitch | ||||
| */ | */ | ||||
| class ProjectNavigator extends AntModule { | |||||
| public class ElementNavigator extends AntModule { | |||||
| /** Navigation via a tree widget. */ | /** Navigation via a tree widget. */ | ||||
| private JTree _tree = null; | private JTree _tree = null; | ||||
| @@ -75,7 +76,7 @@ class ProjectNavigator extends AntModule { | |||||
| * Default ctor. | * Default ctor. | ||||
| * | * | ||||
| */ | */ | ||||
| public ProjectNavigator() { | |||||
| public ElementNavigator() { | |||||
| } | } | ||||
| /** | /** | ||||
| @@ -91,7 +92,7 @@ class ProjectNavigator extends AntModule { | |||||
| _tree = new JTree(); | _tree = new JTree(); | ||||
| _tree.setModel(null); | _tree.setModel(null); | ||||
| _tree.setCellRenderer(new AntTreeCellRenderer()); | |||||
| _tree.setCellRenderer(new ElementTreeCellRenderer()); | |||||
| _tree.addMouseListener(new PopupHandler()); | _tree.addMouseListener(new PopupHandler()); | ||||
| JScrollPane scroller = new JScrollPane(_tree); | JScrollPane scroller = new JScrollPane(_tree); | ||||
| add(scroller); | add(scroller); | ||||
| @@ -159,7 +160,7 @@ class ProjectNavigator extends AntModule { | |||||
| ActionManager mgr = getContext().getActions(); | ActionManager mgr = getContext().getActions(); | ||||
| JPopupMenu menu = mgr.createPopup( | JPopupMenu menu = mgr.createPopup( | ||||
| getContext().getResources().getStringArray( | getContext().getResources().getStringArray( | ||||
| ProjectNavigator.class, "popupActions")); | |||||
| ElementNavigator.class, "popupActions")); | |||||
| menu.show((JComponent)e.getSource(), e.getX(), e.getY()); | menu.show((JComponent)e.getSource(), e.getX(), e.getY()); | ||||
| } | } | ||||
| } | } | ||||
| @@ -51,7 +51,7 @@ | |||||
| * information on the Apache Software Foundation, please see | * information on the Apache Software Foundation, please see | ||||
| * <http://www.apache.org/>. | * <http://www.apache.org/>. | ||||
| */ | */ | ||||
| package org.apache.tools.ant.gui; | |||||
| package org.apache.tools.ant.gui.modules.edit; | |||||
| import org.apache.tools.ant.gui.acs.ACSElement; | import org.apache.tools.ant.gui.acs.ACSElement; | ||||
| import javax.swing.tree.DefaultTreeCellRenderer; | import javax.swing.tree.DefaultTreeCellRenderer; | ||||
| @@ -67,7 +67,7 @@ import java.beans.*; | |||||
| * @version $Revision$ | * @version $Revision$ | ||||
| * @author Simeon Fitch | * @author Simeon Fitch | ||||
| */ | */ | ||||
| public class AntTreeCellRenderer extends DefaultTreeCellRenderer { | |||||
| public class ElementTreeCellRenderer extends DefaultTreeCellRenderer { | |||||
| public Component getTreeCellRendererComponent(JTree tree, | public Component getTreeCellRendererComponent(JTree tree, | ||||
| Object value, | Object value, | ||||
| @@ -51,9 +51,10 @@ | |||||
| * information on the Apache Software Foundation, please see | * information on the Apache Software Foundation, please see | ||||
| * <http://www.apache.org/>. | * <http://www.apache.org/>. | ||||
| */ | */ | ||||
| package org.apache.tools.ant.gui; | |||||
| package org.apache.tools.ant.gui.modules.edit; | |||||
| import org.apache.tools.ant.gui.customizer.DynamicCustomizer; | import org.apache.tools.ant.gui.customizer.DynamicCustomizer; | ||||
| import org.apache.tools.ant.gui.core.*; | |||||
| import org.apache.tools.ant.gui.acs.*; | import org.apache.tools.ant.gui.acs.*; | ||||
| import org.apache.tools.ant.gui.event.*; | import org.apache.tools.ant.gui.event.*; | ||||
| import javax.swing.*; | import javax.swing.*; | ||||
| @@ -1,12 +1,12 @@ | |||||
| # Define the primary menubar items. | # Define the primary menubar items. | ||||
| menus=File, Build, Options, Help | |||||
| menus=File, Build, Help | |||||
| # Declare the list of known actions. | # Declare the list of known actions. | ||||
| actions=\ | actions=\ | ||||
| open, save, saveas, close, exit, about, \ | open, save, saveas, close, exit, about, \ | ||||
| newTarget, newTask, newProperty \ | newTarget, newTask, newProperty \ | ||||
| startBuild, stopBuild, \ | startBuild, stopBuild, \ | ||||
| notifyEmacs, changeLookAndFeel | |||||
| notifyEmacs | |||||
| # Configure the decalred actions. | # Configure the decalred actions. | ||||
| @@ -132,17 +132,3 @@ newProperty.enableOn=\ | |||||
| newProperty.disableOn=\ | newProperty.disableOn=\ | ||||
| org.apache.tools.ant.gui.event.PropertySelectionEvent, \ | org.apache.tools.ant.gui.event.PropertySelectionEvent, \ | ||||
| org.apache.tools.ant.gui.event.NullSelectionEvent | org.apache.tools.ant.gui.event.NullSelectionEvent | ||||
| changeLookAndFeel.name=Look and Feel... | |||||
| changeLookAndFeel.shortDescription=Change the Look and Feel | |||||
| changeLookAndFeel.parentMenuName=Options | |||||
| changeLookAndFeel.command=org.apache.tools.ant.gui.command.ChangeLookAndFeelCmd | |||||
| changeLookAndFeel.enabled=true | |||||
| changeLookAndFeel.separator=true | |||||
| notifyEmacs.name=Notify Emacs | |||||
| notifyEmacs.shortDescription=\ | |||||
| Send a notification event to Emacs on build errors | |||||
| notifyEmacs.parentMenuName=Options | |||||
| notifyEmacs.toggle=true | |||||
| notifyEmacs.command=org.apache.tools.ant.gui.command.EmacsNotifyCmd | |||||
| @@ -8,33 +8,33 @@ | |||||
| # Configure the modules that appear on the right of the UI. | # Configure the modules that appear on the right of the UI. | ||||
| org.apache.tools.ant.gui.Antidote.right.modules=\ | org.apache.tools.ant.gui.Antidote.right.modules=\ | ||||
| org.apache.tools.ant.gui.PropertyEditor | |||||
| org.apache.tools.ant.gui.modules.edit.PropertyEditor | |||||
| # Configure the modules that appear on the left of the UI. | # Configure the modules that appear on the left of the UI. | ||||
| org.apache.tools.ant.gui.Antidote.left.modules=\ | org.apache.tools.ant.gui.Antidote.left.modules=\ | ||||
| org.apache.tools.ant.gui.ProjectNavigator | |||||
| org.apache.tools.ant.gui.modules.edit.ElementNavigator | |||||
| # Configure the modules that appear on the bottom of the UI. | # Configure the modules that appear on the bottom of the UI. | ||||
| org.apache.tools.ant.gui.Antidote.bottom.modules=\ | org.apache.tools.ant.gui.Antidote.bottom.modules=\ | ||||
| org.apache.tools.ant.gui.Console | |||||
| org.apache.tools.ant.gui.modules.console.BuildConsole | |||||
| # Configure the modules that appear on the top of the UI. | # Configure the modules that appear on the top of the UI. | ||||
| org.apache.tools.ant.gui.Antidote.top.modules=\ | org.apache.tools.ant.gui.Antidote.top.modules=\ | ||||
| org.apache.tools.ant.gui.TargetMonitor | |||||
| org.apache.tools.ant.gui.modules.TargetMonitor | |||||
| org.apache.tools.ant.gui.PropertyEditor.name=Properties | |||||
| org.apache.tools.ant.gui.modules.PropertyEditor.name=Properties | |||||
| org.apache.tools.ant.gui.ProjectNavigator.name=Project | |||||
| org.apache.tools.ant.gui.ProjectNavigator.popupActions=\ | |||||
| org.apache.tools.ant.gui.modules.ElementNavigator.name=Project | |||||
| org.apache.tools.ant.gui.modules.ElementNavigator.popupActions=\ | |||||
| newTarget, newTask, newProperty | newTarget, newTask, newProperty | ||||
| org.apache.tools.ant.gui.TargetMonitor.name=Selected Target(s) | |||||
| org.apache.tools.ant.gui.TargetMonitor.defText=[none] | |||||
| org.apache.tools.ant.gui.modules.TargetMonitor.name=Selected Target(s) | |||||
| org.apache.tools.ant.gui.modules.TargetMonitor.defText=[none] | |||||
| org.apache.tools.ant.gui.Console.name=Console | |||||
| org.apache.tools.ant.gui.Console.logLevel=Log message level: | |||||
| org.apache.tools.ant.gui.modules.Console.name=Console | |||||
| org.apache.tools.ant.gui.modules.Console.logLevel=Log message level: | |||||
| org.apache.tools.ant.gui.XMLFileFilter.description=XML Files | |||||
| org.apache.tools.ant.gui.core.XMLFileFilter.description=XML Files | |||||
| org.apache.tools.ant.gui.command.LoadFileCmd.noFile=The file "{0}" was not found. | org.apache.tools.ant.gui.command.LoadFileCmd.noFile=The file "{0}" was not found. | ||||
| org.apache.tools.ant.gui.command.LoadFileCmd.loadError=The file "{0}" could not be loaded. | org.apache.tools.ant.gui.command.LoadFileCmd.loadError=The file "{0}" could not be loaded. | ||||
| @@ -46,31 +46,6 @@ org.apache.tools.ant.gui.command.SaveCmd.noProject=No project to save. | |||||
| org.apache.tools.ant.gui.command.SaveCmd.title=Overwrite? | org.apache.tools.ant.gui.command.SaveCmd.title=Overwrite? | ||||
| org.apache.tools.ant.gui.command.SaveCmd.overwrite=Overwrite file "{0}"? | org.apache.tools.ant.gui.command.SaveCmd.overwrite=Overwrite file "{0}"? | ||||
| org.apache.tools.ant.gui.About.title=About | |||||
| org.apache.tools.ant.gui.About.ok=OK | |||||
| org.apache.tools.ant.gui.About.message=\ | |||||
| <html><h1>Antidote</h1> \ | |||||
| <p>Copyright © 2000 The Apache Software Foundation. <br>\ | |||||
| All rights reserved.</p><br> \ | |||||
| <p>Visit http://jakarta.apache.org/ant for more information.</p><br> \ | |||||
| <table> \ | |||||
| <tr><td align="right"><b>Version</b>:</td><td>{0}</td></tr> \ | |||||
| <tr><td align="right"><b>Date</b>:</td><td>{1}</td></tr> \ | |||||
| <tr><td align="right" valign="top"><b>Contributors</b>:</td>\ | |||||
| <td>{2}</td></tr> \ | |||||
| </table> \ | |||||
| <hr> \ | |||||
| <p>Icons Copyright © 1998 Dean S. Jones (deansjones@hotmail.com)<br> \ | |||||
| http://jfa.javalobby.org/projects/icons</p> \ | |||||
| </html> | |||||
| org.apache.tools.ant.gui.ChangeLookAndFeel.title=Change Look and Feel | |||||
| org.apache.tools.ant.gui.ChangeLookAndFeel.border=Available L&F | |||||
| org.apache.tools.ant.gui.ChangeLookAndFeel.ok=OK | |||||
| org.apache.tools.ant.gui.ChangeLookAndFeel.error=Error setting look and feel: | |||||
| # Properties file for BeanInfo strings | # Properties file for BeanInfo strings | ||||
| org.apache.tools.ant.gui.acs.ACSTargetElementBeanInfo.beanName=Target | org.apache.tools.ant.gui.acs.ACSTargetElementBeanInfo.beanName=Target | ||||
| @@ -111,3 +86,27 @@ org.apache.tools.ant.gui.acs.ACSTaskElementBeanInfo.icon=task.gif | |||||
| #---------------------------------------------------------------------------- | |||||
| # About Description (NB: this is only a temporary approach). | |||||
| #---------------------------------------------------------------------------- | |||||
| org.apache.tools.ant.gui.About.title=About | |||||
| org.apache.tools.ant.gui.About.ok=OK | |||||
| org.apache.tools.ant.gui.About.message=\ | |||||
| <html><h1>Antidote</h1> \ | |||||
| <p>Copyright © 2000 The Apache Software Foundation. <br>\ | |||||
| All rights reserved.</p><br> \ | |||||
| <p>Visit http://jakarta.apache.org/ant for more information.</p><br> \ | |||||
| <table> \ | |||||
| <tr><td align="right"><b>Version</b>:</td><td>{0}</td></tr> \ | |||||
| <tr><td align="right"><b>Date</b>:</td><td>{1}</td></tr> \ | |||||
| <tr><td align="right" valign="top"><b>Contributors</b>:</td>\ | |||||
| <td>{2}</td></tr> \ | |||||
| </table> \ | |||||
| <hr> \ | |||||
| <p>Icons Copyright © 1998 Dean S. Jones (deansjones@hotmail.com)<br> \ | |||||
| http://jfa.javalobby.org/projects/icons</p> \ | |||||
| </html> | |||||
| @@ -51,8 +51,10 @@ | |||||
| * information on the Apache Software Foundation, please see | * information on the Apache Software Foundation, please see | ||||
| * <http://www.apache.org/>. | * <http://www.apache.org/>. | ||||
| */ | */ | ||||
| package org.apache.tools.ant.gui; | |||||
| package org.apache.tools.ant.gui.util; | |||||
| import org.apache.tools.ant.gui.core.AppContext; | |||||
| import org.apache.tools.ant.gui.event.ErrorEvent; | import org.apache.tools.ant.gui.event.ErrorEvent; | ||||
| import org.apache.tools.ant.gui.util.WindowUtils; | import org.apache.tools.ant.gui.util.WindowUtils; | ||||
| @@ -51,7 +51,7 @@ | |||||
| * information on the Apache Software Foundation, please see | * information on the Apache Software Foundation, please see | ||||
| * <http://www.apache.org/>. | * <http://www.apache.org/>. | ||||
| */ | */ | ||||
| package org.apache.tools.ant.gui; | |||||
| package org.apache.tools.ant.gui.util; | |||||
| import java.awt.GridBagConstraints; | import java.awt.GridBagConstraints; | ||||
| import java.awt.Insets; | import java.awt.Insets; | ||||
| @@ -51,7 +51,7 @@ | |||||
| * information on the Apache Software Foundation, please see | * information on the Apache Software Foundation, please see | ||||
| * <http://www.apache.org/>. | * <http://www.apache.org/>. | ||||
| */ | */ | ||||
| package org.apache.tools.ant.gui; | |||||
| package org.apache.tools.ant.gui.util; | |||||
| /** | /** | ||||
| * Placeholder for XML related duties. | * Placeholder for XML related duties. | ||||