From: tcofoegbu Date: Wed, 6 Apr 2016 14:02:54 +0000 (+0100) Subject: JAL-2047 JAL-1919 fixed empty tooltip text when a cell in PDB Search and Structure... X-Git-Tag: Release_2_10_0~271 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=d8953149cfddc56c08aecac475e5154a49f4c2f7;p=jalview.git 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 --- 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(); + } } } }