Search in sources :

Example 1 with TracePlayerThread

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();
}
Also used : TracePlayerThread(com.twinsoft.convertigo.eclipse.trace.TracePlayerThread)

Example 2 with TracePlayerThread

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();
                }
            });
        }
    }
}
Also used : JavelinConnector(com.twinsoft.convertigo.beans.connectors.JavelinConnector) ProjectExplorerView(com.twinsoft.convertigo.eclipse.views.projectexplorer.ProjectExplorerView) AbstractConnectorComposite(com.twinsoft.convertigo.eclipse.editors.connector.AbstractConnectorComposite) JavelinConnectorComposite(com.twinsoft.convertigo.eclipse.editors.connector.JavelinConnectorComposite) TracePlayerThread(com.twinsoft.convertigo.eclipse.trace.TracePlayerThread) IEditorPart(org.eclipse.ui.IEditorPart) ConnectorEditor(com.twinsoft.convertigo.eclipse.editors.connector.ConnectorEditor) ConnectorEditorPart(com.twinsoft.convertigo.eclipse.editors.connector.ConnectorEditorPart) File(java.io.File) IFile(org.eclipse.core.resources.IFile)

Aggregations

TracePlayerThread (com.twinsoft.convertigo.eclipse.trace.TracePlayerThread)2 JavelinConnector (com.twinsoft.convertigo.beans.connectors.JavelinConnector)1 AbstractConnectorComposite (com.twinsoft.convertigo.eclipse.editors.connector.AbstractConnectorComposite)1 ConnectorEditor (com.twinsoft.convertigo.eclipse.editors.connector.ConnectorEditor)1 ConnectorEditorPart (com.twinsoft.convertigo.eclipse.editors.connector.ConnectorEditorPart)1 JavelinConnectorComposite (com.twinsoft.convertigo.eclipse.editors.connector.JavelinConnectorComposite)1 ProjectExplorerView (com.twinsoft.convertigo.eclipse.views.projectexplorer.ProjectExplorerView)1 File (java.io.File)1 IFile (org.eclipse.core.resources.IFile)1 IEditorPart (org.eclipse.ui.IEditorPart)1