+ if (message instanceof uk.ac.vamsas.client.picking.SelectionMessage)
+ {
+ // we only care about AlignmentSequence selections
+ SelectionMessage sm = (SelectionMessage) message;
+
+ Object[] jvobjs = new Object[sm.getVorbaIDs().length];
+ Class type = null;
+ for (int o=0;o<jvobjs.length; o++)
+ {
+ jvobjs[o] = vobj2jv.get(sm.getVorbaIDs()[o]);
+ if (jvobjs[o]==null)
+ {
+ // can't cope with selections for unmapped objects
+ continue;
+ }
+ if (type==null){ type = jvobjs[o].getClass(); };
+ if (type != jvobjs[o].getClass())
+ {
+ // discard - can't cope with selections over mixed objects
+ continue;
+ }
+ }
+ if (type == jalview.datamodel.Alignment.class)
+ {
+ if (jvobjs.length==1) {
+ // othewise discard - can't cope with multiple alignment selections (at the moment) ?
+ ;
+ }
+ // send a message to select the specified columns over the given alignment
+ }
+ if (type == jalview.datamodel.Sequence.class)
+ {
+ boolean aligned = ((jalview.datamodel.Sequence)jvobjs[0]).getDatasetSequence()==null;
+ for (int c=0; jvobjs.length>1 && c<jvobjs.length; c++)
+ {
+ if (((jalview.datamodel.Sequence) jvobjs[c]).getDatasetSequence()==null)
+ {
+ aligned=false;
+ continue;
+ }
+ }
+ if (!aligned)
+ {
+ // if cardinality is greater than one then verify all sequences are alignment sequences.
+ if (jvobjs.length==1)
+ {
+ // find all instances of this dataset sequence in the displayed alignments containing the associated range and select them.
+ }
+ } else {
+ // locate the alignment containing the given sequences and select the associated ranges on them.
+ }
+ }
+ // discard message.
+ for (int c=0;c<jvobjs.length;c++) { jvobjs[c] = null;};
+ jvobjs=null;
+ return;
+ }