- case JMOL:
- break;
- case CHIMERA:
- Cache.setProperty(CHIMERA_PATH, path);
- break;
- case CHIMERAX:
- Cache.setProperty(CHIMERAX_PATH, path);
- break;
- case PYMOL:
- Cache.setProperty(PYMOL_PATH, path);
- break;
+ ViewerType type = ViewerType.valueOf(viewerType);
+ switch (type)
+ {
+ case JMOL:
+ break;
+ case CHIMERA:
+ Cache.setProperty(CHIMERA_PATH, path);
+ break;
+ case CHIMERAX:
+ Cache.setProperty(CHIMERAX_PATH, path);
+ break;
+ case PYMOL:
+ Cache.setProperty(PYMOL_PATH, path);
+ break;
+ }
+ } catch (IllegalArgumentException x)
+ {
+ Console.error("Failed to set path - unknown viewer type", x);