Permalink
Browse files

Send cloned molecule to TestRun. Also treat MolTableEditor as special…

… case when clearing test runs since JCP context is lost when another view is clicked upon.
  • Loading branch information...
olas committed Jul 20, 2009
1 parent 058b3fc commit 1dba1f7214bda746677427f8f0aa8dc841e2aa51
Showing with 10 additions and 4 deletions.
  1. +10 −4 plugins/net.bioclipse.ds/src/net/bioclipse/ds/ui/views/DSView.java
@@ -759,7 +759,7 @@ private void doRunAllTests() {
logger.debug( "== Testrun: " + tr.getTest().getName() + " started" );
tr.setStatus( TestRun.RUNNING );
- tr.setMolecule( mol );
+ tr.setMolecule( cloneMol );
viewer.refresh(tr);
viewer.setExpandedState( tr, true );
@@ -1383,9 +1383,15 @@ public void contextManagerChanged( ContextManagerEvent contextManagerEvent ) {
IEditorPart editor = getSite().getWorkbenchWindow()
.getActivePage().getActiveEditor();
if (editor!=null){
- IWorkbenchPart suped = getSupportedEditor( editor );
- addNewTestRunsAndListener(suped);
- updateView();
+ if ( editor instanceof MultiPageMoleculesEditorPart ) {
+ //Special case when SDF editor JCP is visible since same
+ //editor, but different molecule.
+ IWorkbenchPart suped = getSupportedEditor( editor );
+ addNewTestRunsAndListener(suped);
+ updateView();
+
+ }
+ partActivated( editor );
}
}else{
//MolTableEditor switched to tab other than JCP

0 comments on commit 1dba1f7

Please sign in to comment.