Search in sources :

Example 26 with WrapDatabaseObject

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();
}
Also used : Statement(com.twinsoft.convertigo.beans.core.Statement) WrapObject(com.twinsoft.convertigo.engine.studio.views.projectexplorer.model.WrapObject) WrapDatabaseObject(com.twinsoft.convertigo.engine.studio.views.projectexplorer.model.WrapDatabaseObject)

Example 27 with WrapDatabaseObject

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();
}
Also used : WrapObject(com.twinsoft.convertigo.engine.studio.views.projectexplorer.model.WrapObject) WrapDatabaseObject(com.twinsoft.convertigo.engine.studio.views.projectexplorer.model.WrapDatabaseObject) Step(com.twinsoft.convertigo.beans.core.Step)

Example 28 with WrapDatabaseObject

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;
    }
}
Also used : Connector(com.twinsoft.convertigo.beans.core.Connector) ConnectorEditorWrap(com.twinsoft.convertigo.engine.studio.editors.connectors.ConnectorEditorWrap) Transaction(com.twinsoft.convertigo.beans.core.Transaction) ConnectorView(com.twinsoft.convertigo.engine.studio.views.projectexplorer.model.ConnectorView) WrapDatabaseObject(com.twinsoft.convertigo.engine.studio.views.projectexplorer.model.WrapDatabaseObject) ProjectView(com.twinsoft.convertigo.engine.studio.views.projectexplorer.model.ProjectView)

Example 29 with WrapDatabaseObject

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;
}
Also used : DatabaseObject(com.twinsoft.convertigo.beans.core.DatabaseObject) WrapDatabaseObject(com.twinsoft.convertigo.engine.studio.views.projectexplorer.model.WrapDatabaseObject) WrapObject(com.twinsoft.convertigo.engine.studio.views.projectexplorer.model.WrapObject) WrapDatabaseObject(com.twinsoft.convertigo.engine.studio.views.projectexplorer.model.WrapDatabaseObject)

Aggregations

WrapDatabaseObject (com.twinsoft.convertigo.engine.studio.views.projectexplorer.model.WrapDatabaseObject)29 WrapObject (com.twinsoft.convertigo.engine.studio.views.projectexplorer.model.WrapObject)20 ProjectView (com.twinsoft.convertigo.engine.studio.views.projectexplorer.model.ProjectView)5 DatabaseObject (com.twinsoft.convertigo.beans.core.DatabaseObject)4 Sequence (com.twinsoft.convertigo.beans.core.Sequence)4 Step (com.twinsoft.convertigo.beans.core.Step)4 SequenceView (com.twinsoft.convertigo.engine.studio.views.projectexplorer.model.SequenceView)4 Connector (com.twinsoft.convertigo.beans.core.Connector)3 Transaction (com.twinsoft.convertigo.beans.core.Transaction)3 ConnectorEditorWrap (com.twinsoft.convertigo.engine.studio.editors.connectors.ConnectorEditorWrap)3 ExtractionRule (com.twinsoft.convertigo.beans.core.ExtractionRule)2 Listener (com.twinsoft.convertigo.beans.core.Listener)2 Statement (com.twinsoft.convertigo.beans.core.Statement)2 RouteActionComponent (com.twinsoft.convertigo.beans.mobile.components.RouteActionComponent)2 RouteComponent (com.twinsoft.convertigo.beans.mobile.components.RouteComponent)2 RouteEventComponent (com.twinsoft.convertigo.beans.mobile.components.RouteEventComponent)2 UIComponent (com.twinsoft.convertigo.beans.mobile.components.UIComponent)2 EngineException (com.twinsoft.convertigo.engine.EngineException)2 SequenceEditorWrap (com.twinsoft.convertigo.engine.studio.editors.sequences.SequenceEditorWrap)2 ConnectorView (com.twinsoft.convertigo.engine.studio.views.projectexplorer.model.ConnectorView)2