Search in sources :

Example 16 with ActionModel

use of com.twinsoft.convertigo.engine.studio.ActionModel in project convertigo by convertigo.

the class ChangeToFormParameterAction method selectionChanged.

@Override
public void selectionChanged(IAction action, ISelection selection) {
    super.selectionChanged(action, selection);
    IStructuredSelection structuredSelection = (IStructuredSelection) selection;
    TreeObject treeObject = (TreeObject) structuredSelection.getFirstElement();
    if (treeObject != null) {
        DatabaseObject dbo = (DatabaseObject) treeObject.getObject();
        ActionModel actionModel = DatabaseObjectsAction.selectionChanged(getClass().getName(), dbo);
        action.setEnabled(actionModel.isEnabled);
    }
}
Also used : TreeObject(com.twinsoft.convertigo.eclipse.views.projectexplorer.model.TreeObject) UrlMappingParameterTreeObject(com.twinsoft.convertigo.eclipse.views.projectexplorer.model.UrlMappingParameterTreeObject) DatabaseObjectTreeObject(com.twinsoft.convertigo.eclipse.views.projectexplorer.model.DatabaseObjectTreeObject) DatabaseObject(com.twinsoft.convertigo.beans.core.DatabaseObject) IStructuredSelection(org.eclipse.jface.viewers.IStructuredSelection) ActionModel(com.twinsoft.convertigo.engine.studio.ActionModel)

Example 17 with ActionModel

use of com.twinsoft.convertigo.engine.studio.ActionModel in project convertigo by convertigo.

the class ChangeToXMLElementStepAction method selectionChanged.

public void selectionChanged(IAction action, ISelection selection) {
    try {
        boolean enable = false;
        super.selectionChanged(action, selection);
        IStructuredSelection structuredSelection = (IStructuredSelection) selection;
        TreeObject treeObject = (TreeObject) structuredSelection.getFirstElement();
        if (treeObject instanceof DatabaseObjectTreeObject) {
            DatabaseObject dbo = (DatabaseObject) treeObject.getObject();
            ActionModel actionModel = DatabaseObjectsAction.selectionChanged(getClass().getName(), dbo);
            enable = actionModel.isEnabled;
        }
        action.setEnabled(enable);
    } catch (Exception e) {
    }
}
Also used : DatabaseObjectTreeObject(com.twinsoft.convertigo.eclipse.views.projectexplorer.model.DatabaseObjectTreeObject) StepTreeObject(com.twinsoft.convertigo.eclipse.views.projectexplorer.model.StepTreeObject) TreeObject(com.twinsoft.convertigo.eclipse.views.projectexplorer.model.TreeObject) DatabaseObjectTreeObject(com.twinsoft.convertigo.eclipse.views.projectexplorer.model.DatabaseObjectTreeObject) DatabaseObject(com.twinsoft.convertigo.beans.core.DatabaseObject) IStructuredSelection(org.eclipse.jface.viewers.IStructuredSelection) ActionModel(com.twinsoft.convertigo.engine.studio.ActionModel) EngineException(com.twinsoft.convertigo.engine.EngineException)

Example 18 with ActionModel

use of com.twinsoft.convertigo.engine.studio.ActionModel in project convertigo by convertigo.

the class ChangeToXMLAttributeStepAction method selectionChanged.

public void selectionChanged(IAction action, ISelection selection) {
    try {
        boolean enable = false;
        super.selectionChanged(action, selection);
        IStructuredSelection structuredSelection = (IStructuredSelection) selection;
        TreeObject treeObject = (TreeObject) structuredSelection.getFirstElement();
        if (treeObject instanceof DatabaseObjectTreeObject) {
            DatabaseObject dbo = (DatabaseObject) treeObject.getObject();
            ActionModel actionModel = DatabaseObjectsAction.selectionChanged(getClass().getName(), dbo);
            enable = actionModel.isEnabled;
        }
        action.setEnabled(enable);
    } catch (Exception e) {
    }
}
Also used : DatabaseObjectTreeObject(com.twinsoft.convertigo.eclipse.views.projectexplorer.model.DatabaseObjectTreeObject) TreeObject(com.twinsoft.convertigo.eclipse.views.projectexplorer.model.TreeObject) DatabaseObjectTreeObject(com.twinsoft.convertigo.eclipse.views.projectexplorer.model.DatabaseObjectTreeObject) StepTreeObject(com.twinsoft.convertigo.eclipse.views.projectexplorer.model.StepTreeObject) DatabaseObject(com.twinsoft.convertigo.beans.core.DatabaseObject) IStructuredSelection(org.eclipse.jface.viewers.IStructuredSelection) ActionModel(com.twinsoft.convertigo.engine.studio.ActionModel) EngineException(com.twinsoft.convertigo.engine.EngineException)

Example 19 with ActionModel

use of com.twinsoft.convertigo.engine.studio.ActionModel in project convertigo by convertigo.

the class ChangeToQueryParameterAction method selectionChanged.

@Override
public void selectionChanged(IAction action, ISelection selection) {
    super.selectionChanged(action, selection);
    IStructuredSelection structuredSelection = (IStructuredSelection) selection;
    TreeObject treeObject = (TreeObject) structuredSelection.getFirstElement();
    if (treeObject != null) {
        DatabaseObject dbo = (DatabaseObject) treeObject.getObject();
        ActionModel actionModel = DatabaseObjectsAction.selectionChanged(getClass().getName(), dbo);
        action.setEnabled(actionModel.isEnabled);
    }
}
Also used : TreeObject(com.twinsoft.convertigo.eclipse.views.projectexplorer.model.TreeObject) UrlMappingParameterTreeObject(com.twinsoft.convertigo.eclipse.views.projectexplorer.model.UrlMappingParameterTreeObject) DatabaseObjectTreeObject(com.twinsoft.convertigo.eclipse.views.projectexplorer.model.DatabaseObjectTreeObject) DatabaseObject(com.twinsoft.convertigo.beans.core.DatabaseObject) IStructuredSelection(org.eclipse.jface.viewers.IStructuredSelection) ActionModel(com.twinsoft.convertigo.engine.studio.ActionModel)

Example 20 with ActionModel

use of com.twinsoft.convertigo.engine.studio.ActionModel in project convertigo by convertigo.

the class ChangeToElementStepAction method selectionChanged.

public void selectionChanged(IAction action, ISelection selection) {
    try {
        boolean enable = false;
        super.selectionChanged(action, selection);
        IStructuredSelection structuredSelection = (IStructuredSelection) selection;
        TreeObject treeObject = (TreeObject) structuredSelection.getFirstElement();
        if (treeObject instanceof DatabaseObjectTreeObject) {
            DatabaseObject dbo = (DatabaseObject) treeObject.getObject();
            ActionModel actionModel = DatabaseObjectsAction.selectionChanged(getClass().getName(), dbo);
            enable = actionModel.isEnabled;
        }
        action.setEnabled(enable);
    } catch (Exception e) {
    }
}
Also used : DatabaseObjectTreeObject(com.twinsoft.convertigo.eclipse.views.projectexplorer.model.DatabaseObjectTreeObject) StepTreeObject(com.twinsoft.convertigo.eclipse.views.projectexplorer.model.StepTreeObject) TreeObject(com.twinsoft.convertigo.eclipse.views.projectexplorer.model.TreeObject) DatabaseObjectTreeObject(com.twinsoft.convertigo.eclipse.views.projectexplorer.model.DatabaseObjectTreeObject) DatabaseObject(com.twinsoft.convertigo.beans.core.DatabaseObject) IStructuredSelection(org.eclipse.jface.viewers.IStructuredSelection) ActionModel(com.twinsoft.convertigo.engine.studio.ActionModel) EngineException(com.twinsoft.convertigo.engine.EngineException)

Aggregations

ActionModel (com.twinsoft.convertigo.engine.studio.ActionModel)35 DatabaseObject (com.twinsoft.convertigo.beans.core.DatabaseObject)33 TreeObject (com.twinsoft.convertigo.eclipse.views.projectexplorer.model.TreeObject)33 IStructuredSelection (org.eclipse.jface.viewers.IStructuredSelection)33 DatabaseObjectTreeObject (com.twinsoft.convertigo.eclipse.views.projectexplorer.model.DatabaseObjectTreeObject)22 ObjectsFolderTreeObject (com.twinsoft.convertigo.eclipse.views.projectexplorer.model.ObjectsFolderTreeObject)11 StepTreeObject (com.twinsoft.convertigo.eclipse.views.projectexplorer.model.StepTreeObject)4 UrlMappingParameterTreeObject (com.twinsoft.convertigo.eclipse.views.projectexplorer.model.UrlMappingParameterTreeObject)4 EngineException (com.twinsoft.convertigo.engine.EngineException)4 MobilePageComponentTreeObject (com.twinsoft.convertigo.eclipse.views.projectexplorer.model.MobilePageComponentTreeObject)3 NgxPageComponentTreeObject (com.twinsoft.convertigo.eclipse.views.projectexplorer.model.NgxPageComponentTreeObject)3 TransactionTreeObject (com.twinsoft.convertigo.eclipse.views.projectexplorer.model.TransactionTreeObject)3 TreeParent (com.twinsoft.convertigo.eclipse.views.projectexplorer.TreeParent)2 ProjectTreeObject (com.twinsoft.convertigo.eclipse.views.projectexplorer.model.ProjectTreeObject)2 ConnectorTreeObject (com.twinsoft.convertigo.eclipse.views.projectexplorer.model.ConnectorTreeObject)1 IEditableTreeObject (com.twinsoft.convertigo.eclipse.views.projectexplorer.model.IEditableTreeObject)1 MobileComponentTreeObject (com.twinsoft.convertigo.eclipse.views.projectexplorer.model.MobileComponentTreeObject)1 NgxComponentTreeObject (com.twinsoft.convertigo.eclipse.views.projectexplorer.model.NgxComponentTreeObject)1 NoSuchElementException (java.util.NoSuchElementException)1 Element (org.w3c.dom.Element)1