ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nickda...@apache.org
Subject cvs commit: jakarta-ant-antidote/src/java/org/apache/tools/ant/gui/modules/edit ElementNavigator.java
Date Tue, 10 Jul 2001 19:48:38 GMT
nickdavis    01/07/10 12:48:37

  Modified:    src/java/org/apache/tools/ant/gui/modules/edit
                        ElementNavigator.java
  Log:
  fix bug caused when two projects are opened
  
  Revision  Changes    Path
  1.5       +5 -2      jakarta-ant-antidote/src/java/org/apache/tools/ant/gui/modules/edit/ElementNavigator.java
  
  Index: ElementNavigator.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant-antidote/src/java/org/apache/tools/ant/gui/modules/edit/ElementNavigator.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- ElementNavigator.java	2001/06/04 18:44:46	1.4
  +++ ElementNavigator.java	2001/07/10 19:48:31	1.5
  @@ -86,6 +86,7 @@
   import org.apache.tools.ant.gui.event.ElementSelectionEvent;
   import org.apache.tools.ant.gui.event.EventBus;
   import org.apache.tools.ant.gui.event.NewElementEvent;
  +import org.apache.tools.ant.gui.event.NewProjectEvent;
   import org.apache.tools.ant.gui.event.ProjectClosedEvent;
   import org.apache.tools.ant.gui.event.ProjectSelectedEvent;
   import org.apache.tools.ant.gui.event.RefreshDisplayEvent;
  @@ -102,7 +103,7 @@
   /**
    * Module for navigating build file elemenets.
    * 
  - * @version $Revision: 1.4 $ 
  + * @version $Revision: 1.5 $ 
    * @author Simeon Fitch 
    */
   public class ElementNavigator extends AntModule {
  @@ -176,7 +177,9 @@
               else if(event instanceof RefreshDisplayEvent && model != null) {
                   _tree.validate();
               }
  -            else if(event instanceof NewElementEvent && model != null) {
  +            else if(event instanceof NewElementEvent && 
  +                    (event instanceof NewProjectEvent == false) &&
  +                    model != null) {
                   ACSElement element = ((NewElementEvent)event).getNewElement();
                   model.fireNodeAdded(element);
                   TreePath path = new TreePath(model.getPathToRoot(element));
  
  
  

Mime
View raw message