From: tcofoegbu Date: Mon, 1 May 2017 14:02:17 +0000 (+0100) Subject: merge develop X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=207b06de28859536277608ad94897eaa526b1279;p=jalview.git merge develop --- 207b06de28859536277608ad94897eaa526b1279 diff --cc src/jalview/ext/rbvi/chimera/JalviewChimeraBinding.java index ffce90c,745b1e1..daf6131 --- a/src/jalview/ext/rbvi/chimera/JalviewChimeraBinding.java +++ b/src/jalview/ext/rbvi/chimera/JalviewChimeraBinding.java @@@ -1099,8 -1110,17 +1099,8 @@@ public abstract class JalviewChimeraBin { // TODO refactor as required to pull up to an interface AlignmentI alignment = avp.getAlignment(); - FeatureRenderer fr = getFeatureRenderer(avp); - - /* - * fr is null if feature display is turned off - */ - if (fr == null) - { - return 0; - } - String[] files = getPdbFile(); + String[] files = getStructureFiles(); if (files == null) { return 0; diff --cc src/jalview/gui/AppJmolBinding.java index f822358,2227978..0c5f469 --- a/src/jalview/gui/AppJmolBinding.java +++ b/src/jalview/gui/AppJmolBinding.java @@@ -48,6 -50,31 +48,12 @@@ public class AppJmolBinding extends Jal } @Override + protected IProgressIndicator getIProgressIndicator() + { + return appJmolWindow.progressBar; + } - @Override - public FeatureRenderer getFeatureRenderer(AlignmentViewPanel alignment) - { - AlignmentPanel ap = (alignment == null) ? appJmolWindow - .getAlignmentPanel() : (AlignmentPanel) alignment; - if (ap.av.isShowSequenceFeatures()) - { - if (fr == null) - { - fr = (jalview.gui.FeatureRenderer) ap.cloneFeatureRenderer(); - } - else - { - ap.updateFeatureRenderer(fr); - } - } - - return fr; - } + + @Override public SequenceRenderer getSequenceRenderer(AlignmentViewPanel alignment) { return new SequenceRenderer(((AlignmentPanel) alignment).av); diff --cc test/jalview/ws/sifts/SiftsClientTest.java index 7f8adc9,6a1fa1f..b50baff --- a/test/jalview/ws/sifts/SiftsClientTest.java +++ b/test/jalview/ws/sifts/SiftsClientTest.java @@@ -37,9 -38,8 +38,10 @@@ import jalview.xml.binding.sifts.Entry. import java.io.File; import java.io.IOException; import java.util.ArrayList; + import java.util.Arrays; import java.util.HashMap; +import java.util.Iterator; +import java.util.Map; import org.testng.Assert; import org.testng.FileAssert; @@@ -282,19 -282,16 +284,32 @@@ public class SiftsClientTes "A", testSeq, null); Assert.assertEquals(testSeq.getStart(), 1); Assert.assertEquals(testSeq.getEnd(), 147); ++<<<<<<< HEAD + // Can't do Assert.assertEquals(actualMapping, expectedMapping); + // because this fails in our version of TestNG + Assert.assertEquals(actualMapping.size(), expectedMapping.size()); + Iterator> it = expectedMapping.entrySet() + .iterator(); + while (it.hasNext()) + { + Map.Entry pair = it.next(); + Assert.assertTrue(actualMapping.containsKey(pair.getKey())); + Assert.assertEquals(actualMapping.get(pair.getKey()), + pair.getValue()); + } + ++======= + // Assert.assertEquals(actualMapping, expectedMapping); + Assert.assertEquals(actualMapping.size(), expectedMapping.size()); + // Test key set + Assert.assertEquals(actualMapping.keySet(), expectedMapping.keySet()); + // Test entry set + for (int key : expectedMapping.keySet()) + { + Assert.assertTrue(Arrays.equals(expectedMapping.get(key), + actualMapping.get(key))); + } ++>>>>>>> f80180a53bf16dc72ecdd4ace0f70c83cb0d274a } catch (Exception e) { e.printStackTrace(); @@@ -414,19 -412,17 +430,33 @@@ groups = { "Network" } Assert.assertEquals(strucMapping.getMappingDetailsOutput(), expectedMappingOutput); ++<<<<<<< HEAD + // Can't do Assert.assertEquals(strucMapping.getMapping(), expectedMapping); + // because this fails in our version of TestNG + Assert.assertEquals(strucMapping.getMapping().size(), + expectedMapping.size()); + Iterator> it = expectedMapping.entrySet() + .iterator(); + while (it.hasNext()) + { + Map.Entry pair = it.next(); + Assert.assertTrue(strucMapping.getMapping() + .containsKey(pair.getKey())); + Assert.assertEquals(strucMapping.getMapping().get(pair.getKey()), + pair.getValue()); ++======= + // Assert.assertEquals(strucMapping.getMapping(), expectedMapping); + Assert.assertEquals(strucMapping.getMapping().size(), + expectedMapping.size()); + // Test key set + Assert.assertEquals(strucMapping.getMapping().keySet(), + expectedMapping.keySet()); + // Test entry set + for (int key : expectedMapping.keySet()) + { + Assert.assertTrue(Arrays.equals(expectedMapping.get(key), + strucMapping.getMapping().get(key))); ++>>>>>>> f80180a53bf16dc72ecdd4ace0f70c83cb0d274a } }