Revision: 19968
http://sourceforge.net/p/gate/code/19968
Author: markagreenwood
Date: 2017-01-18 12:02:34 +0000 (Wed, 18 Jan 2017)
Log Message:
-----------
copied a bunch of bug fixes across from the trunk
Modified Paths:
--------------
gate/branches/sawdust2/gate-core/src/main/java/gate/gui/DocumentExportMenu.java
gate/branches/sawdust2/gate-core/src/main/java/gate/gui/LuceneDataStoreSearchGUI.java
gate/branches/sawdust2/gate-core/src/main/java/gate/gui/NameBearerHandle.java
Property Changed:
----------------
gate/branches/sawdust2/gate-core/src/main/java/gate/gui/
Index: gate/branches/sawdust2/gate-core/src/main/java/gate/gui
===================================================================
--- gate/branches/sawdust2/gate-core/src/main/java/gate/gui 2017-01-18
11:55:36 UTC (rev 19967)
+++ gate/branches/sawdust2/gate-core/src/main/java/gate/gui 2017-01-18
12:02:34 UTC (rev 19968)
Property changes on: gate/branches/sawdust2/gate-core/src/main/java/gate/gui
___________________________________________________________________
Modified: svn:mergeinfo
## -4,4 +4,4 ##
/gate/branches/release-8.1/src/main/gate/gui:18736-18747
/gate/branches/sawdust/src/main/gate/gui:17055-17079
/gate/tags/release-7.0/src/main/gate/gui:15399-15407
-/gate/trunk/src/main/gate/gui:3-7,19180-19684
+/gate/trunk/src/main/gate/gui:3-7,19180-19967
\ No newline at end of property
Modified:
gate/branches/sawdust2/gate-core/src/main/java/gate/gui/DocumentExportMenu.java
===================================================================
---
gate/branches/sawdust2/gate-core/src/main/java/gate/gui/DocumentExportMenu.java
2017-01-18 11:55:36 UTC (rev 19967)
+++
gate/branches/sawdust2/gate-core/src/main/java/gate/gui/DocumentExportMenu.java
2017-01-18 12:02:34 UTC (rev 19968)
@@ -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<Resource, JMenuItem> itemByResource =
@@ -318,7 +322,7 @@
fileName.length()
-
de.getDefaultExtension()
.length()
- + 1);
+ - 1);
}
if(usedFileNames.contains(fileName)) {
// name clash -> add unique ID
@@ -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);
+ }
+ }
}
}
Modified:
gate/branches/sawdust2/gate-core/src/main/java/gate/gui/LuceneDataStoreSearchGUI.java
===================================================================
---
gate/branches/sawdust2/gate-core/src/main/java/gate/gui/LuceneDataStoreSearchGUI.java
2017-01-18 11:55:36 UTC (rev 19967)
+++
gate/branches/sawdust2/gate-core/src/main/java/gate/gui/LuceneDataStoreSearchGUI.java
2017-01-18 12:02:34 UTC (rev 19968)
@@ -3156,8 +3156,8 @@
break;
case ResultTableModel.RESULT_COLUMN:
case ResultTableModel.FEATURES_COLUMN:
- if(((String)value).length() > ResultTableModel.MAX_COL_WIDTH) {
- tip = (String)value;
+ tip = value != null ? (String)value : "";
+ if(tip.length() > ResultTableModel.MAX_COL_WIDTH) {
if(tip.length() > 1000) {
tip =
tip.substring(0, 1000 / 2) + "<br>...<br>"
Modified:
gate/branches/sawdust2/gate-core/src/main/java/gate/gui/NameBearerHandle.java
===================================================================
---
gate/branches/sawdust2/gate-core/src/main/java/gate/gui/NameBearerHandle.java
2017-01-18 11:55:36 UTC (rev 19967)
+++
gate/branches/sawdust2/gate-core/src/main/java/gate/gui/NameBearerHandle.java
2017-01-18 12:02:34 UTC (rev 19968)
@@ -716,7 +716,7 @@
private static final long serialVersionUID = 1L;
public ExportApplicationAction() {
- super("Export for GATECloud.net");
+ super("Export for GATE Cloud");
putValue(SHORT_DESCRIPTION,
"Saves the resources of this application in a ZIP 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
[email protected]
https://lists.sourceforge.net/lists/listinfo/gate-cvs