From d8953149cfddc56c08aecac475e5154a49f4c2f7 Mon Sep 17 00:00:00 2001 From: tcofoegbu Date: Wed, 6 Apr 2016 15:02:54 +0100 Subject: [PATCH] JAL-2047 JAL-1919 fixed empty tooltip text when a cell in PDB Search and Structure Chooser interface has empty text and trapped other minor exceptions --- src/jalview/ext/jmol/JmolParser.java | 6 ++++++ src/jalview/ws/uimodel/PDBRestResponse.java | 9 ++++++++- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/src/jalview/ext/jmol/JmolParser.java b/src/jalview/ext/jmol/JmolParser.java index 3280471..0cbd620 100644 --- a/src/jalview/ext/jmol/JmolParser.java +++ b/src/jalview/ext/jmol/JmolParser.java @@ -277,9 +277,15 @@ public class JmolParser extends StructureFile implements JmolStatusListener { if (secstr[p] >= 'A' && secstr[p] <= 'z') { + try + { asecstr[p] = new Annotation(String.valueOf(secstr[p]), null, secstrcode[p], Float.NaN); ssFound = true; + } catch (Exception e) + { + // e.printStackTrace(); + } } } diff --git a/src/jalview/ws/uimodel/PDBRestResponse.java b/src/jalview/ws/uimodel/PDBRestResponse.java index 2a38b39..3dc3563 100644 --- a/src/jalview/ws/uimodel/PDBRestResponse.java +++ b/src/jalview/ws/uimodel/PDBRestResponse.java @@ -198,7 +198,8 @@ public class PDBRestResponse summaryRowData[colCounter++] = 0.0; } }else{ - summaryRowData[colCounter++] = fieldData; + summaryRowData[colCounter++] = (fieldData == null || fieldData + .isEmpty()) ? null : fieldData; } } } @@ -270,6 +271,8 @@ public class PDBRestResponse { for (PDBDocField wantedField : wantedFields) { + try + { if (wantedField.equals(PDBDocField.PDB_ID)) { tbl_summary.getColumn(wantedField.getName()).setMinWidth(40); @@ -294,6 +297,10 @@ public class PDBRestResponse tbl_summary.getColumn(wantedField.getName()).setMaxWidth(400); tbl_summary.getColumn(wantedField.getName()).setPreferredWidth(95); } + } catch (Exception e) + { + e.printStackTrace(); + } } } } -- 1.7.10.2