[gate-cvs] SF.net SVN: gate:[19691] gate/trunk/build

2016-10-18 Thread gate-project
Revision: 19691
  http://sourceforge.net/p/gate/code/19691
Author:   gate-project
Date: 2016-10-19 01:23:09 + (Wed, 19 Oct 2016)
Log Message:
---
Build number update (build 5626)

Modified Paths:
--
gate/trunk/build/build.properties
gate/trunk/build/build.txt

Modified: gate/trunk/build/build.properties
===
--- gate/trunk/build/build.properties   2016-10-18 13:11:53 UTC (rev 19690)
+++ gate/trunk/build/build.properties   2016-10-19 01:23:09 UTC (rev 19691)
@@ -1,4 +1,4 @@
 #Build Number for ANT. Do not edit!
-#Tue Oct 18 02:11:12 BST 2016
+#Wed Oct 19 02:09:57 BST 2016
 cvs.version=$Id\: build.properties 7542 2006-07-17 14\:26\:51Z ian_roberts $
-build.number=5626
+build.number=5627

Modified: gate/trunk/build/build.txt
===
--- gate/trunk/build/build.txt  2016-10-18 13:11:53 UTC (rev 19690)
+++ gate/trunk/build/build.txt  2016-10-19 01:23:09 UTC (rev 19691)
@@ -1 +1 @@
-5625
\ No newline at end of file
+5626
\ No newline at end of file

This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.


--
Check out the vibrant tech community on one of the world's most 
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
___
GATE-cvs mailing list
GATE-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gate-cvs


[gate-cvs] SF.net SVN: gate:[19690] gate/trunk/src/main/gate/gui/DocumentExportMenu. java

2016-10-18 Thread ian_roberts
Revision: 19690
  http://sourceforge.net/p/gate/code/19690
Author:   ian_roberts
Date: 2016-10-18 13:11:53 + (Tue, 18 Oct 2016)
Log Message:
---
Use invokeAndWait rather than invokeLater to add items to the document exporter 
menu, to avoid deadlocks when the menu tries to update itself for a new 
exporter on one thread at the same time as the plugin manager is registering a 
different resource type.

Modified Paths:
--
gate/trunk/src/main/gate/gui/DocumentExportMenu.java

Modified: gate/trunk/src/main/gate/gui/DocumentExportMenu.java
===
--- gate/trunk/src/main/gate/gui/DocumentExportMenu.java2016-10-18 
01:23:24 UTC (rev 19689)
+++ gate/trunk/src/main/gate/gui/DocumentExportMenu.java2016-10-18 
13:11:53 UTC (rev 19690)
@@ -67,6 +67,8 @@
 import javax.swing.SwingUtilities;
 import javax.swing.table.TableCellEditor;
 
+import org.apache.log4j.Logger;
+
 /**
  * A menu which updates as plugins are (un)loaded to allow the export of
  * documents and corpora to any of the supported output formats.
@@ -74,6 +76,8 @@
 @SuppressWarnings("serial")
 public class DocumentExportMenu extends XJMenu implements CreoleListener {
 
+  private static final Logger log = Logger.getLogger(DocumentExportMenu.class);
+
   static DocumentExportDialog dialog = new DocumentExportDialog();
 
   protected IdentityHashMap itemByResource =
@@ -455,14 +459,22 @@
 final Resource res = e.getResource();
 
 if(res instanceof DocumentExporter) {
-  SwingUtilities.invokeLater(new Runnable() {
-
+  Runnable runnable = new Runnable() {
 @Override
 public void run() {
   addExporter((DocumentExporter)res);
 }
-  });
+  };
   
+  if(SwingUtilities.isEventDispatchThread()) {
+runnable.run();
+  } else {
+try {
+  SwingUtilities.invokeAndWait(runnable);
+} catch(Exception ex) {
+  log.warn("Exception registering document exporter", ex);
+}
+  }
 }
   }
 

This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.


--
Check out the vibrant tech community on one of the world's most 
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
___
GATE-cvs mailing list
GATE-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gate-cvs