git://source.jalview.org
/
jalview.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
JAL-3518 pull up closeViewer() and external viewer process monitor
[jalview.git]
/
src
/
jalview
/
gui
/
PymolBindingModel.java
diff --git
a/src/jalview/gui/PymolBindingModel.java
b/src/jalview/gui/PymolBindingModel.java
index
264a49c
..
538b101
100644
(file)
--- a/
src/jalview/gui/PymolBindingModel.java
+++ b/
src/jalview/gui/PymolBindingModel.java
@@
-6,6
+6,7
@@
import java.util.List;
import java.util.Map;
import jalview.api.AlignmentViewPanel;
import java.util.Map;
import jalview.api.AlignmentViewPanel;
+import jalview.bin.Cache;
import jalview.datamodel.PDBEntry;
import jalview.datamodel.SequenceI;
import jalview.ext.pymol.PymolCommands;
import jalview.datamodel.PDBEntry;
import jalview.datamodel.SequenceI;
import jalview.ext.pymol.PymolCommands;
@@
-29,8
+30,6
@@
public class PymolBindingModel extends AAStructureBindingModel
private PymolManager pymolManager;
private PymolManager pymolManager;
- private Thread pymolMonitor;
-
/*
* full paths to structure files opened in PyMOL
*/
/*
* full paths to structure files opened in PyMOL
*/
@@
-139,16
+138,7
@@
public class PymolBindingModel extends AAStructureBindingModel
public void closeViewer(boolean closePymol)
{
super.closeViewer(closePymol);
public void closeViewer(boolean closePymol)
{
super.closeViewer(closePymol);
- if (closePymol)
- {
- pymolManager.exitPymol();
- }
pymolManager = null;
pymolManager = null;
-
- if (pymolMonitor != null)
- {
- pymolMonitor.interrupt();
- }
}
public boolean launchPymol()
}
public boolean launchPymol()
@@
-158,16
+148,17
@@
public class PymolBindingModel extends AAStructureBindingModel
return true;
}
return true;
}
- boolean launched = pymolManager.launchPymol();
- if (launched)
+ Process pymol = pymolManager.launchPymol();
+ if (pymol != null)
{
// start listening for PyMOL selections - how??
{
// start listening for PyMOL selections - how??
+ startExternalViewerMonitor(pymol);
}
else
{
}
else
{
- System.err.println("Failed to launch PyMOL!");
+ Cache.log.error("Failed to launch PyMOL!");
}
}
- return launched;
+ return pymol != null;
}
public void openFile(PDBEntry pe)
}
public void openFile(PDBEntry pe)