Merge branch 'develop' into features/JAL-3010ontologyFeatureSettings features/JAL-3010ontologyFeatureSettings
authorgmungoc <g.m.carstairs@dundee.ac.uk>
Fri, 12 Jul 2019 13:38:34 +0000 (14:38 +0100)
committergmungoc <g.m.carstairs@dundee.ac.uk>
Fri, 12 Jul 2019 13:38:34 +0000 (14:38 +0100)
Conflicts:
test/jalview/gui/AlignFrameTest.java

1  2 
resources/lang/Messages.properties
resources/lang/Messages_es.properties
src/jalview/gui/AlignFrame.java
src/jalview/gui/CrossRefAction.java
src/jalview/io/gff/SequenceOntologyLite.java
test/jalview/gui/AlignFrameTest.java

Simple merge
Simple merge
Simple merge
Simple merge
@@@ -144,92 -189,14 +190,45 @@@ public class AlignFrameTes
              .getHiddenColumns().iterator();
      assertEquals(alignFrame.getViewport().getAlignment().getHiddenColumns()
              .getNumberOfRegions(), 2);
 -    next = regions.next();
 -    assertEquals(next[0], 1);
 -    assertEquals(next[1], 3);
 -    next = regions.next();
 -    assertEquals(next[0], 6);
 -    assertEquals(next[1], 8);
 +    assertEquals(regions.next(), new int[] { 4, 6 });
 +    assertEquals(regions.next(), new int[] { 10, 12 });
 +    assertFalse(regions.hasNext());
 +    
 +    /*
 +     * hiding a contact feature should only hide start and end positions,
 +     * not the intermediate columns
 +     */
 +    String DISULFIDE = "Disulfide Bond";
 +    seq1.addSequenceFeature(
 +            new SequenceFeature(DISULFIDE, "", 1, 5, 0f, null));
 +    alignFrame.getViewport().showAllHiddenColumns();
 +    assertTrue(alignFrame.hideFeatureColumns(true, DISULFIDE));
 +    regions = alignFrame.getViewport().getAlignment().getHiddenColumns()
 +            .iterator();
 +    assertEquals(alignFrame.getViewport().getAlignment().getHiddenColumns()
 +            .getNumberOfRegions(), 2);
 +    assertEquals(regions.next(), new int[] { 0, 0 });
 +    assertEquals(regions.next(), new int[] { 7, 7 });
 +    assertFalse(regions.hasNext());
 +
 +    /*
 +     * hide multiple feature types:
 +     * TURN columns hides 4-6, 10-12
 +     * DISULFIDE columns hides 0, 7
 +     * combined is { 0-0, 4-7, 10-12 }
 +     */
 +    alignFrame.getViewport().showAllHiddenColumns();
 +    assertTrue(alignFrame.hideFeatureColumns(true, TURN, DISULFIDE));
 +    regions = alignFrame.getViewport().getAlignment().getHiddenColumns()
 +            .iterator();
 +    assertEquals(alignFrame.getViewport().getAlignment().getHiddenColumns()
 +            .getNumberOfRegions(), 3);
 +    assertEquals(regions.next(), new int[] { 0, 0 });
 +    assertEquals(regions.next(), new int[] { 4, 7 });
 +    assertEquals(regions.next(), new int[] { 10, 12 });
 +    assertFalse(regions.hasNext());
    }
  
-   @BeforeClass(alwaysRun = true)
-   public static void setUpBeforeClass() throws Exception
-   {
-     /*
-      * use read-only test properties file
-      */
-     Jalview.main(
-             new String[]
-             { "-nonews", "-props", "test/jalview/io/testProps.jvprops" });
-   }
-   @AfterMethod(alwaysRun = true)
-   public void tearDown()
-   {
-     Desktop.instance.closeAll_actionPerformed(null);
-   }
-   /**
-    * configure (read-only) properties for test to ensure Consensus is computed
-    * for colour Above PID testing
-    */
-   @BeforeMethod(alwaysRun = true)
-   public void setUp()
-   {
-     Cache.loadProperties("test/jalview/io/testProps.jvprops");
-     Cache.applicationProperties.setProperty("SHOW_IDENTITY",
-             Boolean.TRUE.toString());
-     af = new FileLoader().LoadFileWaitTillLoaded("examples/uniref50.fa",
-             DataSourceType.FILE);
-     /*
-      * wait for Consensus thread to complete
-      */
-     synchronized (this)
-     {
-       while (af.getViewport().getConsensusSeq() == null)
-       {
-         try
-         {
-           wait(50);
-         } catch (InterruptedException e)
-         {
-         }
-       }
-     }
-   }
    /**
     * Test that changing background (alignment) colour scheme
     * <ul>