}
continue;
}
- try
+
+ /**
+ * @j2sIgnore no Thread.sleep(long)
+ */
{
- long tries = 1000;
- while (structureViewer.isBusy() && tries > 0)
+ try
{
- Thread.sleep(25);
- if (structureViewer.isBusy())
+ int tries = 1000;
+ while (structureViewer.isBusy() && tries > 0)
{
- tries--;
- Console.debug(
- "Waiting for viewer for " + structureFilepath);
+ Thread.sleep(25);
+ if (structureViewer.isBusy())
+ {
+ tries--;
+ Console.debug(
+ "Waiting for viewer for " + structureFilepath);
+ }
}
- }
- if (tries == 0 && structureViewer.isBusy())
+ if (tries == 0 && structureViewer.isBusy())
+ {
+ addWarn("Gave up waiting for structure viewer to load file '"
+ + structureFile
+ + "'. Something may have gone wrong.");
+ }
+ } catch (Exception x)
{
- addWarn("Gave up waiting for structure viewer to load file '"
- + structureFile
- + "'. Something may have gone wrong.");
+ addError("Exception whilst waiting for structure viewer "
+ + structureFilepath, x);
+ isError = true;
}
- } catch (Exception x)
- {
- addError("Exception whilst waiting for structure viewer "
- + structureFilepath, x);
- isError = true;
}
// add StructureViewer to svMap list
{
try
{
- Console.debug("Waiting around for jmb notify.");
waitTotal += waitFor;
-
- // Thread.sleep() throws an exception in JS
- Thread.sleep(waitFor);
+ /**
+ * @j2sIgnore no Thread.sleep()
+ */
+ {
+ Console.debug("Waiting around for jmb notify.");
+ // Thread.sleep() throws an exception in JS
+ Thread.sleep(waitFor);
+ }
} catch (Exception e)
{
}