use of com.twinsoft.convertigo.engine.studio.views.projectexplorer.model.WrapDatabaseObject in project convertigo by convertigo.
the class EnableStatementAction method run2.
@Override
protected void run2() throws Exception {
try {
WrapObject[] treeObjects = studio.getSelectedObjects().toArray(new WrapObject[0]);
for (int i = treeObjects.length - 1; i >= 0; --i) {
WrapDatabaseObject treeObject = (WrapDatabaseObject) treeObjects[i];
if (treeObject.instanceOf(Statement.class)) {
// StepView stepTreeObject = (StepView) treeObject;
Statement statement = (Statement) treeObject.getObject();
statement.setEnabled(true);
// stepTreeObject.setEnabled(true);
// stepTreeObject.hasBeenModified(true);
// TreeObjectEvent treeObjectEvent = new TreeObjectEvent(stepTreeObject, "isEnable", false, true);
// explorerView.fireTreeObjectPropertyChanged(treeObjectEvent);
}
}
// explorerView.refreshSelectedTreeObjects();
} catch (Throwable e) {
throw e;
// ConvertigoPlugin.logException(e, "Unable to enable step!");
}
// finally {
// shell.setCursor(null);
// waitCursor.dispose();
}
use of com.twinsoft.convertigo.engine.studio.views.projectexplorer.model.WrapDatabaseObject in project convertigo by convertigo.
the class EnableStepAction method run2.
@Override
protected void run2() throws Exception {
try {
WrapObject[] treeObjects = studio.getSelectedObjects().toArray(new WrapObject[0]);
for (int i = treeObjects.length - 1; i >= 0; --i) {
WrapDatabaseObject treeObject = (WrapDatabaseObject) treeObjects[i];
if (treeObject.instanceOf(Step.class)) {
// StepView stepTreeObject = (StepView) treeObject;
Step step = (Step) treeObject.getObject();
step.setEnabled(true);
// stepTreeObject.setEnabled(true);
// stepTreeObject.hasBeenModified(true);
// TreeObjectEvent treeObjectEvent = new TreeObjectEvent(stepTreeObject, "isEnable", false, true);
// explorerView.fireTreeObjectPropertyChanged(treeObjectEvent);
}
}
// explorerView.refreshSelectedTreeObjects();
} catch (Throwable e) {
throw e;
// ConvertigoPlugin.logException(e, "Unable to enable step!");
}
// finally {
// shell.setCursor(null);
// waitCursor.dispose();
}
use of com.twinsoft.convertigo.engine.studio.views.projectexplorer.model.WrapDatabaseObject 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;
}
}
use of com.twinsoft.convertigo.engine.studio.views.projectexplorer.model.WrapDatabaseObject in project convertigo by convertigo.
the class Studio method getFirstSelectedDatabaseObject.
public Object getFirstSelectedDatabaseObject() {
Object object = null;
WrapDatabaseObject treeObject = (WrapDatabaseObject) getFirstSelectedTreeObject();
if (treeObject != null) {
object = treeObject.getObject();
}
return object;
}
Aggregations