ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From meta...@apache.org
Subject cvs commit: jakarta-ant/src/antidote/org/apache/tools/ant/gui/modules/edit PropertyEditor.java
Date Thu, 11 Jan 2001 19:30:13 GMT
metasim     01/01/11 11:30:13

  Modified:    src/antidote/org/apache/tools/ant/gui/modules/edit
                        PropertyEditor.java
  Log:
  Fixed bug where properties editor wasn't geting cleared when the project was
  closed.
  
  Revision  Changes    Path
  1.6       +11 -5     jakarta-ant/src/antidote/org/apache/tools/ant/gui/modules/edit/PropertyEditor.java
  
  Index: PropertyEditor.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/antidote/org/apache/tools/ant/gui/modules/edit/PropertyEditor.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- PropertyEditor.java	2001/01/11 19:26:50	1.5
  +++ PropertyEditor.java	2001/01/11 19:30:11	1.6
  @@ -69,7 +69,7 @@
   /**
    * Stub for a property editor.
    *
  - * @version $Revision: 1.5 $ 
  + * @version $Revision: 1.6 $ 
    * @author Simeon H.K. Fitch 
    */
   public class PropertyEditor extends AntModule {
  @@ -161,9 +161,14 @@
            * it should be cancelled.
            */
           public boolean  eventPosted(EventObject event) {
  -            ElementSelectionEvent e = (ElementSelectionEvent) event;
  -            ACSElement[] elements = e.getSelectedElements();
  -            updateDisplay(elements);
  +            if(event instanceof ProjectClosedEvent) {
  +                updateDisplay(null);
  +            }
  +            else {
  +                ElementSelectionEvent e = (ElementSelectionEvent) event;
  +                ACSElement[] elements = e.getSelectedElements();
  +                updateDisplay(elements);
  +            }
               return true;
           }
   
  @@ -177,7 +182,8 @@
            * @return True if event should be given to BusMember, false otherwise.
            */
           public boolean accept(EventObject event) {
  -            return event instanceof ElementSelectionEvent;
  +            return event instanceof ElementSelectionEvent || 
  +                event instanceof ProjectClosedEvent;
           }
       }
   
  
  
  

Mime
View raw message