merge
authortcofoegbu <tcnofoegbu@dundee.ac.uk>
Mon, 31 Aug 2015 17:36:39 +0000 (18:36 +0100)
committertcofoegbu <tcnofoegbu@dundee.ac.uk>
Mon, 31 Aug 2015 17:36:39 +0000 (18:36 +0100)
51 files changed:
help/help.jhm
help/helpTOC.xml
help/html/features/chimera.html
help/html/features/commandline.html
help/html/features/dassettings.html
help/html/features/featuresFormat.html
help/html/features/groovy.html
help/html/features/hiddenRegions.html
help/html/features/jmol.html
help/html/features/preferences.html
help/html/features/seqfetch.html
help/html/features/splitView.html
help/html/features/varna.html
help/html/features/viewingpdbs.html
help/html/io/export.html
help/html/io/fileformats.html
help/html/io/index.html
help/html/memory.html
help/html/menus/alignmentMenu.html
help/html/menus/desktopMenu.html
help/html/privacy.html
help/html/releases.html
src/MCview/Atom.java
src/jalview/appletgui/APopupMenu.java
src/jalview/appletgui/AppletJmol.java
src/jalview/appletgui/AppletJmolBinding.java
src/jalview/appletgui/SeqPanel.java
src/jalview/appletgui/SplitFrame.java
src/jalview/ext/jmol/JalviewJmolBinding.java
src/jalview/ext/jmol/PDBFileWithJmol.java
src/jalview/ext/rbvi/chimera/JalviewChimeraBinding.java
src/jalview/gui/AlignFrame.java
src/jalview/gui/AlignViewport.java
src/jalview/gui/AlignmentPanel.java
src/jalview/gui/SeqPanel.java
src/jalview/gui/SplitFrame.java
src/jalview/httpserver/HttpServer.java
src/jalview/io/VamsasAppDatastore.java
src/jalview/io/vamsas/Sequencemapping.java
src/jalview/structure/StructureSelectionManager.java
src/jalview/ws/jws2/Jws2Discoverer.java
test/MCview/AtomTest.java
test/jalview/ext/jmol/JmolViewerTest.java [new file with mode: 0644]
test/jalview/ext/rbvi/chimera/JalviewChimeraView.java
test/jalview/gui/AlignViewportTest.java
test/jalview/gui/PopupMenuTest.java
test/jalview/io/AnnotatedPDBFileInputTest.java
test/jalview/structure/StructureSelectionManagerTest.java
test/jalview/ws/PDBSequenceFetcherTest.java
test/jalview/ws/rest/RestClientTest.java
utils/InstallAnywhere/Jalview.iap_xml

index 2cfe8d8..a450473 100755 (executable)
@@ -74,6 +74,7 @@
    <mapID target="edit" url="html/editing/index.html"/>
    <mapID target="jalarchive" url="html/features/jalarchive.html"/>
    <mapID target="multipleviews" url="html/features/multipleViews.html"/>
+   <mapID target="splitframe" url="html/features/splitView.html"/>
    <mapID target="trees" url="html/calculations/tree.html"/>
    <mapID target="treeviewer" url="html/calculations/treeviewer.html"/>
    <mapID target="sorting" url="html/calculations/sorting.html"/>
index 345cb51..4ce9892 100755 (executable)
@@ -29,6 +29,7 @@
                <tocitem text="Making Figures" target="export" />
                <tocitem text="Hidden Regions" target="hiddenRegions" />
                <tocitem text="Multiple Views" target="multipleviews" />
+               <tocitem text="Split Frame View" target="splitframe" />
                <tocitem text="Viewing Trees" target="treeviewer" expand="false" />
                <tocitem text="Fetching Sequences" target="seqfetch" />
                <tocitem text="Nucleic Acid Support" target="nucleicAcids" expand="false">
index 11b43c8..713d6a8 100644 (file)
@@ -32,6 +32,7 @@ id pop-up menu</a> (if you can't see this, then you need to <a
 sequence). Chimera is available from the Jalview desktop, provided Chimera has been separately installed.</p>
 <p>You can set a default choice of Jmol or Chimera structure viewer in <a href="preferences.html#structure"> Preferences</a>. 
 You can also optionally specify the path to the Chimera program here (if it differs from the standard paths searched by Jalview).
+<p>If you save your Jalview session as a project file, the state of any open Chimera windows will also be saved, and can be reopened by loading the project file on any machine with Chimera installed. <em>Since Jalview 2.9.</em>
 <!-- <p>The following menu entries are provided for viewing structure data<br>
   <ul>
     <li>The <strong>&quot;Structure&#8594;View
@@ -68,9 +69,9 @@ mouse over the structure brings up tooltips giving the residue name, PDB
 residue number and chain code
 ([RES]Num:Chain). Moving the mouse over an
 associated residue in an alignment window highlights the associated
-atoms in the displayed structures. For comprehensive details of Chimera's commands, refer to the tool's Help menu.
+atoms in the displayed structures. When residues are selected in the Chimera window, they are highlighted on the alignment. For comprehensive details of Chimera's commands, refer to the tool's Help menu.
 <p>Basic screen operations (see <a href="http://www.cgl.ucsf.edu/chimera/current/docs/UsersGuide/mouse.html">Chimera help</a> 
-(http://www.cgl.ucsf.edu/chimera/current/docs/UsersGuide/mouse.html) for full details).
+at http://www.cgl.ucsf.edu/chimera/current/docs/UsersGuide/mouse.html for full details).
 <table border="1">
        <tr>
                <td><strong>Action</strong></td>
@@ -97,10 +98,16 @@ atoms in the displayed structures. For comprehensive details of Chimera's comman
                <td>alt + Click<br>
                and drag</td>
        </tr>
+       <tr>
+               <td>Select Residues</td>
+               <td>Ctrl + Click (and drag to select a region)</td>
+               <td>Ctrl + Click (and drag)</td>
+               <td>Ctrl + Click (and drag)</td>
+       </tr>
 </table>
 </p>
 <p><strong>Jalview Controls</strong>
-<p>The Jalview Chimera View window has up to five menus:
+<p>The Jalview Chimera View window has up to five menus:</p>
 <ul>
        <li><Strong>File<br>
        </strong>
@@ -170,6 +177,10 @@ atoms in the displayed structures. For comprehensive details of Chimera's comman
        </ul>
        </li>
 </ul>
-</p>
+<p><strong>Chimera and Windows Firewall</strong></p>
+Jalview and Chimera communicate using Chimera's <a href="http://www.cgl.ucsf.edu/chimera/current/docs/ContributedSoftware/restserver/restserver.html">REST service</a> (http://www.cgl.ucsf.edu/chimera/current/docs/ContributedSoftware/restserver/restserver.html).<br>
+Technically this requires both Chimera and Jalview to open ports on the local network, and this may be blocked by Windows Firewall with a warning message such as<br/>
+"Windows Firewall has blocked some features of this program" (where the program may be jp2launcher.exe for Jalview Webstart, or java.exe or javaw.exe for the InstallAnywhere version).<br/>
+To allow Jalview and Chimera to interact, you may need to add permission for the program to communicate over the network. This can be done from the warning dialogue, or in Control Panel, Firewall settings. 
 </body>
 </html>
index e393701..dd6c0de 100644 (file)
  <p><strong>Running Jalview from the command line</strong></p>
  <p>Jalview is most easily run from the command line if you have built
  it from source, or via the 'Jalview' executable created from the
- InstallAnywhere jalview installation. Both of these mechanisms allow
- true command line execution of jalview - allowing you to provide
+ InstallAnywhere Jalview installation. Both of these mechanisms allow
+ true command line execution of Jalview - allowing you to provide
  additional options.</p><p>
 The Java Webstart version of
- jalview can be executed from the command line using something like
+ Jalview can be executed from the command line using something like
  :
  <pre>javaws http://www.jalview.org/webstart/jalview.jnlp -open
  <em>yourFileName</em></pre>
  But, this is not guaranteed to work on all versions of webstart on all
  operating systems, and doesn't let you execute Jalview with any
  additional parameters.
- <p><strong>Running jalview from the InstallAnywhere
+ <p><strong>Running Jalview from the InstallAnywhere
  installation</strong></p>
  <p>If you install with InstallAnywhere you can use several more commands. 
  However, if you call the application with the link provided by InstallAnywhere 
  any output from the application will be sent to output.txt, not standard 
  out.<br>
- The jalview application also requires a number of additional
+ The Jalview application also requires a number of additional
  libraries on the class path. The command line below adds the Jalview
  installation's 'lib' directory to the list of directories that are
  searched for jars to be added to the classpath:</p>
index 684d183..90577f0 100644 (file)
@@ -44,8 +44,10 @@ more about these values.
 <p><strong>Updating the list of sources</strong></p>
 <p>When the DAS Settings panel is first opened, and when the <strong>'Refresh
 source'</strong> buton is pressed, a list of DAS sources is retrieved from the
-DAS registry URL (set by default to the DAS registration server at
-http://www.dasregistry.org/das/).</p>
+DAS registry URL. Note that the registry hosted at http://www.dasregistry.org/das/ was retired at the start of 2015.
+An alternative service is currently hosted at http://www.ebi.ac.uk/das-srv/registry/das/. To connect to this service, ensure your .jalview_properties file includes the following line:<br>
+<b>DAS_REGISTRY_URL=http\://www.ebi.ac.uk/das-srv/registry/das/</b>
+</p>
 <p><strong>Adding your own DAS Sources</strong></p>
 <p>You can add your own DAS source to the list by clicking the
 &quot;Add Local Source&quot; button. Enter the URL and nickname of your
index 9e2be6a..82e46cb 100755 (executable)
@@ -165,7 +165,7 @@ Non-positional features are shown in a tooltip when the mouse
 hovers over the sequence ID panel, and any embedded links can be
 accessed from the popup menu.<br/> <em>Scores</em><br>
 Scores can be associated with sequence features, and used to sort
-sequences or shade the alignment (this was added in jalview 2.5).
+sequences or shade the alignment (this was added in Jalview 2.5).
 The score field is optional, and malformed scores will be
 ignored.</p>
 
index b49fc17..6db1d1c 100644 (file)
@@ -44,7 +44,7 @@
                The jars are obtained from the <em>embedded</em> directory within the
                <a href="http://dist.codehaus.org/groovy/distributions">groovy
                        distribution</a>. The easiest way of adding them to the Jalview classpath
-               is to download and build jalview from its source distribution, and
+               is to download and build Jalview from its source distribution, and
                then add the groovy-all-*.jar to the lib directory whose path is given
                in the java.ext.dirs property.
        </p>
        </p>
        <p>
                <strong>Executing groovy scripts on Jalview startup</strong><br>
-               The -groovy &lt;script&gt; option on the <a href="commandline.html" />
+               The -groovy &lt;script&gt; option on the <a href="commandline.html">
                Jalview command line</a> will execute the contents of &lt;script&gt;.
                &lt;script&gt; may be a file, a URL, or alternatively if it is
                &quot;STDIN&quot; then the standard input will be used.<br>
                <em>Note: The groovy script will be executed <strong>after</strong>
                        any data is loaded, and <strong>before</strong> images or any output
-                       files are written. This allows you to perform customised jalview
+                       files are written. This allows you to perform customised Jalview
                        analysis workflows with groovy.</em>
        </p>
        <p>
                object defined in the groovy environent which corresponds to the
        <pre>jalview.gui.Desktop</pre>
        object which manages all the Jalview windows.
-       </p>
        Here's an example to get you started:
        <br>
        <ul>
                <li>Getting the title, alignment and first sequence from the
                        current alignFrame<br> <pre>
-def alf = Jalview.getAlignframes();
+def alf = Jalview.getAlignFrames();
 print alf[0].getTitle();
 def alignment = alf[0].viewport.alignment;
 def seq = alignment.getSequenceAt(0);
@@ -90,8 +89,6 @@ def seq = alignment.getSequenceAt(0);
 <li>When running a groovy script from the command line, the alignment that was just loaded can be referred to like so:<br><pre>
 print currentAlFrame.getTitle();</pre>
        </ul>
-       </p>
-
-       <p>&nbsp;</p>
+If you have downloaded the InstallAnywhere version of Jalview, you can find additional groovy scripts in the examples/groovy subfolder of the installation directory.
 </body>
 </html>
index b9e8382..48d205f 100644 (file)
@@ -48,7 +48,7 @@ or web service alignments (<em>nb. this may change in the future</em>).
 <p><strong><em>Hidden Sequence Representatives and
 Multiple Views</em></strong><br>
 <em>A word of warning: hidden representative sequence groups are
-(still) only partly implemented in the jalview 2.5 release, and we hope
+(still) only partly implemented in the Jalview 2.5 release, and we hope
 to deal with the following issues in the future.</em><br>
 Currently, represented hidden groups are only made correctly if there is
 just one alignment view. When multiple views on an alignment exist, then
index c81fcc3..9d0ad11 100644 (file)
@@ -221,7 +221,7 @@ labels, plotting surfaces, and display animation. The 'Set Picking' menu
 controls the behaviour of single and double mouse clicking on the
 structure, and the 'Console' option opens the Jmol scripting console.</p>
 <p>The state of each Jmol display is stored within <a
-       href="jalarchive.html">jalview archives</a> as a Jmol state recovery
+       href="jalarchive.html">Jalview archives</a> as a Jmol state recovery
 script file. This means that any Jmol visualization effects that you add
 beyond those provided by Jalview will be able to be stored and recovered
 along with the displayed alignments in Jalview.</p>
index 928ea2c..c86abfa 100755 (executable)
@@ -142,7 +142,7 @@ details as necessary. Web Services will not work if you are using a
 proxy server and do not enter the settings here.</p>
 <p><em>Usage statistics, Questionnaire and Version checks</em><br>
 Uncheck these options to prevent Jalview from submitting usage
-statistics to google analytics, checking for jalview questionnaires or
+statistics to google analytics, checking for Jalview questionnaires or
 retrieving details of the latest release version (at www.jalview.org).
 See the <a href="../privacy.html">user privacy statement</a> for more
 information.</p>
@@ -163,7 +163,7 @@ style for EPS export:
        EPS files will be a mixture of text and lineart. This produces compact
        files that can be edited easily in programs like Microsoft Word and
        Adobe Illustrator, but can be problematic if the fonts available to
-       jalview are not accessible by the program reading the EPS file.
+       Jalview are not accessible by the program reading the EPS file.
 </ul>
 <p><em>Automatically set ID width</em><br>
 When enabled, the column containing sequence and annotation labels at the left hand side of an exported figure will be made large enough to display each sequence ID and annotation label in its own line. Enable this if you have particularly long sequence IDs and need to generate EPS or PNG figures or web pages.</p>
index 2516f3f..2a7c429 100755 (executable)
@@ -49,7 +49,7 @@ WSDBFetch service provided by the European Bioinformatics Institute, or, since J
   one or more accession ids (as a semi-colon separated list), or press the 
   &quot;Example&quot; button to paste the example accession for the currently selected database into the retrieval box.
    Finally, press &quot;OK&quot; to initiate the retrieval.</p>
-   <p>Since Jalview 2.9 if  PDB is selected as the sequence database, a specialised interface - <a href="pdbsequencefetcher.html">PDB Sequence Fetcher</a>  is used for discovering and retrieving the sequenec data. </p>
+   <p>Since Jalview 2.9 if  PDB is selected as the sequence database, a specialised interface - <a href="pdbsequencefetcher.html">PDB Sequence Fetcher</a>  is used for discovering and retrieving the sequence data. </p>
        <p><strong>Specifying chains for PDB IDs</strong>
   If you are retrieving sequences from the PDB, you can retrieve
   specific chains by appending a colon and the chain id to the PDB
index c9ce093..16d6c10 100644 (file)
@@ -43,7 +43,8 @@ This consensus may reveal variation in nucleotides coding for conserved protein
 <p><strong><em>Add Sequences</em></strong></p>
 <p>If you add (coding) DNA sequences to an open peptide alignment, or vice versa, <em>and</em> at least one DNA sequence translates to one of the
 peptide sequences, then the option to open in a split window is offered. The DNA may include start and/or stop codons, but no non-coding (intron)
-sequence.</p> 
+sequence.<br>
+If more than one cDNA variant is present in the alignment, Jalview will first try to match these to protein sequences based on any retrieved cross-references, and failing that, pairwise as they are ordered in the alignments. 
 
 <p>This option is available in Jalview Desktop (when adding sequences by any supported method), and Jalview applet (adding from textbox).
 The additional options below apply to Jalview Desktop only.</p>
@@ -56,7 +57,7 @@ calculated protein product in a Split Frame view.</p>
 <p>Menu option <strong><a href="../menus/alwcalculate.html">"Calculate | Get Cross-References"</a></strong> is available for fetched sequences which have cross-references to other databases.
 On selecting protein cross-references (for a cDNA alignment), or DNA xrefs (for peptide), a Split Frame view is opened showing cDNA and peptide.</p>
 
-<p><strong><em>Realign Split View</em></strong></p>
+<p><strong><em>Realign a Split View</em></strong></p>
 <p>If you invoke a web service to realign either half of a Split Frame, then the resulting realignment is displayed in a new
 Split Frame.</p> 
 <ul>
@@ -69,6 +70,6 @@ Split Frame.</p>
 </ul> 
   
 
-<p><em>Split Frame Views were introduced in Jalview 2.?.?</em></p>
+<p><em>Split Frame Views were introduced in Jalview 2.9</em></p>
 </body>
 </html>
index 5bccdc0..7587ea7 100644 (file)
@@ -33,6 +33,7 @@ you can't see this, then no RNA structure is associated with your
 sequence or alignment). In the pop-up menu all structures that
 are associated with this sequence and all sequences that are
 associated with the alignment are available.
+<p>Saving a Jalview session as a project file includes the state of any Varna viewers, which are reopened when the project is reloaded <em>(since Jalview 2.9)</em>.
 
 <p><strong>Different structures</strong></p>
 <ul>
@@ -70,7 +71,7 @@ which provides access to a number of features like different draw algorithm, col
 <p><strong>More Information</strong></p>
 <p>VARNA is a very powerful RNA viewer on its own. Only the
 essentials have been described here - the interested reader is
-referred to <a href="http://varna.lri.fr/usermanual.html">VARNA's own
+referred to <a href="http://varna.lri.fr/index.php?page=manual&css=varna">VARNA's own
 comprehensive online documentation</a>.</p>
 </body>
 </html>
index 506beef..44a07cc 100755 (executable)
@@ -124,7 +124,7 @@ associate PDB files with names like '1gaq.pdb' with sequences that
 have an ID like '1gaq'.
 <br/><em>Note: This feature was added in Jalview 2.7</em>
 </p>
-<p><em>Note for jalview applet users:<br>
+<p><em>Note for Jalview applet users:<br>
 Due to the applet security constraints, PDB Files can currently only be
 imported by cut and paste of the PDB file text into the text box opened
 by the 'From File' entry of the structure menu.</em></p>
index e9726de..a7a5a1a 100755 (executable)
@@ -40,7 +40,7 @@ diagrams in publications and on the web.</em>
 </li></ul>
   
 <p><em>Tips for working with EPS Files</em></p>
-<li>The EPS file generated by jalview contains vector graphics which are directly 
+<li>The EPS file generated by Jalview contains vector graphics which are directly 
   editable in graphics applications such as Adobe Illustrator.</li>
 <li>EPS files can be produced as &quot;Text&quot; or &quot;Lineart&quot;. Use 
   &quot;Text&quot; if you want the final document to be MUCH smaller in diskspace 
index b457adf..16e9cc6 100755 (executable)
@@ -34,7 +34,7 @@ td {
 <p><strong>Alignment File Formats</strong>
 <p>Jalview understands a wide range of sequence alignment formats. In
 order to determine which format has been used for an alignment,
-jalview tries to detect some text or formatting unique to one of the formats:
+Jalview tries to detect some text or formatting unique to one of the formats:
 </p>
 <table width="100%" border="1">
 <tr><td width="17%">Format</td>
@@ -83,7 +83,7 @@ THISISASEQUENCE<br></td>
 <td width="23%">.json</td>
 </tr>
 </table>
-<p>The file extensions are used to associate jalview alignment icons
+<p>The file extensions are used to associate Jalview alignment icons
 with alignment files: <img src="file.png" width=12 height=12 >
 </p>
 </body>
index 40e8f89..69c3a1f 100755 (executable)
@@ -48,7 +48,7 @@ an unknown format or there is any other error reading the alignment file
 then you will be given an error message. If you think Jalview really
 should be able to read your file, then send an email containing the
 problem file to help@jalview.org.</p>
-<p>Jalview can also read jalview specific files for <a
+<p>Jalview can also read Jalview specific files for <a
        href="../features/featuresFormat.html">sequence features</a> and <a
        href="../features/annotationsFormat.html">alignment annotation</a>.</p>
 <p><strong>Output</strong></p>
@@ -71,7 +71,7 @@ annotation</a> can be exported as a comma separated value file by right
 clicking on an annotation row under the alignment.</p>
 <p>You can also save the current set of alignments and their
 colours, annotations and trees in a Jalview archive file using <strong>Desktop&#8594;Save
-project</strong>.</p>
+project</strong>.<br>The project data includes the state of any open structure viewers (Jmol, and <em>since Jalview 2.9</em> also Chimera and Varna).</p>
 <p>&nbsp;</p>
 </body>
 </html>
index f35c457..664904f 100755 (executable)
@@ -67,7 +67,7 @@ The way you increase the memory settings for the JVM depends on which installati
                        your Java installation's bin directory) with the file location as its
                        argument. The file's url is something like :<br> <pre>
 file://&lt;full path to file&gt;
-</pre> If jalview doesn't start up, see <a href="#memsetting">below</a>.
+</pre> If Jalview doesn't start up, see <a href="#memsetting">below</a>.
                        You'll have to edit the above settings in the JNLP file using a text
                        editor, save it, and try starting Jalview with it once more.
                        </p></li>
index 8b50d9e..5bf9e60 100755 (executable)
                                                selected groups of the alignment will be subdivided according to
                                                the contents of the currently selected region. <br />Use this to
                                                subdivide an alignment based on the different combinations of
-                                               residues observed at specific positions. (new in jalview 2.5)</em>
+                                               residues observed at specific positions. (new in Jalview 2.5)</em>
                                </li>
        <li><strong>Undefine Groups (Control U)<br> </strong><em>The
             alignment will be reset with no defined groups.<br> <strong>WARNING</strong>:
index 374aa9c..a650927 100755 (executable)
@@ -65,7 +65,7 @@
                <li><strong>Show Memory Usage<br></strong>
                <em>When ticked, the currently available memory will be displayed in the 
                bottom right of the desktop background area.<br>
-               See the <a href="../memory.html">help on jalview memory settings</a> for more information.</em></li>
+               See the <a href="../memory.html">help on Jalview memory settings</a> for more information.</em></li>
                <li><strong>Collect Garbage<br></strong>
                <em>Selecting this will initiate the Java Virtual Machine garbage collector, which might help free up some memory... perhaps.
                </em></li>
index 1635475..858aa32 100644 (file)
@@ -46,7 +46,7 @@ These are described below:</p>
                properties file.</i></li>
                <li><i>The Jalview web services stack is contacted to
                retrieve the currently available web services. All interactions with
-               the public jalview web services are logged, but we delete all job data
+               the public Jalview web services are logged, but we delete all job data
                (input data and results) after about two weeks.</i></li>
        </ul><br>
        </li>
index 1df3bb9..19fa285 100755 (executable)
                                        <li>Hide sequence doesn&#39;t hide associated annotation</li>
                                        <li>User defined colours dialog box too big to fit on screen
                                                and buttons not visible</li>
-                                       <li>author list isn't updated if already written to jalview
+                                       <li>author list isn't updated if already written to Jalview
                                                properties</li>
                                        <li>Popup menu won&#39;t open after retrieving sequence from
                                                database</li>
                                        </li>
                                        <li>
                                                <!-- <a href='http://issues.jalview.org/browse/JAL-1539'>JAL-1539</a>] -->
-                                               out of memory errors are not raised when saving jalview project
+                                               out of memory errors are not raised when saving Jalview project
                                                from alignment window file menu
                                        </li>
                                        <li>
                                        <li>Newly created RNA secondary structure line doesn't have
                                                'display all symbols' flag set</li>
                                        <li>T-COFFEE alignment score shading scheme and other
-                                               annotation shading not saved in jalview project</li>
+                                               annotation shading not saved in Jalview project</li>
                                        <li>Local file cannot be loaded in freshly downloaded Jalview</li>
                                        <li>Jalview icon not shown on dock in Mountain Lion/Webstart</li>
                                        <li>Load file from desktop file browser fails</li>
                                        </li>
                                        <li>Not all working JABAWS services are shown in Jalview's
                                                menu</li>
-                                       <li>JAVAWS version of jalview fails to launch with 'invalid
+                                       <li>JAVAWS version of Jalview fails to launch with 'invalid
                                                literal/length code'</li>
                                        <li>Annotation/RNA Helix colourschemes cannot be applied to
                                                alignment with groups (actually fixed in 2.8.0b1)</li>
           <li>Allow disorder predictions to be made on the current
             selection (or visible selection) in the same way that JPred
             works</li>
-          <li>Groovy scripting for headless jalview operation</li>
+          <li>Groovy scripting for headless Jalview operation</li>
         </ul> <em>Other improvements</em>
         <ul>
           <li>Upgrade desktop installer to InstallAnywhere 2013</li>
index 4d000af..894984a 100755 (executable)
@@ -77,7 +77,7 @@ public class Atom
     chain = str.substring(21, 22);
 
     resNumber = Integer.parseInt(str.substring(22, 26).trim());
-    resNumIns = str.substring(22, 27).trim();
+    resNumIns = str.substring(22, 27);
     insCode = str.substring(26, 27).charAt(0);
     this.x = (new Float(str.substring(30, 38).trim()).floatValue());
     this.y = (new Float(str.substring(38, 46).trim()).floatValue());
index 0dd73ea..9e16329 100644 (file)
@@ -1025,7 +1025,8 @@ public class APopupMenu extends java.awt.PopupMenu implements
 
     userDefinedColour.setLabel(MessageManager.getString("action.user_defined"));
     userDefinedColour.addActionListener(this);
-    PIDColour.setLabel(MessageManager.getString("action.percentage_identity"));
+    PIDColour.setLabel(MessageManager
+            .getString("label.percentage_identity"));
     PIDColour.addActionListener(this);
     BLOSUM62Colour.setLabel("BLOSUM62");
     BLOSUM62Colour.addActionListener(this);
index e889467..0379615 100644 (file)
@@ -558,7 +558,7 @@ public class AppletJmol extends EmbmenuFrame implements
     if (evt.getKeyCode() == KeyEvent.VK_ENTER && scriptWindow.isVisible())
     {
       jmb.eval(inputLine.getText());
-      history.append("\n$ " + inputLine.getText());
+      addToHistory("$ " + inputLine.getText());
       inputLine.setText("");
     }
 
@@ -701,4 +701,18 @@ public class AppletJmol extends EmbmenuFrame implements
     }
     return ap;
   }
+
+  /**
+   * Append the given text to the history object
+   * 
+   * @param text
+   */
+  public void addToHistory(String text)
+  {
+    // actually currently never initialised
+    if (history != null)
+    {
+      history.append("\n" + text);
+    }
+  }
 }
index 7035058..6ec5b4d 100644 (file)
@@ -87,7 +87,7 @@ class AppletJmolBinding extends JalviewJmolBinding
       appletJmolBinding.showConsole(true);
     }
 
-    appletJmolBinding.history.append("\n" + strEcho);
+    appletJmolBinding.addToHistory(strEcho);
   }
 
   @Override
@@ -96,7 +96,7 @@ class AppletJmolBinding extends JalviewJmolBinding
     if (appletJmolBinding.history != null && strStatus != null
             && !strStatus.equals("Script completed"))
     {
-      appletJmolBinding.history.append("\n" + strStatus);
+      appletJmolBinding.addToHistory(strStatus);
     }
   }
 
index 86dedfc..10db71a 100644 (file)
  */
 package jalview.appletgui;
 
-import java.awt.BorderLayout;
-import java.awt.Font;
-import java.awt.FontMetrics;
-import java.awt.Panel;
-import java.awt.Point;
-import java.awt.event.InputEvent;
-import java.awt.event.MouseEvent;
-import java.awt.event.MouseListener;
-import java.awt.event.MouseMotionListener;
-import java.util.List;
-import java.util.Vector;
-
 import jalview.api.AlignViewportI;
 import jalview.commands.EditCommand;
 import jalview.commands.EditCommand.Action;
+import jalview.datamodel.AlignmentI;
 import jalview.datamodel.ColumnSelection;
 import jalview.datamodel.SearchResults;
 import jalview.datamodel.SearchResults.Match;
@@ -52,6 +41,17 @@ import jalview.util.MappingUtils;
 import jalview.util.MessageManager;
 import jalview.viewmodel.AlignmentViewport;
 
+import java.awt.BorderLayout;
+import java.awt.Font;
+import java.awt.FontMetrics;
+import java.awt.Panel;
+import java.awt.Point;
+import java.awt.event.InputEvent;
+import java.awt.event.MouseEvent;
+import java.awt.event.MouseListener;
+import java.awt.event.MouseMotionListener;
+import java.util.Vector;
+
 public class SeqPanel extends Panel implements MouseMotionListener,
         MouseListener, SequenceListener, SelectionListener
 {
@@ -446,36 +446,8 @@ public class SeqPanel extends Panel implements MouseMotionListener,
       pos = sequence.findPosition(res);
       text.append(" (").append(Integer.toString(pos)).append(")");
     }
-    // Object obj = null;
-    // if (av.getAlignment().isNucleotide())
-    // {
-    // obj = ResidueProperties.nucleotideName.get(sequence.getCharAt(res)
-    // + "");
-    // if (obj != null)
-    // {
-    // text.append(" Nucleotide: ");
-    // }
-    // }
-    // else
-    // {
-    // obj = ResidueProperties.aa2Triplet.get(sequence.getCharAt(res) + "");
-    // if (obj != null)
-    // {
-    // text.append("  Residue: ");
-    // }
-    // }
-    //
-    // if (obj != null)
-    // {
-    //
-    // if (obj != "")
-    // {
-    // text.append(obj + " (" + sequence.findPosition(res) + ")");
-    // }
-    // }
 
     ap.alignFrame.statusBar.setText(text.toString());
-
   }
 
   /**
@@ -483,23 +455,37 @@ public class SeqPanel extends Panel implements MouseMotionListener,
    * search results.
    * 
    * @param results
+   * @return true if results were matched, false if not
    */
-  private void setStatusMessage(SearchResults results)
+  private boolean setStatusMessage(SearchResults results)
   {
-    List<Match> matches = results.getResults();
-    if (!matches.isEmpty())
+    AlignmentI al = this.av.getAlignment();
+    int sequenceIndex = al.findIndex(results);
+    if (sequenceIndex == -1)
+    {
+      return false;
+    }
+    SequenceI ds = al.getSequenceAt(sequenceIndex).getDatasetSequence();
+    for (Match m : results.getResults())
     {
-      Match m = matches.get(0);
       SequenceI seq = m.getSequence();
-      int sequenceIndex = this.av.getAlignment().findIndex(seq);
+      if (seq.getDatasetSequence() != null)
+      {
+        seq = seq.getDatasetSequence();
+      }
 
-      /*
-       * Convert position in sequence (base 1) to sequence character array index
-       * (base 0)
-       */
-      int start = m.getStart() - 1;
-      setStatusMessage(seq, start, sequenceIndex);
+      if (seq == ds)
+      {
+        /*
+         * Convert position in sequence (base 1) to sequence character array
+         * index (base 0)
+         */
+        int start = m.getStart() - 1;
+        setStatusMessage(seq, start, sequenceIndex);
+        return true;
+      }
     }
+    return false;
   }
 
   public void mousePressed(MouseEvent evt)
index 836d70c..888208a 100644 (file)
@@ -61,7 +61,7 @@ public class SplitFrame extends EmbmenuFrame
     {
       final StructureSelectionManager ssm = StructureSelectionManager
               .getStructureSelectionManager(topViewport.applet);
-      ssm.addMappings(protein.getAlignment().getCodonFrames());
+      ssm.registerMappings(protein.getAlignment().getCodonFrames());
       topViewport.setCodingComplement(bottomViewport);
       ssm.addCommandListener(cdna);
       ssm.addCommandListener(protein);
index 8743554..729780c 100644 (file)
@@ -947,7 +947,7 @@ public abstract class JalviewJmolBinding extends AAStructureBindingModel
     String mdlString = "";
     if ((p = strInfo.indexOf(":")) > -1)
     {
-      picked += strInfo.substring(p + 1, strInfo.indexOf("."));
+      picked += strInfo.substring(p, strInfo.indexOf("."));
     }
 
     if ((p = strInfo.indexOf("/")) > -1)
index 3b6f0c2..240ea7b 100644 (file)
@@ -176,8 +176,14 @@ public class PDBFileWithJmol extends AlignFile implements
                   newseq[p] = cinds[seq[p]] == nonGap ? ngc : seq[p];
                   if (secstr[p] >= 'A' && secstr[p] <= 'z')
                   {
-                    asecstr[p] = new Annotation("" + secstr[p], null,
-                            secstrcode[p], Float.NaN);
+                    try
+                    {
+                      asecstr[p] = new Annotation("" + secstr[p], null,
+                              secstrcode[p], Float.NaN);
+                    } catch (ArrayIndexOutOfBoundsException e)
+                    {
+                      // skip - patch for JAL-1836
+                    }
                   }
                 }
                 String modelTitle = (String) ms
index b648bea..368918b 100644 (file)
  */
 package jalview.ext.rbvi.chimera;
 
-import java.awt.Color;
-import java.net.BindException;
-import java.util.ArrayList;
-import java.util.LinkedHashMap;
-import java.util.List;
-import java.util.Map;
-
-import ext.edu.ucsf.rbvi.strucviz2.ChimeraManager;
-import ext.edu.ucsf.rbvi.strucviz2.ChimeraModel;
-import ext.edu.ucsf.rbvi.strucviz2.StructureManager;
-import ext.edu.ucsf.rbvi.strucviz2.StructureManager.ModelType;
-
 import jalview.api.AlignmentViewPanel;
 import jalview.api.FeatureRenderer;
 import jalview.api.SequenceRenderer;
@@ -49,6 +37,18 @@ import jalview.structure.StructureSelectionManager;
 import jalview.structures.models.AAStructureBindingModel;
 import jalview.util.MessageManager;
 
+import java.awt.Color;
+import java.net.BindException;
+import java.util.ArrayList;
+import java.util.LinkedHashMap;
+import java.util.List;
+import java.util.Map;
+
+import ext.edu.ucsf.rbvi.strucviz2.ChimeraManager;
+import ext.edu.ucsf.rbvi.strucviz2.ChimeraModel;
+import ext.edu.ucsf.rbvi.strucviz2.StructureManager;
+import ext.edu.ucsf.rbvi.strucviz2.StructureManager.ModelType;
+
 public abstract class JalviewChimeraBinding extends AAStructureBindingModel
 {
   // Chimera clause to exclude alternate locations in atom selection
@@ -608,6 +608,11 @@ public abstract class JalviewChimeraBinding extends AAStructureBindingModel
    */
   public void sendChimeraCommand(final String command, boolean logResponse)
   {
+    if (viewer == null)
+    {
+      // ? thread running after viewer shut down
+      return;
+    }
     viewerCommandHistory(false);
     if (lastCommand == null || !lastCommand.equals(command))
     {
index 83fb7c0..8e4030d 100644 (file)
@@ -795,7 +795,7 @@ public class AlignFrame extends GAlignFrame implements DropTargetListener,
       public void internalFrameClosed(
               javax.swing.event.InternalFrameEvent evt)
       {
-        System.out.println("deregistering discoverer listener");
+        // System.out.println("deregistering discoverer listener");
         Desktop.instance.removeJalviewPropertyChangeListener("services",
                 thisListener);
         closeMenuItem_actionPerformed(true);
@@ -1251,7 +1251,7 @@ public class AlignFrame extends GAlignFrame implements DropTargetListener,
 
   }
 
-  public static AlignmentExportData getAlignmentForExport(String exportFomat,
+  public static AlignmentExportData getAlignmentForExport(String exportFormat,
           AlignViewportI viewport)
   {
     AlignmentI alignmentToExport = null;
@@ -1268,7 +1268,7 @@ public class AlignFrame extends GAlignFrame implements DropTargetListener,
 
     boolean hasHiddenSeqs = hiddenSeqs.getSize() > 0;
     AlignExportSettings settings = new AlignExportSettings(hasHiddenSeqs,
-            viewport.hasHiddenColumns(), exportFomat);
+            viewport.hasHiddenColumns(), exportFormat);
     settings.isExportAnnotations();
 
     if (viewport.hasHiddenColumns() && !settings.isExportHiddenColumns())
@@ -4534,8 +4534,8 @@ public class AlignFrame extends GAlignFrame implements DropTargetListener,
         final List<JMenuItem> legacyItems = new ArrayList<JMenuItem>();
         try
         {
-          System.err.println("Building ws menu again "
-                  + Thread.currentThread());
+          // System.err.println("Building ws menu again "
+          // + Thread.currentThread());
           // TODO: add support for context dependent disabling of services based
           // on
           // alignment and current selection
@@ -4887,7 +4887,7 @@ public class AlignFrame extends GAlignFrame implements DropTargetListener,
                 al.getCodonFrames().addAll(cf);
                 final StructureSelectionManager ssm = StructureSelectionManager
                         .getStructureSelectionManager(Desktop.instance);
-                ssm.addMappings(cf);
+                ssm.registerMappings(cf);
               }
               else
               {
index aedfe12..579b476 100644 (file)
@@ -42,9 +42,11 @@ import jalview.analysis.AlignmentUtils;
 import jalview.analysis.AnnotationSorter.SequenceAnnotationOrder;
 import jalview.analysis.NJTree;
 import jalview.api.AlignViewportI;
+import jalview.api.AlignmentViewPanel;
 import jalview.api.ViewStyleI;
 import jalview.bin.Cache;
 import jalview.commands.CommandI;
+import jalview.datamodel.AlignedCodonFrame;
 import jalview.datamodel.Alignment;
 import jalview.datamodel.AlignmentI;
 import jalview.datamodel.ColumnSelection;
@@ -70,6 +72,7 @@ import java.awt.Rectangle;
 import java.util.ArrayList;
 import java.util.Hashtable;
 import java.util.List;
+import java.util.Set;
 import java.util.Vector;
 
 import javax.swing.JInternalFrame;
@@ -426,23 +429,20 @@ public class AlignViewport extends AlignmentViewport implements
    */
   public void replaceMappings(AlignmentI align)
   {
-    StructureSelectionManager ssm = StructureSelectionManager
-            .getStructureSelectionManager(Desktop.instance);
 
     /*
      * Deregister current mappings (if any)
      */
-    if (alignment != null)
-    {
-      ssm.removeMappings(alignment.getCodonFrames());
-    }
+    deregisterMappings();
 
     /*
      * Register new mappings (if any)
      */
     if (align != null)
     {
-      ssm.addMappings(align.getCodonFrames());
+      StructureSelectionManager ssm = StructureSelectionManager
+              .getStructureSelectionManager(Desktop.instance);
+      ssm.registerMappings(align.getCodonFrames());
     }
 
     /*
@@ -454,6 +454,27 @@ public class AlignViewport extends AlignmentViewport implements
     }
   }
 
+  protected void deregisterMappings()
+  {
+    AlignmentI al = getAlignment();
+    if (al != null)
+    {
+      Set<AlignedCodonFrame> mappings = al.getCodonFrames();
+      if (mappings != null)
+      {
+        StructureSelectionManager ssm = StructureSelectionManager
+                .getStructureSelectionManager(Desktop.instance);
+        for (AlignedCodonFrame acf : mappings)
+        {
+          if (noReferencesTo(acf))
+          {
+            ssm.deregisterMapping(acf);
+          }
+        }
+      }
+    }
+  }
+
   /**
    * DOCUMENT ME!
    * 
@@ -1059,4 +1080,34 @@ public class AlignViewport extends AlignmentViewport implements
     }
   }
 
+  /**
+   * Answers true if no alignment holds a reference to the given mapping
+   * 
+   * @param acf
+   * @return
+   */
+  protected boolean noReferencesTo(AlignedCodonFrame acf)
+  {
+    AlignFrame[] frames = Desktop.getAlignFrames();
+    if (frames == null)
+    {
+      return true;
+    }
+    for (AlignFrame af : frames)
+    {
+      if (!af.isClosed())
+      {
+        for (AlignmentViewPanel ap : af.getAlignPanels())
+        {
+          AlignmentI al = ap.getAlignment();
+          if (al != null && al.getCodonFrames().contains(acf))
+          {
+            return false;
+          }
+        }
+      }
+    }
+    return true;
+  }
+
 }
index d88e207..e29a0e2 100644 (file)
@@ -1613,7 +1613,7 @@ public class AlignmentPanel extends GAlignmentPanel implements
   @Override
   public AlignmentI getAlignment()
   {
-    return av.getAlignment();
+    return av == null ? null : av.getAlignment();
   }
 
 
index 41c3ce1..44b537b 100644 (file)
@@ -892,6 +892,10 @@ public class SeqPanel extends JPanel implements MouseListener,
     for (Match m : results.getResults())
     {
       SequenceI seq = m.getSequence();
+      if (seq.getDatasetSequence() != null)
+      {
+        seq = seq.getDatasetSequence();
+      }
 
       if (seq == ds)
       {
index a665f5c..aa658ce 100644 (file)
@@ -1,5 +1,13 @@
 package jalview.gui;
 
+import jalview.api.SplitContainerI;
+import jalview.api.ViewStyleI;
+import jalview.datamodel.AlignmentI;
+import jalview.jbgui.GAlignFrame;
+import jalview.jbgui.GSplitFrame;
+import jalview.structure.StructureSelectionManager;
+import jalview.viewmodel.AlignmentViewport;
+
 import java.awt.Component;
 import java.awt.Toolkit;
 import java.awt.event.ActionEvent;
@@ -18,14 +26,6 @@ import javax.swing.KeyStroke;
 import javax.swing.event.InternalFrameAdapter;
 import javax.swing.event.InternalFrameEvent;
 
-import jalview.api.SplitContainerI;
-import jalview.api.ViewStyleI;
-import jalview.datamodel.AlignmentI;
-import jalview.jbgui.GAlignFrame;
-import jalview.jbgui.GSplitFrame;
-import jalview.structure.StructureSelectionManager;
-import jalview.viewmodel.AlignmentViewport;
-
 /**
  * An internal frame on the desktop that hosts a horizontally split view of
  * linked DNA and Protein alignments. Additional views can be created in linked
@@ -144,16 +144,7 @@ public class SplitFrame extends GSplitFrame implements SplitContainerI
       @Override
       public void internalFrameClosed(InternalFrameEvent evt)
       {
-        if (getTopFrame() instanceof AlignFrame)
-        {
-          ((AlignFrame) getTopFrame())
-                  .closeMenuItem_actionPerformed(true);
-        }
-        if (getBottomFrame() instanceof AlignFrame)
-        {
-          ((AlignFrame) getBottomFrame())
-                  .closeMenuItem_actionPerformed(true);
-        }
+        close();
       };
     });
   }
index 3127530..7ab0d63 100644 (file)
@@ -112,6 +112,8 @@ public class HttpServer
       server = new Server(tp);
       // 2 selector threads to handle incoming connections
       ServerConnector connector = new ServerConnector(server, 0, 2);
+      // restrict to localhost
+      connector.setHost("localhost");
       server.addConnector(connector);
 
       /*
index 7df7cb2..d67293a 100644 (file)
@@ -1469,7 +1469,7 @@ public class VamsasAppDatastore
           {
             jalview.structure.StructureSelectionManager
                     .getStructureSelectionManager(Desktop.instance)
-                    .addMappings(mappings);
+                    .registerMappings(mappings);
           }
         }
       }
index 4929a06..d23b264 100644 (file)
@@ -364,7 +364,7 @@ public class Sequencemapping extends Rangetype
     }
     bindjvvobj(mapping, sequenceMapping);
     jalview.structure.StructureSelectionManager
-            .getStructureSelectionManager(Desktop.instance).addMapping(acf);
+            .getStructureSelectionManager(Desktop.instance).registerMapping(acf);
     // Try to link up any conjugate database references in the two sequences
     // matchConjugateDBRefs(from, to, mapping);
     // Try to propagate any dbrefs across this mapping.
index cf60490..4359877 100644 (file)
@@ -70,13 +70,7 @@ public class StructureSelectionManager
   /*
    * Set of any registered mappings between (dataset) sequences.
    */
-  Set<AlignedCodonFrame> seqmappings = new LinkedHashSet<AlignedCodonFrame>();
-
-  /*
-   * Reference counters for the above mappings. Remove mappings when ref count
-   * goes to zero.
-   */
-  private Map<AlignedCodonFrame, Integer> seqMappingRefCounts = new HashMap<AlignedCodonFrame, Integer>();
+  public Set<AlignedCodonFrame> seqmappings = new LinkedHashSet<AlignedCodonFrame>();
 
   private List<CommandListener> commandListeners = new ArrayList<CommandListener>();
 
@@ -518,8 +512,12 @@ public class StructureSelectionManager
         if (resNum != tmp.resNumber && tmp.alignmentMapping != -1)
         {
           resNum = tmp.resNumber;
-          mapping[tmp.alignmentMapping + 1][0] = tmp.resNumber;
-          mapping[tmp.alignmentMapping + 1][1] = tmp.atomIndex;
+          if (tmp.alignmentMapping >= -1)
+          {
+            // TODO (JAL-1836) address root cause: negative residue no in PDB file
+            mapping[tmp.alignmentMapping + 1][0] = tmp.resNumber;
+            mapping[tmp.alignmentMapping + 1][1] = tmp.atomIndex;
+          }
         }
 
         index++;
@@ -911,83 +909,48 @@ public class StructureSelectionManager
   }
 
   /**
-   * Decrement the reference counter for each of the given mappings, and remove
-   * it entirely if its reference counter reduces to zero.
-   * 
-   * @param set
-   */
-  public void removeMappings(Set<AlignedCodonFrame> set)
-  {
-    if (set != null)
-    {
-      for (AlignedCodonFrame acf : set)
-      {
-        removeMapping(acf);
-      }
-    }
-  }
-
-  /**
-   * Decrement the reference counter for the given mapping, and remove it
-   * entirely if its reference counter reduces to zero.
+   * Remove the given mapping
    * 
    * @param acf
    */
-  public void removeMapping(AlignedCodonFrame acf)
+  public void deregisterMapping(AlignedCodonFrame acf)
   {
-    if (acf != null && seqmappings.contains(acf))
+    if (acf != null)
     {
-      int count = seqMappingRefCounts.get(acf);
-      count--;
-      if (count > 0)
-      {
-        seqMappingRefCounts.put(acf, count);
-      }
-      else
-      {
-        seqmappings.remove(acf);
-        seqMappingRefCounts.remove(acf);
-        if (seqmappings.isEmpty())
-        { // debug
-          System.out.println("All mappings removed");
-        }
+      boolean removed = seqmappings.remove(acf);
+      if (removed && seqmappings.isEmpty())
+      { // debug
+        System.out.println("All mappings removed");
       }
     }
   }
 
   /**
-   * Add each of the given codonFrames to the stored set. If not aready present,
-   * increments its reference count instead.
+   * Add each of the given codonFrames to the stored set, if not aready present.
    * 
    * @param set
    */
-  public void addMappings(Set<AlignedCodonFrame> set)
+  public void registerMappings(Set<AlignedCodonFrame> set)
   {
     if (set != null)
     {
       for (AlignedCodonFrame acf : set)
       {
-        addMapping(acf);
+        registerMapping(acf);
       }
     }
   }
 
   /**
-   * Add the given mapping to the stored set, or if already stored, increment
-   * its reference counter.
+   * Add the given mapping to the stored set, unless already stored.
    */
-  public void addMapping(AlignedCodonFrame acf)
+  public void registerMapping(AlignedCodonFrame acf)
   {
     if (acf != null)
     {
-      if (seqmappings.contains(acf))
-      {
-        seqMappingRefCounts.put(acf, seqMappingRefCounts.get(acf) + 1);
-      }
-      else
+      if (!seqmappings.contains(acf))
       {
         seqmappings.add(acf);
-        seqMappingRefCounts.put(acf, 1);
       }
     }
   }
@@ -1006,10 +969,6 @@ public class StructureSelectionManager
     {
       seqmappings.clear();
     }
-    if (seqMappingRefCounts != null)
-    {
-      seqMappingRefCounts.clear();
-    }
     if (sel_listeners != null)
     {
       sel_listeners.clear();
@@ -1187,20 +1146,4 @@ public class StructureSelectionManager
     }
     return null;
   }
-
-  /**
-   * Returns the reference count for a mapping
-   * 
-   * @param acf
-   * @return
-   */
-  protected int getMappingReferenceCount(AlignedCodonFrame acf)
-  {
-    if (seqMappingRefCounts == null)
-    {
-      return 0;
-    }
-    Integer count = seqMappingRefCounts.get(acf);
-    return (count == null ? 0 : count.intValue());
-  }
 }
index 16d83e8..f2b1145 100644 (file)
@@ -419,8 +419,8 @@ public class Jws2Discoverer implements Runnable, WSMenuEntryProviderI
           Desktop.showUrl(service.getHost());
         }
       });
-      hitm.setToolTipText(JvSwingUtils
-              .wrapTooltip(false, MessageManager.getString("label.open_jabaws_web_page ")));
+      hitm.setToolTipText(JvSwingUtils.wrapTooltip(false,
+              MessageManager.getString("label.open_jabaws_web_page")));
 
       service.attachWSMenuEntry(atpoint, alignFrame);
       if (alternates.containsKey(service.serviceType))
index 2e6551c..0171eee 100644 (file)
@@ -22,7 +22,7 @@ public class AtomTest
     assertEquals("GLN", a.resName);
     assertEquals("A", a.chain);
     assertEquals(48, a.resNumber);
-    assertEquals("48", a.resNumIns);
+    assertEquals("  48 ", a.resNumIns);
     assertEquals(' ', a.insCode);
     assertEquals(22.290, a.x, 0.00001);
     assertEquals(8.595, a.y, 0.00001);
diff --git a/test/jalview/ext/jmol/JmolViewerTest.java b/test/jalview/ext/jmol/JmolViewerTest.java
new file mode 100644 (file)
index 0000000..aa127cf
--- /dev/null
@@ -0,0 +1,90 @@
+package jalview.ext.jmol;
+
+import static org.testng.AssertJUnit.assertTrue;
+
+import jalview.api.structures.JalviewStructureDisplayI;
+import jalview.bin.Cache;
+import jalview.datamodel.SequenceI;
+import jalview.gui.AlignFrame;
+import jalview.gui.Preferences;
+import jalview.gui.StructureViewer;
+import jalview.gui.StructureViewer.ViewerType;
+import jalview.io.FormatAdapter;
+
+import org.testng.annotations.AfterClass;
+import org.testng.annotations.BeforeClass;
+import org.testng.annotations.Test;
+
+@Test(singleThreaded = true)
+public class JmolViewerTest
+{
+
+  /**
+   * @throws java.lang.Exception
+   */
+  @BeforeClass(alwaysRun = true)
+  public static void setUpBeforeClass() throws Exception
+  {
+    jalview.bin.Jalview.main(new String[]
+ {
+        "-noquestionnaire -nonews -props",
+        "test/jalview/ext/rbvi/chimera/testProps.jvprops" });
+  }
+
+  /**
+   * @throws java.lang.Exception
+   */
+  @AfterClass
+  public static void tearDownAfterClass() throws Exception
+  {
+    jalview.gui.Desktop.instance.closeAll_actionPerformed(null);
+  }
+
+  @Test(groups ={ "Functional" })
+  public void testSingleSeqViewJMol()
+  {
+    Cache.setProperty(Preferences.STRUCTURE_DISPLAY, ViewerType.JMOL.name());
+    String inFile = "examples/1gaq.txt";
+    AlignFrame af = new jalview.io.FileLoader().LoadFileWaitTillLoaded(
+            inFile, FormatAdapter.FILE);
+    assertTrue("Didn't read input file " + inFile, af != null);
+    for (SequenceI sq : af.getViewport().getAlignment().getSequences())
+    {
+      SequenceI dsq = sq.getDatasetSequence();
+      while (dsq.getDatasetSequence() != null)
+      {
+        dsq = dsq.getDatasetSequence();
+      }
+      if (dsq.getAllPDBEntries() != null && dsq.getAllPDBEntries().size() > 0)
+      {
+        for (int q = 0; q < dsq.getAllPDBEntries().size(); q++)
+        {
+          final StructureViewer structureViewer = new StructureViewer(af
+                  .getViewport().getStructureSelectionManager());
+          structureViewer.setViewerType(ViewerType.JMOL);
+          JalviewStructureDisplayI jmolViewer = structureViewer
+                  .viewStructures(dsq.getAllPDBEntries().elementAt(q),
+                          new SequenceI[]
+                  { sq }, af.getCurrentView().getAlignPanel());
+          /*
+           * Wait for viewer load thread to complete
+           */
+          try
+          {
+            while (!jmolViewer.getBinding().isFinishedInit())
+            {
+              Thread.sleep(500);
+            }
+          } catch (InterruptedException e)
+          {
+          }
+
+          jmolViewer.closeViewer(true);
+          // todo: break here means only once through this loop?
+          break;
+        }
+        break;
+      }
+    }
+  }
+}
index b9cab9c..34e07f2 100644 (file)
@@ -16,6 +16,7 @@ import org.testng.annotations.AfterClass;
 import org.testng.annotations.BeforeClass;
 import org.testng.annotations.Test;
 
+@Test(singleThreaded = true)
 public class JalviewChimeraView
 {
 
@@ -26,7 +27,9 @@ public class JalviewChimeraView
   public static void setUpBeforeClass() throws Exception
   {
     jalview.bin.Jalview.main(new String[]
-    { "-noquestionnaire -nonews -props", "test/src/jalview/ext/rbvi/chimera/testProps.jvprops" });
+ {
+        "-noquestionnaire -nonews -props",
+        "test/jalview/ext/rbvi/chimera/testProps.jvprops" });
   }
 
   /**
@@ -39,54 +42,6 @@ public class JalviewChimeraView
   }
 
   @Test(groups ={ "Functional" })
-  public void testSingleSeqViewJMol()
-  {
-    Cache.setProperty(Preferences.STRUCTURE_DISPLAY, ViewerType.JMOL.name());
-    String inFile = "examples/1gaq.txt";
-    AlignFrame af = new jalview.io.FileLoader().LoadFileWaitTillLoaded(
-            inFile, FormatAdapter.FILE);
-    assertTrue("Didn't read input file " + inFile, af != null);
-    for (SequenceI sq : af.getViewport().getAlignment().getSequences())
-    {
-      SequenceI dsq = sq.getDatasetSequence();
-      while (dsq.getDatasetSequence() != null)
-      {
-        dsq = dsq.getDatasetSequence();
-      }
-      if (dsq.getAllPDBEntries() != null && dsq.getAllPDBEntries().size() > 0)
-      {
-        for (int q = 0; q < dsq.getAllPDBEntries().size(); q++)
-        {
-          final StructureViewer structureViewer = new StructureViewer(af
-                  .getViewport().getStructureSelectionManager());
-          structureViewer.setViewerType(ViewerType.JMOL);
-          JalviewStructureDisplayI jmolViewer = structureViewer
-                  .viewStructures(dsq.getAllPDBEntries().elementAt(q),
-                          new SequenceI[]
-                  { sq }, af.getCurrentView().getAlignPanel());
-          /*
-           * Wait for viewer load thread to complete
-           */
-          try
-          {
-            while (!jmolViewer.getBinding().isFinishedInit())
-            {
-              Thread.sleep(500);
-            }
-          } catch (InterruptedException e)
-          {
-          }
-
-          jmolViewer.closeViewer(true);
-          // todo: break here means only once through this loop?
-          break;
-        }
-        break;
-      }
-    }
-  }
-
-  @Test(groups ={ "Functional" })
   public void testSingleSeqViewChimera()
   {
     Cache.setProperty(Preferences.STRUCTURE_DISPLAY,
index 4c55386..0b5840c 100644 (file)
@@ -1,15 +1,26 @@
 package jalview.gui;
 
 import static org.testng.AssertJUnit.assertEquals;
+import static org.testng.AssertJUnit.assertFalse;
+import static org.testng.AssertJUnit.assertNotNull;
 import static org.testng.AssertJUnit.assertSame;
+import static org.testng.AssertJUnit.assertTrue;
 
+import jalview.datamodel.AlignedCodonFrame;
 import jalview.datamodel.Alignment;
 import jalview.datamodel.AlignmentI;
 import jalview.datamodel.PDBEntry;
 import jalview.datamodel.PDBEntry.Type;
 import jalview.datamodel.Sequence;
 import jalview.datamodel.SequenceI;
+import jalview.io.FileLoader;
+import jalview.io.FormatAdapter;
+import jalview.structure.StructureSelectionManager;
 
+import java.util.LinkedHashSet;
+import java.util.Set;
+
+import org.testng.annotations.BeforeClass;
 import org.testng.annotations.BeforeMethod;
 import org.testng.annotations.Test;
 
@@ -19,6 +30,13 @@ public class AlignViewportTest
   AlignmentI al;
   AlignViewport testee;
 
+  @BeforeClass(alwaysRun = true)
+  public static void setUpBeforeClass() throws Exception
+  {
+    jalview.bin.Jalview.main(new String[] { "-props",
+        "test/jalview/testProps.jvprops" });
+  }
+
  @BeforeMethod(alwaysRun = true)
   public void setUp()
   {
@@ -84,4 +102,155 @@ public class AlignViewportTest
     // no sequence refers to PDBEntry[2]
     assertEquals(0, seqs[2].length);
   }
+
+  /**
+   * Test that a mapping is not deregistered when a second view is closed but
+   * the first still holds a reference to the mapping
+   */
+  @Test(groups ={ "Functional" })
+  public void testDeregisterMapping_onCloseView()
+  {
+    /*
+     * alignment with reference to mappings
+     */
+    AlignFrame af1 = new FileLoader().LoadFileWaitTillLoaded(
+            ">Seq1\nCAGT\n", FormatAdapter.PASTE);
+  
+    AlignedCodonFrame acf1 = new AlignedCodonFrame();
+    AlignedCodonFrame acf2 = new AlignedCodonFrame();
+  
+    Set<AlignedCodonFrame> mappings = new LinkedHashSet<AlignedCodonFrame>();
+    mappings.add(acf1);
+    mappings.add(acf2);
+    af1.getViewport().getAlignment().setCodonFrames(mappings);
+    af1.newView_actionPerformed(null);
+  
+    /*
+     * Verify that creating the alignment for the new View has registered the
+     * mappings
+     */
+    StructureSelectionManager ssm = StructureSelectionManager
+            .getStructureSelectionManager(Desktop.instance);
+    assertEquals(2, ssm.seqmappings.size());
+    assertTrue(ssm.seqmappings.contains(acf1));
+    assertTrue(ssm.seqmappings.contains(acf2));
+  
+    /*
+     * Close the second view. Verify that mappings are not removed as the first
+     * view still holds a reference to them.
+     */
+    af1.closeMenuItem_actionPerformed(false);
+    assertEquals(2, ssm.seqmappings.size());
+    assertTrue(ssm.seqmappings.contains(acf1));
+    assertTrue(ssm.seqmappings.contains(acf2));
+  }
+
+  /**
+   * Test that a mapping is deregistered if no alignment holds a reference to it
+   */
+  @Test(groups ={ "Functional" })
+  public void testDeregisterMapping_withNoReference()
+  {
+    Desktop d = Desktop.instance;
+    assertNotNull(d);
+    StructureSelectionManager ssm = StructureSelectionManager
+            .getStructureSelectionManager(Desktop.instance);
+    ssm.resetAll();
+
+    AlignFrame af1 = new FileLoader().LoadFileWaitTillLoaded(
+            ">Seq1\nRSVQ\n", FormatAdapter.PASTE);
+    AlignFrame af2 = new FileLoader().LoadFileWaitTillLoaded(
+            ">Seq2\nDGEL\n", FormatAdapter.PASTE);
+  
+    AlignedCodonFrame acf1 = new AlignedCodonFrame();
+    AlignedCodonFrame acf2 = new AlignedCodonFrame();
+    AlignedCodonFrame acf3 = new AlignedCodonFrame();
+  
+    Set<AlignedCodonFrame> mappings1 = new LinkedHashSet<AlignedCodonFrame>();
+    mappings1.add(acf1);
+    af1.getViewport().getAlignment().setCodonFrames(mappings1);
+
+    Set<AlignedCodonFrame> mappings2 = new LinkedHashSet<AlignedCodonFrame>();
+    mappings2.add(acf2);
+    mappings2.add(acf3);
+    af2.getViewport().getAlignment().setCodonFrames(mappings2);
+  
+    /*
+     * AlignFrame1 has mapping acf1, AlignFrame2 has acf2 and acf3
+     */
+
+    Set<AlignedCodonFrame> ssmMappings = ssm.seqmappings;
+    assertEquals(0, ssmMappings.size());
+    ssm.registerMapping(acf1);
+    assertEquals(1, ssmMappings.size());
+    ssm.registerMapping(acf2);
+    assertEquals(2, ssmMappings.size());
+    ssm.registerMapping(acf3);
+    assertEquals(3, ssmMappings.size());
+
+    /*
+     * Closing AlignFrame2 should remove its mappings from
+     * StructureSelectionManager, since AlignFrame1 has no reference to them
+     */
+    af2.closeMenuItem_actionPerformed(true);
+    assertEquals(1, ssmMappings.size());
+    assertTrue(ssmMappings.contains(acf1));
+  }
+
+  /**
+   * Test that a mapping is not deregistered if another alignment holds a
+   * reference to it
+   */
+  @Test(groups ={ "Functional" })
+  public void testDeregisterMapping_withReference()
+  {
+    Desktop d = Desktop.instance;
+    assertNotNull(d);
+    StructureSelectionManager ssm = StructureSelectionManager
+            .getStructureSelectionManager(Desktop.instance);
+    ssm.resetAll();
+  
+    AlignFrame af1 = new FileLoader().LoadFileWaitTillLoaded(
+            ">Seq1\nRSVQ\n", FormatAdapter.PASTE);
+    AlignFrame af2 = new FileLoader().LoadFileWaitTillLoaded(
+            ">Seq2\nDGEL\n", FormatAdapter.PASTE);
+  
+    AlignedCodonFrame acf1 = new AlignedCodonFrame();
+    AlignedCodonFrame acf2 = new AlignedCodonFrame();
+    AlignedCodonFrame acf3 = new AlignedCodonFrame();
+  
+    Set<AlignedCodonFrame> mappings1 = new LinkedHashSet<AlignedCodonFrame>();
+    mappings1.add(acf1);
+    mappings1.add(acf2);
+    af1.getViewport().getAlignment().setCodonFrames(mappings1);
+  
+    Set<AlignedCodonFrame> mappings2 = new LinkedHashSet<AlignedCodonFrame>();
+    mappings2.add(acf2);
+    mappings2.add(acf3);
+    af2.getViewport().getAlignment().setCodonFrames(mappings2);
+  
+    /*
+     * AlignFrame1 has mappings acf1 and acf2, AlignFrame2 has acf2 and acf3
+     */
+  
+    Set<AlignedCodonFrame> ssmMappings = ssm.seqmappings;
+    assertEquals(0, ssmMappings.size());
+    ssm.registerMapping(acf1);
+    assertEquals(1, ssmMappings.size());
+    ssm.registerMapping(acf2);
+    assertEquals(2, ssmMappings.size());
+    ssm.registerMapping(acf3);
+    assertEquals(3, ssmMappings.size());
+  
+    /*
+     * Closing AlignFrame2 should remove mapping acf3 from
+     * StructureSelectionManager, but not acf2, since AlignFrame1 still has a
+     * reference to it
+     */
+    af2.closeMenuItem_actionPerformed(true);
+    assertEquals(2, ssmMappings.size());
+    assertTrue(ssmMappings.contains(acf1));
+    assertTrue(ssmMappings.contains(acf2));
+    assertFalse(ssmMappings.contains(acf3));
+  }
 }
index 46397d3..daeb83f 100644 (file)
@@ -130,7 +130,7 @@ public class PopupMenuTest
 
     testee.configureReferenceAnnotationsMenu(menu, seqs);
     assertTrue(menu.isEnabled());
-    String expected = "<html><table width=350 border=0><tr><td align=justify>Add annotations for<br/>JMOL/secondary structure<br/>PBD/Temp</td></tr></table></html>";
+    String expected = "<html><style> p.ttip {width: 350; text-align: justify; word-wrap: break-word;}</style><p class=\"ttip\">Add annotations for<br/>JMOL/secondary structure<br/>PBD/Temp</p></html>";
     assertEquals(expected, menu.getToolTipText());
   }
 
@@ -151,7 +151,7 @@ public class PopupMenuTest
 
     testee.configureReferenceAnnotationsMenu(menu, seqs);
     assertTrue(menu.isEnabled());
-    String expected = "<html><table width=350 border=0><tr><td align=justify>Add annotations for<br/>JMOL/secondary structure<br/>PBD/Temp</td></tr></table></html>";
+    String expected = "<html><style> p.ttip {width: 350; text-align: justify; word-wrap: break-word;}</style><p class=\"ttip\">Add annotations for<br/>JMOL/secondary structure<br/>PBD/Temp</p></html>";
     assertEquals(expected, menu.getToolTipText());
   }
 
index 150ee59..b4a8bf6 100644 (file)
@@ -99,9 +99,9 @@ public class AnnotatedPDBFileInputTest
     SequenceFeature[] sf = al.getSequenceAt(0).getSequenceFeatures();
     assertEquals(296, sf.length);
     assertEquals("RESNUM", sf[0].getType());
-    assertEquals("GLU:19 1gaqA", sf[0].getDescription());
+    assertEquals("GLU:  19  1gaqA", sf[0].getDescription());
     assertEquals("RESNUM", sf[295].getType());
-    assertEquals("TYR:314 1gaqA", sf[295].getDescription());
+    assertEquals("TYR: 314  1gaqA", sf[295].getDescription());
 
     /*
      * 1GAQ/B
@@ -109,9 +109,9 @@ public class AnnotatedPDBFileInputTest
     sf = al.getSequenceAt(1).getSequenceFeatures();
     assertEquals(98, sf.length);
     assertEquals("RESNUM", sf[0].getType());
-    assertEquals("ALA:1 1gaqB", sf[0].getDescription());
+    assertEquals("ALA:   1  1gaqB", sf[0].getDescription());
     assertEquals("RESNUM", sf[97].getType());
-    assertEquals("ALA:98 1gaqB", sf[97].getDescription());
+    assertEquals("ALA:  98  1gaqB", sf[97].getDescription());
 
     /*
      * 1GAQ/C
@@ -119,9 +119,9 @@ public class AnnotatedPDBFileInputTest
     sf = al.getSequenceAt(2).getSequenceFeatures();
     assertEquals(296, sf.length);
     assertEquals("RESNUM", sf[0].getType());
-    assertEquals("GLU:19 1gaqC", sf[0].getDescription());
+    assertEquals("GLU:  19  1gaqC", sf[0].getDescription());
     assertEquals("RESNUM", sf[295].getType());
-    assertEquals("TYR:314 1gaqC", sf[295].getDescription());
+    assertEquals("TYR: 314  1gaqC", sf[295].getDescription());
   }
 
   @Test(groups ={ "Functional" })
@@ -160,7 +160,8 @@ public class AnnotatedPDBFileInputTest
   public static void setUpBeforeClass() throws Exception
   {
     jalview.bin.Jalview.main(new String[]
-    { "-props", "test/src/jalview/io/testProps.jvprops" });
+ { "-props",
+        "test/jalview/io/testProps.jvprops" });
   }
 
   /**
index 0162308..e4cc336 100644 (file)
@@ -22,42 +22,31 @@ public class StructureSelectionManagerTest
   }
 
   @Test(groups ={ "Functional" })
-  public void testAddMapping()
+  public void testRegisterMapping()
   {
     AlignedCodonFrame acf1 = new AlignedCodonFrame();
     AlignedCodonFrame acf2 = new AlignedCodonFrame();
 
-    /*
-     * One mapping only.
-     */
-    ssm.addMapping(acf1);
+    ssm.registerMapping(acf1);
     assertEquals(1, ssm.seqmappings.size());
     assertTrue(ssm.seqmappings.contains(acf1));
-    assertEquals(1, ssm.getMappingReferenceCount(acf1));
 
-    /*
-     * A second mapping.
-     */
-    ssm.addMapping(acf2);
+    ssm.registerMapping(acf2);
     assertEquals(2, ssm.seqmappings.size());
     assertTrue(ssm.seqmappings.contains(acf1));
     assertTrue(ssm.seqmappings.contains(acf2));
-    assertEquals(1, ssm.getMappingReferenceCount(acf1));
-    assertEquals(1, ssm.getMappingReferenceCount(acf2));
 
     /*
-     * A second reference to the first mapping.
+     * Re-adding the first mapping does nothing
      */
-    ssm.addMapping(acf1);
+    ssm.registerMapping(acf1);
     assertEquals(2, ssm.seqmappings.size());
     assertTrue(ssm.seqmappings.contains(acf1));
     assertTrue(ssm.seqmappings.contains(acf2));
-    assertEquals(2, ssm.getMappingReferenceCount(acf1));
-    assertEquals(1, ssm.getMappingReferenceCount(acf2));
   }
 
   @Test(groups ={ "Functional" })
-  public void testAddMappings()
+  public void testRegisterMappings()
   {
     AlignedCodonFrame acf1 = new AlignedCodonFrame();
     AlignedCodonFrame acf2 = new AlignedCodonFrame();
@@ -71,101 +60,16 @@ public class StructureSelectionManagerTest
     set2.add(acf3);
 
     /*
-     * Adding both sets adds acf2 twice and acf1 and acf3 once each.
+     * Add both sets twice; each mapping should be added once only
      */
-    ssm.addMappings(set1);
-    ssm.addMappings(set2);
+    ssm.registerMappings(set1);
+    ssm.registerMappings(set1);
+    ssm.registerMappings(set2);
+    ssm.registerMappings(set2);
 
     assertEquals(3, ssm.seqmappings.size());
     assertTrue(ssm.seqmappings.contains(acf1));
     assertTrue(ssm.seqmappings.contains(acf2));
     assertTrue(ssm.seqmappings.contains(acf3));
-    assertEquals(1, ssm.getMappingReferenceCount(acf1));
-    assertEquals(2, ssm.getMappingReferenceCount(acf2));
-    assertEquals(1, ssm.getMappingReferenceCount(acf3));
-  }
-
-  @Test(groups ={ "Functional" })
-  public void testRemoveMapping()
-  {
-    AlignedCodonFrame acf1 = new AlignedCodonFrame();
-    AlignedCodonFrame acf2 = new AlignedCodonFrame();
-
-    /*
-     * Add one and remove it.
-     */
-    ssm.addMapping(acf1);
-    ssm.removeMapping(acf1);
-    ssm.removeMapping(acf2);
-    assertEquals(0, ssm.seqmappings.size());
-    assertEquals(0, ssm.getMappingReferenceCount(acf1));
-    assertEquals(0, ssm.getMappingReferenceCount(acf2));
-
-    /*
-     * Add one twice and remove it once.
-     */
-    ssm.addMapping(acf1);
-    ssm.addMapping(acf2);
-    ssm.addMapping(acf1);
-    ssm.removeMapping(acf1);
-    assertEquals(2, ssm.seqmappings.size());
-    assertTrue(ssm.seqmappings.contains(acf1));
-    assertTrue(ssm.seqmappings.contains(acf2));
-    assertEquals(1, ssm.getMappingReferenceCount(acf1));
-    assertEquals(1, ssm.getMappingReferenceCount(acf2));
-
-    /*
-     * Remove both once more to clear the set.
-     */
-    ssm.removeMapping(acf1);
-    ssm.removeMapping(acf2);
-    assertEquals(0, ssm.seqmappings.size());
-    assertEquals(0, ssm.getMappingReferenceCount(acf1));
-    assertEquals(0, ssm.getMappingReferenceCount(acf2));
-  }
-
-  @Test(groups ={ "Functional" })
-  public void testRemoveMappings()
-  {
-    AlignedCodonFrame acf1 = new AlignedCodonFrame();
-    AlignedCodonFrame acf2 = new AlignedCodonFrame();
-    AlignedCodonFrame acf3 = new AlignedCodonFrame();
-
-    /*
-     * Initial ref counts are 3/2/1:
-     */
-    ssm.addMapping(acf1);
-    ssm.addMapping(acf1);
-    ssm.addMapping(acf1);
-    ssm.addMapping(acf2);
-    ssm.addMapping(acf2);
-    ssm.addMapping(acf3);
-
-    Set<AlignedCodonFrame> set1 = new HashSet<AlignedCodonFrame>();
-    set1.add(acf1);
-    set1.add(acf2);
-    Set<AlignedCodonFrame> set2 = new HashSet<AlignedCodonFrame>();
-    set2.add(acf2);
-    set2.add(acf3);
-
-    /*
-     * Remove one ref each to acf1, acf2, counts are now 2/1/1:
-     */
-    ssm.removeMappings(set1);
-    assertEquals(3, ssm.seqmappings.size());
-    assertTrue(ssm.seqmappings.contains(acf1));
-    assertTrue(ssm.seqmappings.contains(acf2));
-    assertTrue(ssm.seqmappings.contains(acf3));
-    assertEquals(2, ssm.getMappingReferenceCount(acf1));
-    assertEquals(1, ssm.getMappingReferenceCount(acf2));
-    assertEquals(1, ssm.getMappingReferenceCount(acf3));
-
-    /*
-     * Remove one ref each to acf2, acf3 - they are removed
-     */
-    ssm.removeMappings(set2);
-    assertEquals(1, ssm.seqmappings.size());
-    assertTrue(ssm.seqmappings.contains(acf1));
-    assertEquals(2, ssm.getMappingReferenceCount(acf1));
   }
 }
index 86439fc..adf53f5 100644 (file)
@@ -49,6 +49,14 @@ public class PDBSequenceFetcherTest
     sf = new SequenceFetcher(false);
   }
 
+  /**
+   * Test that RNA structure can be added by a call to the RNAML service.
+   * 
+   * Note this test depends on http://arn-ibmc.in2p3.fr/api/compute/2d which is
+   * not always reliable.
+   * 
+   * @throws Exception
+   */
   @Test(groups =
   { "Network" }, enabled = true)
   public void testRnaSeqRetrieve() throws Exception
@@ -62,7 +70,9 @@ public class PDBSequenceFetcherTest
       assertTrue("No annotation transfered to sequence.",
               sq.getAnnotation().length > 0);
       assertTrue("No PDBEntry on sequence.", sq.getAllPDBEntries().size() > 0);
-      assertTrue("No RNA annotation on sequence.", sq.getRNA() != null);
+      assertTrue(
+              "No RNA annotation on sequence, possibly http://arn-ibmc.in2p3.fr/api/compute/2d not available?",
+              sq.getRNA() != null);
     }
   }
 
index 0c96c48..7525acb 100644 (file)
@@ -19,7 +19,7 @@ public class RestClientTest
     /*
      * Load test properties file (readonly) so as not to overwrite the real one
      */
-    Cache.loadProperties("test/src/jalview/io/testProps.jvprops");
+    Cache.loadProperties("test/jalview/io/testProps.jvprops");
 
     RestClient[] clients = RestClient.getRestClients();
     System.out.println("Got " + clients.length + " clients.");
index 14b372f..256744f 100755 (executable)
@@ -2342,6 +2342,474 @@ and any path to a file to save to the file]]></string>
                                                        </property>
                                                </object>
                                        </method>
+                                       <method name="addElement">
+                                               <object class="com.zerog.ia.installer.actions.InstallZipfile" objectID="10936efeefab93">
+                                                       <property name="belongsToUninstallPhase">
+                                                               <boolean>false</boolean>
+                                                       </property>
+                                                       <property name="rollbackEnabledCancel">
+                                                               <boolean>true</boolean>
+                                                       </property>
+                                                       <property name="rollbackEnabledError">
+                                                               <boolean>true</boolean>
+                                                       </property>
+                                                       <property name="ruleExpression">
+                                                               <string><![CDATA[]]></string>
+                                                       </property>
+                                                       <property name="unixPermissions">
+                                                               <string><![CDATA[664]]></string>
+                                                       </property>
+                                                       <property name="sourceName">
+                                                               <string><![CDATA[jersey-client-1.19.jar]]></string>
+                                                       </property>
+                                                       <property name="overrideUnixPermissions">
+                                                               <boolean>false</boolean>
+                                                       </property>
+                                                       <property name="sourcePath">
+                                                               <string><![CDATA[/home/cruisecontrol/jalview/lib/]]></string>
+                                                       </property>
+                                                       <property name="shouldUninstall">
+                                                               <boolean>true</boolean>
+                                                       </property>
+                                                       <property name="rollbackEnabledCancel">
+                                                               <boolean>true</boolean>
+                                                       </property>
+                                                       <property name="rollbackEnabledError">
+                                                               <boolean>true</boolean>
+                                                       </property>
+                                                       <property name="destinationName">
+                                                               <string><![CDATA[jersey-client-1.19.jar]]></string>
+                                                       </property>
+                                                       <property name="fileSize">
+                                                               <long>134021</long>
+                                                       </property>
+                                                       <property name="macBinary">
+                                                               <boolean>false</boolean>
+                                                       </property>
+                                                       <property name="targetCheckKind">
+                                                               <int>0</int>
+                                                       </property>
+                                                       <property name="ruleExpression">
+                                                               <string><![CDATA[]]></string>
+                                                       </property>
+                                               </object>
+                                       </method>
+                                       <method name="addElement">
+                                               <object class="com.zerog.ia.installer.actions.InstallZipfile" objectID="11936efeefab93">
+                                                       <property name="belongsToUninstallPhase">
+                                                               <boolean>false</boolean>
+                                                       </property>
+                                                       <property name="rollbackEnabledCancel">
+                                                               <boolean>true</boolean>
+                                                       </property>
+                                                       <property name="rollbackEnabledError">
+                                                               <boolean>true</boolean>
+                                                       </property>
+                                                       <property name="ruleExpression">
+                                                               <string><![CDATA[]]></string>
+                                                       </property>
+                                                       <property name="unixPermissions">
+                                                               <string><![CDATA[664]]></string>
+                                                       </property>
+                                                       <property name="sourceName">
+                                                               <string><![CDATA[jersey-core-1.19.jar]]></string>
+                                                       </property>
+                                                       <property name="overrideUnixPermissions">
+                                                               <boolean>false</boolean>
+                                                       </property>
+                                                       <property name="sourcePath">
+                                                               <string><![CDATA[/home/cruisecontrol/jalview/lib/]]></string>
+                                                       </property>
+                                                       <property name="shouldUninstall">
+                                                               <boolean>true</boolean>
+                                                       </property>
+                                                       <property name="rollbackEnabledCancel">
+                                                               <boolean>true</boolean>
+                                                       </property>
+                                                       <property name="rollbackEnabledError">
+                                                               <boolean>true</boolean>
+                                                       </property>
+                                                       <property name="destinationName">
+                                                               <string><![CDATA[jersey-core-1.19.jar]]></string>
+                                                       </property>
+                                                       <property name="fileSize">
+                                                               <long>436689</long>
+                                                       </property>
+                                                       <property name="macBinary">
+                                                               <boolean>false</boolean>
+                                                       </property>
+                                                       <property name="targetCheckKind">
+                                                               <int>0</int>
+                                                       </property>
+                                                       <property name="ruleExpression">
+                                                               <string><![CDATA[]]></string>
+                                                       </property>
+                                               </object>
+                                       </method>
+                                       <method name="addElement">
+                                               <object class="com.zerog.ia.installer.actions.InstallZipfile" objectID="12936efeefab93">
+                                                       <property name="belongsToUninstallPhase">
+                                                               <boolean>false</boolean>
+                                                       </property>
+                                                       <property name="rollbackEnabledCancel">
+                                                               <boolean>true</boolean>
+                                                       </property>
+                                                       <property name="rollbackEnabledError">
+                                                               <boolean>true</boolean>
+                                                       </property>
+                                                       <property name="ruleExpression">
+                                                               <string><![CDATA[]]></string>
+                                                       </property>
+                                                       <property name="unixPermissions">
+                                                               <string><![CDATA[664]]></string>
+                                                       </property>
+                                                       <property name="sourceName">
+                                                               <string><![CDATA[jersey-json-1.19.jar]]></string>
+                                                       </property>
+                                                       <property name="overrideUnixPermissions">
+                                                               <boolean>false</boolean>
+                                                       </property>
+                                                       <property name="sourcePath">
+                                                               <string><![CDATA[/home/cruisecontrol/jalview/lib/]]></string>
+                                                       </property>
+                                                       <property name="shouldUninstall">
+                                                               <boolean>true</boolean>
+                                                       </property>
+                                                       <property name="rollbackEnabledCancel">
+                                                               <boolean>true</boolean>
+                                                       </property>
+                                                       <property name="rollbackEnabledError">
+                                                               <boolean>true</boolean>
+                                                       </property>
+                                                       <property name="destinationName">
+                                                               <string><![CDATA[jersey-json-1.19.jar]]></string>
+                                                       </property>
+                                                       <property name="fileSize">
+                                                               <long>165345</long>
+                                                       </property>
+                                                       <property name="macBinary">
+                                                               <boolean>false</boolean>
+                                                       </property>
+                                                       <property name="targetCheckKind">
+                                                               <int>0</int>
+                                                       </property>
+                                                       <property name="ruleExpression">
+                                                               <string><![CDATA[]]></string>
+                                                       </property>
+                                               </object>
+                                       </method>                                       
+                                       <method name="addElement">
+                                               <object class="com.zerog.ia.installer.actions.InstallZipfile" objectID="13936efeefab93">
+                                                       <property name="belongsToUninstallPhase">
+                                                               <boolean>false</boolean>
+                                                       </property>
+                                                       <property name="rollbackEnabledCancel">
+                                                               <boolean>true</boolean>
+                                                       </property>
+                                                       <property name="rollbackEnabledError">
+                                                               <boolean>true</boolean>
+                                                       </property>
+                                                       <property name="ruleExpression">
+                                                               <string><![CDATA[]]></string>
+                                                       </property>
+                                                       <property name="unixPermissions">
+                                                               <string><![CDATA[664]]></string>
+                                                       </property>
+                                                       <property name="sourceName">
+                                                               <string><![CDATA[java-json.jar]]></string>
+                                                       </property>
+                                                       <property name="overrideUnixPermissions">
+                                                               <boolean>false</boolean>
+                                                       </property>
+                                                       <property name="sourcePath">
+                                                               <string><![CDATA[/home/cruisecontrol/jalview/lib/]]></string>
+                                                       </property>
+                                                       <property name="shouldUninstall">
+                                                               <boolean>true</boolean>
+                                                       </property>
+                                                       <property name="rollbackEnabledCancel">
+                                                               <boolean>true</boolean>
+                                                       </property>
+                                                       <property name="rollbackEnabledError">
+                                                               <boolean>true</boolean>
+                                                       </property>
+                                                       <property name="destinationName">
+                                                               <string><![CDATA[java-json.jar]]></string>
+                                                       </property>
+                                                       <property name="fileSize">
+                                                               <long>84697</long>
+                                                       </property>
+                                                       <property name="macBinary">
+                                                               <boolean>false</boolean>
+                                                       </property>
+                                                       <property name="targetCheckKind">
+                                                               <int>0</int>
+                                                       </property>
+                                                       <property name="ruleExpression">
+                                                               <string><![CDATA[]]></string>
+                                                       </property>
+                                               </object>
+                                       </method>
+                                       <method name="addElement">
+                                               <object class="com.zerog.ia.installer.actions.InstallZipfile" objectID="14936efeefab93">
+                                                       <property name="belongsToUninstallPhase">
+                                                               <boolean>false</boolean>
+                                                       </property>
+                                                       <property name="rollbackEnabledCancel">
+                                                               <boolean>true</boolean>
+                                                       </property>
+                                                       <property name="rollbackEnabledError">
+                                                               <boolean>true</boolean>
+                                                       </property>
+                                                       <property name="ruleExpression">
+                                                               <string><![CDATA[]]></string>
+                                                       </property>
+                                                       <property name="unixPermissions">
+                                                               <string><![CDATA[664]]></string>
+                                                       </property>
+                                                       <property name="sourceName">
+                                                               <string><![CDATA[jsr311-api-1.1.1.jar]]></string>
+                                                       </property>
+                                                       <property name="overrideUnixPermissions">
+                                                               <boolean>false</boolean>
+                                                       </property>
+                                                       <property name="sourcePath">
+                                                               <string><![CDATA[/home/cruisecontrol/jalview/lib/]]></string>
+                                                       </property>
+                                                       <property name="shouldUninstall">
+                                                               <boolean>true</boolean>
+                                                       </property>
+                                                       <property name="rollbackEnabledCancel">
+                                                               <boolean>true</boolean>
+                                                       </property>
+                                                       <property name="rollbackEnabledError">
+                                                               <boolean>true</boolean>
+                                                       </property>
+                                                       <property name="destinationName">
+                                                               <string><![CDATA[jsr311-api-1.1.1.jar]]></string>
+                                                       </property>
+                                                       <property name="fileSize">
+                                                               <long>46367</long>
+                                                       </property>
+                                                       <property name="macBinary">
+                                                               <boolean>false</boolean>
+                                                       </property>
+                                                       <property name="targetCheckKind">
+                                                               <int>0</int>
+                                                       </property>
+                                                       <property name="ruleExpression">
+                                                               <string><![CDATA[]]></string>
+                                                       </property>
+                                               </object>
+                                       </method>
+                                       <method name="addElement">
+                                               <object class="com.zerog.ia.installer.actions.InstallZipfile" objectID="15936efeefab93">
+                                                       <property name="belongsToUninstallPhase">
+                                                               <boolean>false</boolean>
+                                                       </property>
+                                                       <property name="rollbackEnabledCancel">
+                                                               <boolean>true</boolean>
+                                                       </property>
+                                                       <property name="rollbackEnabledError">
+                                                               <boolean>true</boolean>
+                                                       </property>
+                                                       <property name="ruleExpression">
+                                                               <string><![CDATA[]]></string>
+                                                       </property>
+                                                       <property name="unixPermissions">
+                                                               <string><![CDATA[664]]></string>
+                                                       </property>
+                                                       <property name="sourceName">
+                                                               <string><![CDATA[jetty-http-9.2.10.v20150310.jar]]></string>
+                                                       </property>
+                                                       <property name="overrideUnixPermissions">
+                                                               <boolean>false</boolean>
+                                                       </property>
+                                                       <property name="sourcePath">
+                                                               <string><![CDATA[/home/cruisecontrol/jalview/lib/]]></string>
+                                                       </property>
+                                                       <property name="shouldUninstall">
+                                                               <boolean>true</boolean>
+                                                       </property>
+                                                       <property name="rollbackEnabledCancel">
+                                                               <boolean>true</boolean>
+                                                       </property>
+                                                       <property name="rollbackEnabledError">
+                                                               <boolean>true</boolean>
+                                                       </property>
+                                                       <property name="destinationName">
+                                                               <string><![CDATA[jetty-http-9.2.10.v20150310.jar]]></string>
+                                                       </property>
+                                                       <property name="fileSize">
+                                                               <long>105748</long>
+                                                       </property>
+                                                       <property name="macBinary">
+                                                               <boolean>false</boolean>
+                                                       </property>
+                                                       <property name="targetCheckKind">
+                                                               <int>0</int>
+                                                       </property>
+                                                       <property name="ruleExpression">
+                                                               <string><![CDATA[]]></string>
+                                                       </property>
+                                               </object>
+                                       </method>
+                                       <method name="addElement">
+                                               <object class="com.zerog.ia.installer.actions.InstallZipfile" objectID="16936efeefab93">
+                                                       <property name="belongsToUninstallPhase">
+                                                               <boolean>false</boolean>
+                                                       </property>
+                                                       <property name="rollbackEnabledCancel">
+                                                               <boolean>true</boolean>
+                                                       </property>
+                                                       <property name="rollbackEnabledError">
+                                                               <boolean>true</boolean>
+                                                       </property>
+                                                       <property name="ruleExpression">
+                                                               <string><![CDATA[]]></string>
+                                                       </property>
+                                                       <property name="unixPermissions">
+                                                               <string><![CDATA[664]]></string>
+                                                       </property>
+                                                       <property name="sourceName">
+                                                               <string><![CDATA[jetty-io-9.2.10.v20150310.jar]]></string>
+                                                       </property>
+                                                       <property name="overrideUnixPermissions">
+                                                               <boolean>false</boolean>
+                                                       </property>
+                                                       <property name="sourcePath">
+                                                               <string><![CDATA[/home/cruisecontrol/jalview/lib/]]></string>
+                                                       </property>
+                                                       <property name="shouldUninstall">
+                                                               <boolean>true</boolean>
+                                                       </property>
+                                                       <property name="rollbackEnabledCancel">
+                                                               <boolean>true</boolean>
+                                                       </property>
+                                                       <property name="rollbackEnabledError">
+                                                               <boolean>true</boolean>
+                                                       </property>
+                                                       <property name="destinationName">
+                                                               <string><![CDATA[jetty-io-9.2.10.v20150310.jar]]></string>
+                                                       </property>
+                                                       <property name="fileSize">
+                                                               <long>108132</long>
+                                                       </property>
+                                                       <property name="macBinary">
+                                                               <boolean>false</boolean>
+                                                       </property>
+                                                       <property name="targetCheckKind">
+                                                               <int>0</int>
+                                                       </property>
+                                                       <property name="ruleExpression">
+                                                               <string><![CDATA[]]></string>
+                                                       </property>
+                                               </object>
+                                       </method>
+                                       <method name="addElement">
+                                               <object class="com.zerog.ia.installer.actions.InstallZipfile" objectID="17936efeefab93">
+                                                       <property name="belongsToUninstallPhase">
+                                                               <boolean>false</boolean>
+                                                       </property>
+                                                       <property name="rollbackEnabledCancel">
+                                                               <boolean>true</boolean>
+                                                       </property>
+                                                       <property name="rollbackEnabledError">
+                                                               <boolean>true</boolean>
+                                                       </property>
+                                                       <property name="ruleExpression">
+                                                               <string><![CDATA[]]></string>
+                                                       </property>
+                                                       <property name="unixPermissions">
+                                                               <string><![CDATA[664]]></string>
+                                                       </property>
+                                                       <property name="sourceName">
+                                                               <string><![CDATA[jetty-server-9.2.10.v20150310.jar]]></string>
+                                                       </property>
+                                                       <property name="overrideUnixPermissions">
+                                                               <boolean>false</boolean>
+                                                       </property>
+                                                       <property name="sourcePath">
+                                                               <string><![CDATA[/home/cruisecontrol/jalview/lib/]]></string>
+                                                       </property>
+                                                       <property name="shouldUninstall">
+                                                               <boolean>true</boolean>
+                                                       </property>
+                                                       <property name="rollbackEnabledCancel">
+                                                               <boolean>true</boolean>
+                                                       </property>
+                                                       <property name="rollbackEnabledError">
+                                                               <boolean>true</boolean>
+                                                       </property>
+                                                       <property name="destinationName">
+                                                               <string><![CDATA[jetty-server-9.2.10.v20150310.jar]]></string>
+                                                       </property>
+                                                       <property name="fileSize">
+                                                               <long>418917</long>
+                                                       </property>
+                                                       <property name="macBinary">
+                                                               <boolean>false</boolean>
+                                                       </property>
+                                                       <property name="targetCheckKind">
+                                                               <int>0</int>
+                                                       </property>
+                                                       <property name="ruleExpression">
+                                                               <string><![CDATA[]]></string>
+                                                       </property>
+                                               </object>
+                                       </method>
+                                       <method name="addElement">
+                                               <object class="com.zerog.ia.installer.actions.InstallZipfile" objectID="18936efeefab93">
+                                                       <property name="belongsToUninstallPhase">
+                                                               <boolean>false</boolean>
+                                                       </property>
+                                                       <property name="rollbackEnabledCancel">
+                                                               <boolean>true</boolean>
+                                                       </property>
+                                                       <property name="rollbackEnabledError">
+                                                               <boolean>true</boolean>
+                                                       </property>
+                                                       <property name="ruleExpression">
+                                                               <string><![CDATA[]]></string>
+                                                       </property>
+                                                       <property name="unixPermissions">
+                                                               <string><![CDATA[664]]></string>
+                                                       </property>
+                                                       <property name="sourceName">
+                                                               <string><![CDATA[jetty-util-9.2.10.v20150310.jar]]></string>
+                                                       </property>
+                                                       <property name="overrideUnixPermissions">
+                                                               <boolean>false</boolean>
+                                                       </property>
+                                                       <property name="sourcePath">
+                                                               <string><![CDATA[/home/cruisecontrol/jalview/lib/]]></string>
+                                                       </property>
+                                                       <property name="shouldUninstall">
+                                                               <boolean>true</boolean>
+                                                       </property>
+                                                       <property name="rollbackEnabledCancel">
+                                                               <boolean>true</boolean>
+                                                       </property>
+                                                       <property name="rollbackEnabledError">
+                                                               <boolean>true</boolean>
+                                                       </property>
+                                                       <property name="destinationName">
+                                                               <string><![CDATA[jetty-util-9.2.10.v20150310.jar]]></string>
+                                                       </property>
+                                                       <property name="fileSize">
+                                                               <long>356253</long>
+                                                       </property>
+                                                       <property name="macBinary">
+                                                               <boolean>false</boolean>
+                                                       </property>
+                                                       <property name="targetCheckKind">
+                                                               <int>0</int>
+                                                       </property>
+                                                       <property name="ruleExpression">
+                                                               <string><![CDATA[]]></string>
+                                                       </property>
+                                               </object>
+                                       </method>
                                </object>
                        </property>
                        <property name="rulesFailedMessage">
@@ -6726,7 +7194,15 @@ and any path to a file to read from that file]]></string>
                                                                                <object refID="841f46efeefab93"/>
                                                                                <object refID="9a1f46efeefab93"/>
                                                                                <object refID="1936efeefab93"/>
-                                                                               
+                                                                               <object refID="10936efeefab93"/>
+                                                                               <object refID="11936efeefab93"/>
+                                                                               <object refID="12936efeefab93"/>
+                                                                               <object refID="13936efeefab93"/>
+                                                                               <object refID="14936efeefab93"/>
+                                                                               <object refID="15936efeefab93"/>
+                                                                               <object refID="16936efeefab93"/>
+                                                                               <object refID="17936efeefab93"/>
+                                                                               <object refID="18936efeefab93"/>
                                                                                <object class="com.zerog.ia.installer.actions.InstallFile" objectID="f44fc5b2aba1">
                                                                                        <property name="belongsToUninstallPhase">
                                                                                                <boolean>false</boolean>
@@ -7305,6 +7781,15 @@ and any path to a file to read from that file]]></string>
                                                                                                <object refID="1f46cffffab93"/>
                                                                                                <object refID="1f46efeefab93"/>
                                                                                                <object refID="1936efeefab93"/>
+                                                                                               <object refID="10936efeefab93"/>
+                                                                                               <object refID="11936efeefab93"/>
+                                                                                               <object refID="12936efeefab93"/>
+                                                                                               <object refID="13936efeefab93"/>
+                                                                                               <object refID="14936efeefab93"/>
+                                                                                               <object refID="15936efeefab93"/>
+                                                                                               <object refID="16936efeefab93"/>
+                                                                                               <object refID="17936efeefab93"/>
+                                                                                               <object refID="18936efeefab93"/>
                                                                                        </visualChildren>
                                                                                </object>
                                                                                <object class="com.zerog.ia.installer.actions.InstallDirectory" objectID="f44fc5d5aba1">