Index: ExplorerManager.java =================================================================== RCS file: /cvs/openide/src/org/openide/explorer/ExplorerManager.java,v retrieving revision 1.47 diff -u -u -r1.47 ExplorerManager.java --- ExplorerManager.java 27 Feb 2004 10:38:28 -0000 1.47 +++ ExplorerManager.java 1 Jul 2004 14:33:46 -0000 @@ -61,6 +61,8 @@ private transient VetoableChangeSupport vetoableSupport; /** The support for PropertyChangeEvent */ private transient PropertyChangeSupport propertySupport; + /** Indication of listeners being notified about node selection change */ + private static long notifyingSelectionChange = 0; /** The current root context */ private Node rootContext; @@ -172,7 +174,9 @@ if (value.length != 0 && vetoableSupport != null) { // we send the vetoable change event only for non-empty selections + notifyingSelectionChange = System.currentTimeMillis(); vetoableSupport.fireVetoableChange(PROP_SELECTED_NODES, selectedNodes, value); + notifyingSelectionChange = 0; } oldValue = selectedNodes; @@ -216,16 +220,24 @@ if (propertySupport != null) { // replan fire of prop event to AWT-queue to get correctly visual-reactions if (SwingUtilities.isEventDispatchThread ()) { + notifyingSelectionChange = System.currentTimeMillis(); propertySupport.firePropertyChange (PROP_SELECTED_NODES, oldValue, selectedNodes); + notifyingSelectionChange = 0; } else { final Node[] tempOldValue = oldValue; SwingUtilities.invokeLater(new Runnable () { public void run () { + notifyingSelectionChange = System.currentTimeMillis(); propertySupport.firePropertyChange (PROP_SELECTED_NODES, tempOldValue, selectedNodes); + notifyingSelectionChange = 0; } }); } } } + + public static long getNotifyingSelectionChange() { + return notifyingSelectionChange; + }