use of com.twinsoft.convertigo.eclipse.trace.TracePlayerThread in project convertigo by convertigo.
the class JavelinConnectorComposite method close.
/*
* (non-Javadoc)
*
* @see
* com.twinsoft.convertigo.eclipse.editors.connector.AbstractConnectorComposite
* #close()
*/
public void close() {
isClosing = true;
clear();
TracePlayerThread tracePlayerThread = null;
if (projectExplorerView != null) {
tracePlayerThread = projectExplorerView.tracePlayerThread;
}
if ((tracePlayerThread != null) && (tracePlayerThread.connectorName != null) && (tracePlayerThread.connectorName.equals(connector.getName()))) {
tracePlayerThread.stopPlayer();
}
super.close();
}
use of com.twinsoft.convertigo.eclipse.trace.TracePlayerThread in project convertigo by convertigo.
the class TraceTreeObject method play.
public void play(boolean bReplace) {
ProjectExplorerView explorerView = ConvertigoPlugin.getDefault().getProjectExplorerView();
if (explorerView == null)
return;
JavelinConnector javelinConnector = (JavelinConnector) getParent().getParent().getObject();
// Launch TracePlayer
if (explorerView.tracePlayerThread != null) {
if (!bReplace)
return;
explorerView.tracePlayerThread.stopPlayer();
}
File file = (File) getObject();
String traceFile = file.toString();
explorerView.tracePlayerThread = new TracePlayerThread("IbmTracePlayerThread", javelinConnector.getName(), traceFile);
// Connect javelin
IEditorPart wpart = getConnectorEditor(javelinConnector);
if (wpart != null) {
ConnectorEditor connectorEditor = (ConnectorEditor) wpart;
ConnectorEditorPart connectorEditorPart = connectorEditor.getConnectorEditorPart();
AbstractConnectorComposite connectorComposite = connectorEditorPart.getConnectorComposite();
if ((connectorComposite != null) && (connectorComposite instanceof JavelinConnectorComposite)) {
// Asynchronize javelin connection
final JavelinConnectorComposite javelinConnectorComposite = ((JavelinConnectorComposite) connectorComposite);
EventQueue.invokeLater(new Runnable() {
public void run() {
javelinConnectorComposite.renew(true);
javelinConnectorComposite.connect();
}
});
}
}
}
Aggregations