Search in sources :

Example 16 with SequenceTreeObject

use of com.twinsoft.convertigo.eclipse.views.projectexplorer.model.SequenceTreeObject in project convertigo by convertigo.

the class OpenFlowViewerAction method run.

@Override
public void run() {
    Display display = Display.getDefault();
    Cursor waitCursor = new Cursor(display, SWT.CURSOR_WAIT);
    Shell shell = getParentShell();
    shell.setCursor(waitCursor);
    try {
        ProjectExplorerView explorerView = getProjectExplorerView();
        if (explorerView != null) {
            TreeObject treeObject = explorerView.getFirstSelectedTreeObject();
            if ((treeObject != null) && (treeObject instanceof SequenceTreeObject)) {
                SequenceTreeObject sequenceTreeObject = (SequenceTreeObject) treeObject;
                Sequence sequence = sequenceTreeObject.getObject();
                ConvertigoPlugin.getDefault().openFlowViewerEditor(sequence);
            }
        }
    } catch (NoSuchElementException e) {
        ConvertigoPlugin.logException(e, "No previous XML file found");
    } catch (Throwable e) {
        ConvertigoPlugin.logException(e, "Unable to execute the selected sequence!");
    } finally {
        shell.setCursor(null);
        waitCursor.dispose();
    }
}
Also used : Shell(org.eclipse.swt.widgets.Shell) ProjectExplorerView(com.twinsoft.convertigo.eclipse.views.projectexplorer.ProjectExplorerView) SequenceTreeObject(com.twinsoft.convertigo.eclipse.views.projectexplorer.model.SequenceTreeObject) SequenceTreeObject(com.twinsoft.convertigo.eclipse.views.projectexplorer.model.SequenceTreeObject) TreeObject(com.twinsoft.convertigo.eclipse.views.projectexplorer.model.TreeObject) Sequence(com.twinsoft.convertigo.beans.core.Sequence) Cursor(org.eclipse.swt.graphics.Cursor) NoSuchElementException(java.util.NoSuchElementException) Display(org.eclipse.swt.widgets.Display)

Example 17 with SequenceTreeObject

use of com.twinsoft.convertigo.eclipse.views.projectexplorer.model.SequenceTreeObject in project convertigo by convertigo.

the class SequenceExecuteSelectedFromStubAction method openEditors.

protected void openEditors(ProjectExplorerView explorerView, TreeObject treeObject) {
    if (treeObject instanceof SequenceTreeObject) {
        SequenceTreeObject sequenceTreeObject = (SequenceTreeObject) treeObject;
        openEditors(explorerView, sequenceTreeObject.getObject().getSteps());
        // open sequence editor
        sequenceTreeObject.openSequenceEditor();
    }
}
Also used : SequenceTreeObject(com.twinsoft.convertigo.eclipse.views.projectexplorer.model.SequenceTreeObject)

Aggregations

SequenceTreeObject (com.twinsoft.convertigo.eclipse.views.projectexplorer.model.SequenceTreeObject)17 Sequence (com.twinsoft.convertigo.beans.core.Sequence)13 ProjectExplorerView (com.twinsoft.convertigo.eclipse.views.projectexplorer.ProjectExplorerView)10 TreeObject (com.twinsoft.convertigo.eclipse.views.projectexplorer.model.TreeObject)10 Shell (org.eclipse.swt.widgets.Shell)10 ProjectTreeObject (com.twinsoft.convertigo.eclipse.views.projectexplorer.model.ProjectTreeObject)9 Cursor (org.eclipse.swt.graphics.Cursor)9 Display (org.eclipse.swt.widgets.Display)9 ConnectorTreeObject (com.twinsoft.convertigo.eclipse.views.projectexplorer.model.ConnectorTreeObject)8 UnloadedProjectTreeObject (com.twinsoft.convertigo.eclipse.views.projectexplorer.model.UnloadedProjectTreeObject)7 Step (com.twinsoft.convertigo.beans.core.Step)6 DatabaseObjectTreeObject (com.twinsoft.convertigo.eclipse.views.projectexplorer.model.DatabaseObjectTreeObject)6 TransactionTreeObject (com.twinsoft.convertigo.eclipse.views.projectexplorer.model.TransactionTreeObject)5 Connector (com.twinsoft.convertigo.beans.core.Connector)4 DatabaseObject (com.twinsoft.convertigo.beans.core.DatabaseObject)4 StepWithExpressions (com.twinsoft.convertigo.beans.core.StepWithExpressions)4 TestCaseTreeObject (com.twinsoft.convertigo.eclipse.views.projectexplorer.model.TestCaseTreeObject)4 EngineException (com.twinsoft.convertigo.engine.EngineException)4 SequenceEditor (com.twinsoft.convertigo.eclipse.editors.sequence.SequenceEditor)3 CriteriaTreeObject (com.twinsoft.convertigo.eclipse.views.projectexplorer.model.CriteriaTreeObject)3