Unidata - To provide the data services, tools, and cyberinfrastructure leadership that advance Earth system science, enhance educational opportunities, and broaden participation. Unidata
         
  advanced  
 

Re: [visad] Changes to visad.util.TextEditor

Hi Curtis,


Your changes make sense. Alternately, you could make TextEditor implement Runnable, have fileChooser get instantiated in the run() method, and invoke it from the constructor with the SwingUtilities.invokeLater method -- this would constrain the creation to a single thread, which if I understand your message correctly would prevent the deadlock issue.

That might be a good addition. However, I am not completely sure that the cause of the lockup is really from multiple threads.
A number of other folks have encountered this problem:
http://www.google.com/search?hl=en&q=sun.misc.Unsafe.park+jfilechooser&btnG=Search&aq=f&oq=

And there is no real clear solution. It was suggested (and I added this to the IDV) that setting a property on the JFileChooser in its updateUI method stops this problem:
public void updateUI() {
 putClientProperty("FileChooser.useShellFolder", Boolean.FALSE);
 super.updateUI();
 }

I may add this as well to TextEditor.

Either way - this still requires a change of the protected fileChooser member of TextEditor

-Jeff




 
 
  Contact Us     Site Map     Search     Terms and Conditions     Privacy Policy     Participation Policy
 
National Science Foundation (NSF) UCAR Community Programs   Unidata is a member of the UCAR Community Programs, is managed by the University Corporation for Atmospheric Research, and is sponsored by the National Science Foundation.
P.O. Box 3000     Boulder, CO 80307-3000 USA     Tel: 303-497-8643     Fax: 303-497-8690