Search in sources :

Example 16 with WrapDatabaseObject

use of com.twinsoft.convertigo.engine.studio.views.projectexplorer.model.WrapDatabaseObject in project convertigo by convertigo.

the class DatabaseObjectDeleteAction method delete.

private void delete(WrapDatabaseObject treeObject) throws ConvertigoException, IOException {
    WrapDatabaseObject parentTreeObject = null;
    WrapObject treeParent = treeObject.getParent();
    DatabaseObject databaseObject = (DatabaseObject) treeObject.getObject();
    DatabaseObject parent = databaseObject.getParent();
    while ((treeParent != null) && (!(treeParent instanceof WrapDatabaseObject))) {
        treeParent = treeParent.getParent();
    }
    if (treeParent != null) {
        parentTreeObject = (WrapDatabaseObject) treeParent;
    }
    delete(databaseObject);
    // Do not save after a deletion anymore
    if (parent != null) {
        parentTreeObject.hasBeenModified(true);
    }
    if ((parentTreeObject != null) && !treeNodesToUpdate.contains(parentTreeObject)) {
        treeNodesToUpdate.add(parentTreeObject);
    }
}
Also used : WrapObject(com.twinsoft.convertigo.engine.studio.views.projectexplorer.model.WrapObject) DatabaseObject(com.twinsoft.convertigo.beans.core.DatabaseObject) WrapDatabaseObject(com.twinsoft.convertigo.engine.studio.views.projectexplorer.model.WrapDatabaseObject) WrapDatabaseObject(com.twinsoft.convertigo.engine.studio.views.projectexplorer.model.WrapDatabaseObject)

Example 17 with WrapDatabaseObject

use of com.twinsoft.convertigo.engine.studio.views.projectexplorer.model.WrapDatabaseObject in project convertigo by convertigo.

the class DisableExtractionRuleAction 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(ExtractionRule.class)) {
                // StepView stepTreeObject = (StepView) treeObject;
                ExtractionRule extractionRule = (ExtractionRule) treeObject.getObject();
                extractionRule.setEnabled(false);
            // 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) ExtractionRule(com.twinsoft.convertigo.beans.core.ExtractionRule) WrapDatabaseObject(com.twinsoft.convertigo.engine.studio.views.projectexplorer.model.WrapDatabaseObject)

Example 18 with WrapDatabaseObject

use of com.twinsoft.convertigo.engine.studio.views.projectexplorer.model.WrapDatabaseObject in project convertigo by convertigo.

the class DisableListenerAction 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(Listener.class)) {
                // StepView stepTreeObject = (StepView) treeObject;
                Listener listener = (Listener) treeObject.getObject();
                listener.setEnabled(false);
            // 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 : Listener(com.twinsoft.convertigo.beans.core.Listener) WrapObject(com.twinsoft.convertigo.engine.studio.views.projectexplorer.model.WrapObject) WrapDatabaseObject(com.twinsoft.convertigo.engine.studio.views.projectexplorer.model.WrapDatabaseObject)

Example 19 with WrapDatabaseObject

use of com.twinsoft.convertigo.engine.studio.views.projectexplorer.model.WrapDatabaseObject in project convertigo by convertigo.

the class DisableMobileRouteActionComponentAction 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(RouteActionComponent.class)) {
                // StepView stepTreeObject = (StepView) treeObject;
                RouteActionComponent component = (RouteActionComponent) treeObject.getObject();
                component.setEnabled(false);
            // 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 : RouteActionComponent(com.twinsoft.convertigo.beans.mobile.components.RouteActionComponent) WrapObject(com.twinsoft.convertigo.engine.studio.views.projectexplorer.model.WrapObject) WrapDatabaseObject(com.twinsoft.convertigo.engine.studio.views.projectexplorer.model.WrapDatabaseObject)

Example 20 with WrapDatabaseObject

use of com.twinsoft.convertigo.engine.studio.views.projectexplorer.model.WrapDatabaseObject in project convertigo by convertigo.

the class DisableMobileRouteComponentAction 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(RouteComponent.class)) {
                // StepView stepTreeObject = (StepView) treeObject;
                RouteComponent component = (RouteComponent) treeObject.getObject();
                component.setEnabled(false);
            // 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 : RouteComponent(com.twinsoft.convertigo.beans.mobile.components.RouteComponent) 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