Permalink
Browse files

Renamed QSARManager API and a small NPE catch.

  • Loading branch information...
1 parent c6c0492 commit 235c801d83c84d86e47288a6ec7f0bd69219de01 @olas committed Jul 28, 2009
@@ -313,7 +313,7 @@ private void scanQsarFile(IProgressMonitor monitor) throws OperationCanceledExce
//Calculate all changed descriptors
IQsarManager qsar = net.bioclipse.qsar.init.Activator.getDefault().getQsarManager();
- Map<IMolecule, List<IDescriptorResult>> resultMap = qsar.calculate(molDescMap, new SubProgressMonitor(monitor, jobSize));
+ Map<IMolecule, List<IDescriptorResult>> resultMap = qsar.doCalculation(molDescMap, new SubProgressMonitor(monitor, jobSize));
logger.debug("Calculation results: \n" + debugResultMap(resultMap));
if (checkCancel(monitor)){
handleInterruptedBuild();
@@ -10,6 +10,7 @@
******************************************************************************/
package net.bioclipse.qsar.ui.editors;
+import net.bioclipse.core.business.BioclipseException;
import net.bioclipse.qsar.business.IQsarManager;
import net.bioclipse.qsar.descriptor.model.Descriptor;
@@ -40,8 +41,11 @@ public boolean select(Viewer viewer, Object parentElement, Object element) {
Descriptor desc = (Descriptor) element;
- if (qsar.getDescriptorImpls(desc.getId()).size()>0)
- return true;
+ try {
+ if (qsar.getDescriptorImpls(desc.getId()).size()>0)
+ return true;
+ } catch ( BioclipseException e ) {
+ }
return false;
}

0 comments on commit 235c801

Please sign in to comment.