Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Used the new isAvailable() method

  • Loading branch information...
commit eb42a32b927dd5d5188ee98897e3d61def6f0f15 1 parent 302febc
@egonw authored
View
7 plugins/net.bioclipse.inchi/src/net/bioclipse/inchi/business/InChIManager.java
@@ -49,15 +49,10 @@ public void generate( IMolecule molecule,
throws Exception {
monitor.beginTask("Calculating InChI", IProgressMonitor.UNKNOWN);
// return early if InChI library could not be loaded
- if (loadingFailed) returner.completeReturn(InChI.FAILED_TO_CALCULATE);
+ if (!isAvailable()) returner.completeReturn(InChI.FAILED_TO_CALCULATE);
Object adapted = molecule.getAdapter(IAtomContainer.class);
if (adapted != null) {
- // ensure we can actually generate an InChI
- if (!isLoaded && !LOADING_SUCCESS.equals(load())) {
- returner.completeReturn(InChI.FAILED_TO_CALCULATE);
- }
-
IAtomContainer container = (IAtomContainer)adapted;
IAtomContainer clone = (IAtomContainer)container.clone();
// remove aromaticity flags
Please sign in to comment.
Something went wrong with that request. Please try again.