X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fworkers%2FConservationThread.java;h=e71c4f58a60d1ca927d0829db7a7a5f9e6f286c5;hb=a73cc918a63c07cfa5291b9b52f28cc201571ef5;hp=7ed50d81328aff283aaaede3b0bb0579823aa1cb;hpb=47168f025aefdaa044802bd5f8f510ffe43a4808;p=jalview.git diff --git a/src/jalview/workers/ConservationThread.java b/src/jalview/workers/ConservationThread.java index 7ed50d8..e71c4f5 100644 --- a/src/jalview/workers/ConservationThread.java +++ b/src/jalview/workers/ConservationThread.java @@ -1,6 +1,6 @@ /* - * Jalview - A Sequence Alignment Editor and Viewer (Version 2.8.2) - * Copyright (C) 2014 The Jalview Authors + * Jalview - A Sequence Alignment Editor and Viewer ($$Version-Rel$$) + * Copyright (C) $$Year-Rel$$ The Jalview Authors * * This file is part of Jalview. * @@ -20,18 +20,16 @@ */ package jalview.workers; -import java.util.ArrayList; -import java.util.List; - import jalview.analysis.Conservation; -import jalview.api.AlignCalcWorkerI; -import jalview.api.AlignmentViewPanel; import jalview.api.AlignViewportI; +import jalview.api.AlignmentViewPanel; import jalview.datamodel.AlignmentAnnotation; import jalview.datamodel.AlignmentI; -public class ConservationThread extends AlignCalcWorker implements - AlignCalcWorkerI +import java.util.ArrayList; +import java.util.List; + +public class ConservationThread extends AlignCalcWorker { private int ConsPercGaps = 25; // JBPNote : This should be a configurable @@ -74,6 +72,7 @@ public class ConservationThread extends AlignCalcWorker implements if (alignViewport.isClosed()) { abortAndDestroy(); + return; } List ourAnnot = new ArrayList(); AlignmentI alignment = alignViewport.getAlignment(); @@ -96,7 +95,6 @@ public class ConservationThread extends AlignCalcWorker implements try { cons = Conservation.calculateConservation("All", - jalview.schemes.ResidueProperties.propHash, 3, alignment.getSequences(), 0, alWidth - 1, false, ConsPercGaps, quality != null); } catch (IndexOutOfBoundsException x) @@ -109,7 +107,7 @@ public class ConservationThread extends AlignCalcWorker implements } catch (OutOfMemoryError error) { ap.raiseOOMWarning("calculating conservation", error); - calcMan.workerCannotRun(this); + calcMan.disableWorker(this); // alignViewport.conservation = null; // this.alignViewport.quality = null;