use of com.twinsoft.convertigo.engine.studio.views.projectexplorer.model.ProjectView in project convertigo by convertigo.
the class TransactionExecuteDefaultAction method run2.
@Override
protected void run2() throws Exception {
try {
WrapDatabaseObject treeObject = (WrapDatabaseObject) studio.getFirstSelectedTreeObject();
if (treeObject != null) {
ProjectView projectTreeObject = treeObject.getProjectViewObject();
Connector connector = null;
if (treeObject.instanceOf(Connector.class)) {
ConnectorView connectorTreeObject = (ConnectorView) treeObject;
connectorTreeObject.openConnectorEditor();
connector = connectorTreeObject.getObject();
} else {
connector = ((Project) projectTreeObject.getObject()).getDefaultConnector();
ConnectorView connectorTreeObject = (ConnectorView) Studio.getViewFromDbo(connector, studio);
if (connectorTreeObject != null) {
connectorTreeObject.openConnectorEditor();
}
}
Transaction transaction = connector.getDefaultTransaction();
ConnectorEditorWrap connectorEditor = projectTreeObject.getConnectorEditor(connector);
if (connectorEditor != null) {
// getActivePage().activate(connectorEditor);
connectorEditor.getDocument(transaction.getName(), false);
}
}
} catch (Exception e) {
throw e;
}
}
Aggregations