From: gmungoc Date: Mon, 29 Jun 2020 10:55:14 +0000 (+0100) Subject: Merge branch 'develop' of https://source.jalview.org/git/jalview.git into develop X-Git-Tag: Develop-2_11_2_0-d20201215~24^2~36 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=3b2dd110a9283ae50db9302c8cc22ab4aec7a199;hp=c9de7d22f36c8866959c8c3ddbad72c2fa841f32;p=jalview.git Merge branch 'develop' of https://source.jalview.org/git/jalview.git into develop --- diff --git a/src/ext/edu/ucsf/rbvi/strucviz2/ChimeraManager.java b/src/ext/edu/ucsf/rbvi/strucviz2/ChimeraManager.java index ea48cb6..375fa4a 100644 --- a/src/ext/edu/ucsf/rbvi/strucviz2/ChimeraManager.java +++ b/src/ext/edu/ucsf/rbvi/strucviz2/ChimeraManager.java @@ -814,7 +814,9 @@ public class ChimeraManager */ public List sendChimeraCommand(String command, boolean reply) { - System.out.println("chimeradebug>> " + command); + if (debug) { + System.out.println("chimeradebug>> " + command); + } if (!isChimeraLaunched() || command == null || "".equals(command.trim())) { diff --git a/src/jalview/bin/Cache.java b/src/jalview/bin/Cache.java index 788cb02..85d23df 100755 --- a/src/jalview/bin/Cache.java +++ b/src/jalview/bin/Cache.java @@ -313,6 +313,9 @@ public class Cache // lcastor = Logger.getLogger("org.exolab.castor.xml.Marshaller"); // lcastor.setLevel(Level.toLevel(Cache.getDefault("logs.Castor.Level", // Level.INFO.toString()))); + // we shouldn't need to do this + org.apache.log4j.Logger.getRootLogger().setLevel(org.apache.log4j.Level.INFO); + jalview.bin.Cache.log.setLevel(Level.toLevel(Cache .getDefault("logs.Jalview.level", Level.INFO.toString()))); // laxis.addAppender(ap); diff --git a/src/jalview/ext/rbvi/chimera/JalviewChimeraBinding.java b/src/jalview/ext/rbvi/chimera/JalviewChimeraBinding.java index 487e93b..549636b 100644 --- a/src/jalview/ext/rbvi/chimera/JalviewChimeraBinding.java +++ b/src/jalview/ext/rbvi/chimera/JalviewChimeraBinding.java @@ -339,8 +339,10 @@ public abstract class JalviewChimeraBinding extends AAStructureBindingModel if (getResponse) { reply = lastReply; - Cache.log.debug( - "Response from command ('" + cmd + "') was:\n" + lastReply); + if (Cache.log.isDebugEnabled()) { + Cache.log.debug( + "Response from command ('" + cmd + "') was:\n" + lastReply); + } } return reply; @@ -442,40 +444,51 @@ public abstract class JalviewChimeraBinding extends AAStructureBindingModel * Ask Chimera for its current selection */ StructureCommandI command = getCommandGenerator().getSelectedResidues(); - List chimeraReply = executeCommand(command, true); - List selectedResidues = new ArrayList<>(); - if (chimeraReply != null) + + Runnable action = new Runnable() { - /* - * expect 0, 1 or more lines of the format either - * Chimera: - * residue id #0:43.A type GLY - * ChimeraX: - * residue id /A:89 name THR index 88 - * We are only interested in the atomspec (third token of the reply) - */ - for (String inputLine : chimeraReply) + @Override + public void run() { - String[] inputLineParts = inputLine.split("\\s+"); - if (inputLineParts.length >= 5) + List chimeraReply = executeCommand(command, true); + + List selectedResidues = new ArrayList<>(); + if (chimeraReply != null) { - selectedResidues.add(inputLineParts[2]); + /* + * expect 0, 1 or more lines of the format either + * Chimera: + * residue id #0:43.A type GLY + * ChimeraX: + * residue id /A:89 name THR index 88 + * We are only interested in the atomspec (third token of the reply) + */ + for (String inputLine : chimeraReply) + { + String[] inputLineParts = inputLine.split("\\s+"); + if (inputLineParts.length >= 5) + { + selectedResidues.add(inputLineParts[2]); + } + } } - } - } - - /* - * Parse model number, residue and chain for each selected position, - * formatted as #0:123.A or #1.2:87.B (#model.submodel:residue.chain) - */ - List atomSpecs = convertStructureResiduesToAlignment( - selectedResidues); - /* - * Broadcast the selection (which may be empty, if the user just cleared all - * selections) - */ - getSsm().mouseOverStructure(atomSpecs); + /* + * Parse model number, residue and chain for each selected position, + * formatted as #0:123.A or #1.2:87.B (#model.submodel:residue.chain) + */ + List atomSpecs = convertStructureResiduesToAlignment( + selectedResidues); + + /* + * Broadcast the selection (which may be empty, if the user just cleared all + * selections) + */ + getSsm().mouseOverStructure(atomSpecs); + + } + }; + new Thread(action).start(); } /** diff --git a/src/jalview/gui/IdCanvas.java b/src/jalview/gui/IdCanvas.java index 10c0787..1a8e79f 100755 --- a/src/jalview/gui/IdCanvas.java +++ b/src/jalview/gui/IdCanvas.java @@ -324,6 +324,7 @@ public class IdCanvas extends JPanel implements ViewportListenerI if (hasHiddenRows || alignViewport.isDisplayReferenceSeq()) { g.setFont(getHiddenFont(sequence, alignViewport)); + fm = g.getFontMetrics(); } // Selected sequence colours