Search in sources :

Example 1 with SequenceEditorWrap

use of com.twinsoft.convertigo.engine.studio.editors.sequences.SequenceEditorWrap in project convertigo by convertigo.

the class SequenceExecuteSelectedAction method run2.

@Override
protected void run2() throws Exception {
    try {
        WrapDatabaseObject treeObject = (WrapDatabaseObject) studio.getFirstSelectedTreeObject();
        if (treeObject != null && treeObject.instanceOf(Sequence.class)) {
            SequenceView sequenceTreeObject = (SequenceView) treeObject;
            openEditors(/*explorerView, */
            sequenceTreeObject);
            Sequence sequence = sequenceTreeObject.getObject();
            ProjectView projectTreeObject = sequenceTreeObject.getProjectView();
            SequenceEditorWrap sequenceEditor = projectTreeObject.getSequenceEditor(sequence);
            if (sequenceEditor != null) {
                // getActivePage().activate(sequenceEditor);
                sequenceEditor.getDocument(sequence.getName(), null, isStubRequested());
            }
        }
    } catch (Exception e) {
        throw e;
    }
}
Also used : SequenceView(com.twinsoft.convertigo.engine.studio.views.projectexplorer.model.SequenceView) WrapDatabaseObject(com.twinsoft.convertigo.engine.studio.views.projectexplorer.model.WrapDatabaseObject) Sequence(com.twinsoft.convertigo.beans.core.Sequence) ProjectView(com.twinsoft.convertigo.engine.studio.views.projectexplorer.model.ProjectView) SequenceEditorWrap(com.twinsoft.convertigo.engine.studio.editors.sequences.SequenceEditorWrap) EngineException(com.twinsoft.convertigo.engine.EngineException)

Example 2 with SequenceEditorWrap

use of com.twinsoft.convertigo.engine.studio.editors.sequences.SequenceEditorWrap in project convertigo by convertigo.

the class TestCaseExecuteSelectedAction method run2.

@Override
protected void run2() throws Exception {
    try {
        WrapDatabaseObject treeObject = (WrapDatabaseObject) studio.getFirstSelectedTreeObject();
        if ((treeObject != null) && (treeObject.instanceOf(TestCase.class))) {
            TestCase testCase = (TestCase) treeObject.getObject();
            ProjectView projectTreeObject = treeObject.getProjectViewObject();
            RequestableObject requestable = (RequestableObject) testCase.getParent();
            if (requestable instanceof Transaction) {
                TransactionView transactionTreeObject = (TransactionView) treeObject.getParent();
                transactionTreeObject.getConnectorTreeObject().openConnectorEditor();
                Transaction transaction = (Transaction) testCase.getParent();
                Connector connector = (Connector) transaction.getParent();
                ConnectorEditorWrap connectorEditor = projectTreeObject.getConnectorEditor(connector);
                if (connectorEditor != null) {
                    // getActivePage().activate(connectorEditor);
                    connectorEditor.getDocument(transaction.getName(), testCase.getName(), false);
                }
            } else if (requestable instanceof Sequence) {
                SequenceView sequenceTreeObject = (SequenceView) treeObject.getParent();
                new SequenceExecuteSelectedAction(studio).openEditors(sequenceTreeObject);
                Sequence sequence = (Sequence) testCase.getParent();
                SequenceEditorWrap sequenceEditor = projectTreeObject.getSequenceEditor(sequence);
                if (sequenceEditor != null) {
                    // getActivePage().activate(sequenceEditor);
                    sequenceEditor.getDocument(sequence.getName(), testCase.getName(), false);
                }
            }
        }
    } catch (Exception e) {
        throw e;
    }
}
Also used : Connector(com.twinsoft.convertigo.beans.core.Connector) ConnectorEditorWrap(com.twinsoft.convertigo.engine.studio.editors.connectors.ConnectorEditorWrap) RequestableObject(com.twinsoft.convertigo.beans.core.RequestableObject) Sequence(com.twinsoft.convertigo.beans.core.Sequence) Transaction(com.twinsoft.convertigo.beans.core.Transaction) TestCase(com.twinsoft.convertigo.beans.core.TestCase) SequenceView(com.twinsoft.convertigo.engine.studio.views.projectexplorer.model.SequenceView) TransactionView(com.twinsoft.convertigo.engine.studio.views.projectexplorer.model.TransactionView) WrapDatabaseObject(com.twinsoft.convertigo.engine.studio.views.projectexplorer.model.WrapDatabaseObject) ProjectView(com.twinsoft.convertigo.engine.studio.views.projectexplorer.model.ProjectView) SequenceEditorWrap(com.twinsoft.convertigo.engine.studio.editors.sequences.SequenceEditorWrap)

Example 3 with SequenceEditorWrap

use of com.twinsoft.convertigo.engine.studio.editors.sequences.SequenceEditorWrap in project convertigo by convertigo.

the class ProjectView method getSequenceEditor.

public SequenceEditorWrap getSequenceEditor(Sequence sequence) {
    SequenceEditorWrap sequenceEditor = sequenceToSequenceEditor.get(sequence);
    // Create instance if it doesn't exist yet
    if (sequenceEditor == null) {
        sequenceEditor = new SequenceEditorWrap(sequence);
        sequenceToSequenceEditor.put(sequence, sequenceEditor);
    }
    return sequenceEditor;
}
Also used : SequenceEditorWrap(com.twinsoft.convertigo.engine.studio.editors.sequences.SequenceEditorWrap)

Aggregations

SequenceEditorWrap (com.twinsoft.convertigo.engine.studio.editors.sequences.SequenceEditorWrap)3 Sequence (com.twinsoft.convertigo.beans.core.Sequence)2 ProjectView (com.twinsoft.convertigo.engine.studio.views.projectexplorer.model.ProjectView)2 SequenceView (com.twinsoft.convertigo.engine.studio.views.projectexplorer.model.SequenceView)2 WrapDatabaseObject (com.twinsoft.convertigo.engine.studio.views.projectexplorer.model.WrapDatabaseObject)2 Connector (com.twinsoft.convertigo.beans.core.Connector)1 RequestableObject (com.twinsoft.convertigo.beans.core.RequestableObject)1 TestCase (com.twinsoft.convertigo.beans.core.TestCase)1 Transaction (com.twinsoft.convertigo.beans.core.Transaction)1 EngineException (com.twinsoft.convertigo.engine.EngineException)1 ConnectorEditorWrap (com.twinsoft.convertigo.engine.studio.editors.connectors.ConnectorEditorWrap)1 TransactionView (com.twinsoft.convertigo.engine.studio.views.projectexplorer.model.TransactionView)1