use of com.twinsoft.convertigo.engine.studio.views.projectexplorer.model.TransactionView 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;
}
}
use of com.twinsoft.convertigo.engine.studio.views.projectexplorer.model.TransactionView in project convertigo by convertigo.
the class TransactionExecuteSelectedAction method run2.
@Override
public void run2() throws Exception {
try {
WrapDatabaseObject treeObject = (WrapDatabaseObject) studio.getFirstSelectedTreeObject();
if ((treeObject != null) && (treeObject.instanceOf(Transaction.class))) {
TransactionView transactionTreeObject = (TransactionView) treeObject;
Transaction transaction = transactionTreeObject.getObject();
transactionTreeObject.getConnectorTreeObject().openConnectorEditor();
Connector connector = (Connector) transaction.getParent();
ProjectView projectTreeObject = transactionTreeObject.getProjectView();
ConnectorEditorWrap connectorEditor = projectTreeObject.getConnectorEditor(connector);
if (connectorEditor != null) {
// getActivePage().activate(connectorEditor);
connectorEditor.getDocument(transaction.getName(), isStubRequested());
}
}
} catch (Throwable e) {
// ConvertigoPlugin.logException(e, "Unable to execute the selected transaction!");
throw e;
}
}
Aggregations