Revision: 18288 http://sourceforge.net/p/gate/code/18288 Author: markagreenwood Date: 2014-09-03 13:28:22 +0000 (Wed, 03 Sep 2014) Log Message: ----------- I think I've now fixed the lock/unlock issue
Modified Paths: -------------- gate/trunk/src/main/gate/gui/MainFrame.java gate/trunk/src/main/gate/gui/NameBearerHandle.java Modified: gate/trunk/src/main/gate/gui/MainFrame.java =================================================================== --- gate/trunk/src/main/gate/gui/MainFrame.java 2014-09-03 12:54:49 UTC (rev 18287) +++ gate/trunk/src/main/gate/gui/MainFrame.java 2014-09-03 13:28:22 UTC (rev 18288) @@ -105,6 +105,7 @@ import java.io.UnsupportedEncodingException; import java.lang.reflect.Constructor; import java.lang.reflect.InvocationHandler; +import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Method; import java.lang.reflect.Proxy; import java.net.MalformedURLException; @@ -2196,14 +2197,15 @@ // this call should not return until the dialog is up to ensure // proper // sequentiality for lock - unlock calls - while(guiLock == null || !guiLock.isShowing()) { + /*while(guiLock == null || !guiLock.isShowing()) { try { Thread.sleep(100); } catch(InterruptedException ie) { log.debug("Interrupted sleep when the GUI is locked.", ie); } - } + }*/ + } public synchronized static void unlockGUI() { @@ -2225,12 +2227,12 @@ } }; - if (SwingUtilities.isEventDispatchThread()) { + /*if (SwingUtilities.isEventDispatchThread()) { t.start(); } - else { + else {*/ SwingUtilities.invokeLater(t); - } + //} } /** Flag to protect Frame title to be changed */ Modified: gate/trunk/src/main/gate/gui/NameBearerHandle.java =================================================================== --- gate/trunk/src/main/gate/gui/NameBearerHandle.java 2014-09-03 12:54:49 UTC (rev 18287) +++ gate/trunk/src/main/gate/gui/NameBearerHandle.java 2014-09-03 13:28:22 UTC (rev 18288) @@ -980,8 +980,8 @@ }// End if DataStore ownDS = ((LanguageResource)target).getDataStore(); if(ds == ownDS) { - //MainFrame.lockGUI("Saving " - // + ((LanguageResource)target).getName()); + MainFrame.lockGUI("Saving " + + ((LanguageResource)target).getName()); StatusListener sListener = (StatusListener)gate.Gate .getListeners().get("gate.event.StatusListener"); @@ -1003,8 +1003,8 @@ StatusListener sListener = (StatusListener)gate.Gate .getListeners().get("gate.event.StatusListener"); - //MainFrame.lockGUI("Saving " - // + ((LanguageResource)target).getName()); + MainFrame.lockGUI("Saving " + + ((LanguageResource)target).getName()); if(sListener != null) sListener.statusChanged("Saving: " This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. ------------------------------------------------------------------------------ Slashdot TV. Video for Nerds. Stuff that matters. http://tv.slashdot.org/ _______________________________________________ GATE-cvs mailing list GATE-cvs@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gate-cvs