assert (_alignment.length == _refStructure.length && _alignment.length != _hiddenCols.length);
String[] files = getPdbFile();
+ // check to see if we are still waiting for Jmol files
+ long starttime=System.currentTimeMillis();
+ boolean waiting=true;
+ do {
+ waiting=false;
+ for (String file:files)
+ {
+ try {
+ // HACK - in Jalview 2.8 this call may not be threadsafe so we catch
+ // every possible exception
+ StructureMapping[] sm = ssm.getMapping(file);
+ if (sm == null || sm.length == 0)
+ {
+ waiting = true;
+ }
+ } catch (Exception x)
+ {
+ waiting = true;
+ } catch (Error q)
+ {
+ waiting = true;
+ }
+ }
+ // we wait around for a reasonable time before we give up
+ } while (waiting && System.currentTimeMillis()<(10000+1000*files.length+starttime));
+ if (waiting)
+ {
+ System.err.println("RUNTIME PROBLEM: Jmol seems to be taking a long time to process all the structures.");
+ return;
+ }
StringBuffer selectioncom = new StringBuffer();
+
+
// union of all aligned positions are collected together.
for (int a = 0; a < _alignment.length; a++)
{