// configure services
StructureSelectionManager ssm = StructureSelectionManager
.getStructureSelectionManager(this);
- if (Cache.getDefault(Preferences.ADD_SS_ANN, true))
- {
- ssm.setAddTempFacAnnot(
- Cache.getDefault(Preferences.ADD_TEMPFACT_ANN, true));
- ssm.setProcessSecondaryStructure(
- Cache.getDefault(Preferences.STRUCT_FROM_PDB, true));
- // JAL-3915 - RNAView is no longer an option so this has no effect
- ssm.setSecStructServices(
- Cache.getDefault(Preferences.USE_RNAVIEW, false));
- }
- else
- {
- ssm.setAddTempFacAnnot(false);
- ssm.setProcessSecondaryStructure(false);
- ssm.setSecStructServices(false);
- }
+ StructureSelectionManager.doConfigureStructurePrefs(ssm);
}
public void checkForNews()
{
// suppress a possible repeat prompt to save script
groovyConsole.setDirty(false);
- groovyConsole.exit();
+
+ // and tidy up
+ if (((Window) groovyConsole.getFrame()) != null
+ && ((Window) groovyConsole.getFrame()).isVisible())
+ {
+ // console is visible -- FIXME JAL-4327
+ groovyConsole.exit();
+ }
+ else
+ {
+ // console is not, so just let it dispose itself when we shutdown
+ // we don't call groovyConsole.exit() because it calls the shutdown
+ // handler with invokeAndWait() causing deadlock
+ groovyConsole = null;
+ }
}
if (terminateJvm)