Search in sources :

Example 1 with IEditableTreeObject

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

the class ProjectExplorerView method makeActions.

private void makeActions() {
    tracePlayAction = new TracePlayAction();
    doubleClickAction = new Action() {

        @Override
        public void run() {
            IStructuredSelection selection = (IStructuredSelection) viewer.getSelection();
            TreeObject treeObject = (TreeObject) selection.getFirstElement();
            if (treeObject instanceof UnloadedProjectTreeObject) {
                loadProject((UnloadedProjectTreeObject) treeObject);
            } else if (treeObject instanceof ConnectorTreeObject) {
                ((ConnectorTreeObject) treeObject).launchEditor();
            } else if (treeObject instanceof SequenceTreeObject) {
                ((SequenceTreeObject) treeObject).launchEditor();
            } else if (treeObject instanceof StepTreeObject) {
                showStepInPickerAction.run();
                if (treeObject instanceof IEditableTreeObject) {
                    ((IEditableTreeObject) treeObject).launchEditor(null);
                }
            } else if (treeObject instanceof VariableTreeObject2) {
                if (treeObject.getObject() instanceof StepVariable) {
                    showStepInPickerAction.run();
                }
            } else if (treeObject instanceof IEditableTreeObject) {
                ((IEditableTreeObject) treeObject).launchEditor(null);
            } else if (treeObject instanceof TraceTreeObject) {
                tracePlayAction.run();
            }
        }
    };
    undoAction = new UndoAction();
    redoAction = new RedoAction();
    copyAction = new ClipboardCopyAction();
    cutAction = new ClipboardCutAction();
    pasteAction = new ClipboardPasteAction();
    deleteDatabaseObjectAction = new DatabaseObjectDeleteAction();
    deletePropertyTableRowAction = new DeletePropertyTableRowAction();
    deletePropertyTableColumnAction = new DeletePropertyTableColumnAction();
    projectExplorerSaveAllAction = new ProjectExplorerSaveAllAction();
    decreasePriorityAction = new DatabaseObjectDecreasePriorityAction();
    increasePriorityAction = new DatabaseObjectIncreasePriorityAction();
    executeTransaction = new TransactionExecuteSelectedAction();
    executeDefaultTransaction = new TransactionExecuteDefaultAction();
    transactionEditHandlersAction = new TransactionEditHandlersAction();
    executeSequence = new SequenceExecuteSelectedAction();
    executeTestCase = new TestCaseExecuteSelectedAction();
    showStepInPickerAction = new ShowStepInPickerAction();
}
Also used : DatabaseObjectDeleteAction(com.twinsoft.convertigo.eclipse.popup.actions.DatabaseObjectDeleteAction) DeletePropertyTableRowAction(com.twinsoft.convertigo.eclipse.popup.actions.DeletePropertyTableRowAction) DatabaseObjectDecreasePriorityAction(com.twinsoft.convertigo.eclipse.popup.actions.DatabaseObjectDecreasePriorityAction) TestCaseExecuteSelectedAction(com.twinsoft.convertigo.eclipse.popup.actions.TestCaseExecuteSelectedAction) TransactionEditHandlersAction(com.twinsoft.convertigo.eclipse.popup.actions.TransactionEditHandlersAction) Action(org.eclipse.jface.action.Action) TracePlayAction(com.twinsoft.convertigo.eclipse.popup.actions.TracePlayAction) TransactionExecuteSelectedAction(com.twinsoft.convertigo.eclipse.popup.actions.TransactionExecuteSelectedAction) ClipboardCopyAction(com.twinsoft.convertigo.eclipse.popup.actions.ClipboardCopyAction) DeletePropertyTableColumnAction(com.twinsoft.convertigo.eclipse.popup.actions.DeletePropertyTableColumnAction) ClipboardPasteAction(com.twinsoft.convertigo.eclipse.popup.actions.ClipboardPasteAction) SequenceExecuteSelectedAction(com.twinsoft.convertigo.eclipse.popup.actions.SequenceExecuteSelectedAction) DatabaseObjectIncreasePriorityAction(com.twinsoft.convertigo.eclipse.popup.actions.DatabaseObjectIncreasePriorityAction) ShowStepInPickerAction(com.twinsoft.convertigo.eclipse.popup.actions.ShowStepInPickerAction) ClipboardCutAction(com.twinsoft.convertigo.eclipse.popup.actions.ClipboardCutAction) UndoAction(com.twinsoft.convertigo.eclipse.popup.actions.UndoAction) RedoAction(com.twinsoft.convertigo.eclipse.popup.actions.RedoAction) ProjectExplorerSaveAllAction(com.twinsoft.convertigo.eclipse.actions.ProjectExplorerSaveAllAction) TransactionExecuteDefaultAction(com.twinsoft.convertigo.eclipse.popup.actions.TransactionExecuteDefaultAction) TestCaseExecuteSelectedAction(com.twinsoft.convertigo.eclipse.popup.actions.TestCaseExecuteSelectedAction) StepTreeObject(com.twinsoft.convertigo.eclipse.views.projectexplorer.model.StepTreeObject) DatabaseObjectIncreasePriorityAction(com.twinsoft.convertigo.eclipse.popup.actions.DatabaseObjectIncreasePriorityAction) IStructuredSelection(org.eclipse.jface.viewers.IStructuredSelection) StepVariable(com.twinsoft.convertigo.beans.variables.StepVariable) ClipboardPasteAction(com.twinsoft.convertigo.eclipse.popup.actions.ClipboardPasteAction) DatabaseObjectDeleteAction(com.twinsoft.convertigo.eclipse.popup.actions.DatabaseObjectDeleteAction) DeletePropertyTableRowAction(com.twinsoft.convertigo.eclipse.popup.actions.DeletePropertyTableRowAction) ClipboardCopyAction(com.twinsoft.convertigo.eclipse.popup.actions.ClipboardCopyAction) SequenceExecuteSelectedAction(com.twinsoft.convertigo.eclipse.popup.actions.SequenceExecuteSelectedAction) RedoAction(com.twinsoft.convertigo.eclipse.popup.actions.RedoAction) VariableTreeObject2(com.twinsoft.convertigo.eclipse.views.projectexplorer.model.VariableTreeObject2) TransactionExecuteSelectedAction(com.twinsoft.convertigo.eclipse.popup.actions.TransactionExecuteSelectedAction) DatabaseObjectDecreasePriorityAction(com.twinsoft.convertigo.eclipse.popup.actions.DatabaseObjectDecreasePriorityAction) SequenceTreeObject(com.twinsoft.convertigo.eclipse.views.projectexplorer.model.SequenceTreeObject) TransactionExecuteDefaultAction(com.twinsoft.convertigo.eclipse.popup.actions.TransactionExecuteDefaultAction) ProjectExplorerSaveAllAction(com.twinsoft.convertigo.eclipse.actions.ProjectExplorerSaveAllAction) TracePlayAction(com.twinsoft.convertigo.eclipse.popup.actions.TracePlayAction) IEditableTreeObject(com.twinsoft.convertigo.eclipse.views.projectexplorer.model.IEditableTreeObject) ShowStepInPickerAction(com.twinsoft.convertigo.eclipse.popup.actions.ShowStepInPickerAction) ConnectorTreeObject(com.twinsoft.convertigo.eclipse.views.projectexplorer.model.ConnectorTreeObject) ClipboardCutAction(com.twinsoft.convertigo.eclipse.popup.actions.ClipboardCutAction) UnloadedProjectTreeObject(com.twinsoft.convertigo.eclipse.views.projectexplorer.model.UnloadedProjectTreeObject) DeletePropertyTableColumnAction(com.twinsoft.convertigo.eclipse.popup.actions.DeletePropertyTableColumnAction) TransactionEditHandlersAction(com.twinsoft.convertigo.eclipse.popup.actions.TransactionEditHandlersAction) UrlMappingParameterTreeObject(com.twinsoft.convertigo.eclipse.views.projectexplorer.model.UrlMappingParameterTreeObject) MobileApplicationTreeObject(com.twinsoft.convertigo.eclipse.views.projectexplorer.model.MobileApplicationTreeObject) IClosableTreeObject(com.twinsoft.convertigo.eclipse.views.projectexplorer.model.IClosableTreeObject) XMLRecordDescriptionTreeObject(com.twinsoft.convertigo.eclipse.views.projectexplorer.model.XMLRecordDescriptionTreeObject) DesignDocumentValidateTreeObject(com.twinsoft.convertigo.eclipse.views.projectexplorer.model.DesignDocumentValidateTreeObject) UrlMappingTreeObject(com.twinsoft.convertigo.eclipse.views.projectexplorer.model.UrlMappingTreeObject) DesignDocumentUpdateTreeObject(com.twinsoft.convertigo.eclipse.views.projectexplorer.model.DesignDocumentUpdateTreeObject) DesignDocumentTreeObject(com.twinsoft.convertigo.eclipse.views.projectexplorer.model.DesignDocumentTreeObject) MobileApplicationComponentTreeObject(com.twinsoft.convertigo.eclipse.views.projectexplorer.model.MobileApplicationComponentTreeObject) UrlMappingOperationTreeObject(com.twinsoft.convertigo.eclipse.views.projectexplorer.model.UrlMappingOperationTreeObject) ReferenceTreeObject(com.twinsoft.convertigo.eclipse.views.projectexplorer.model.ReferenceTreeObject) HandlersDeclarationTreeObject(com.twinsoft.convertigo.eclipse.views.projectexplorer.model.HandlersDeclarationTreeObject) UrlMappingResponseTreeObject(com.twinsoft.convertigo.eclipse.views.projectexplorer.model.UrlMappingResponseTreeObject) UnloadedProjectTreeObject(com.twinsoft.convertigo.eclipse.views.projectexplorer.model.UnloadedProjectTreeObject) NgxUIComponentTreeObject(com.twinsoft.convertigo.eclipse.views.projectexplorer.model.NgxUIComponentTreeObject) MobileUIComponentTreeObject(com.twinsoft.convertigo.eclipse.views.projectexplorer.model.MobileUIComponentTreeObject) CriteriaTreeObject(com.twinsoft.convertigo.eclipse.views.projectexplorer.model.CriteriaTreeObject) IPropertyTreeObject(com.twinsoft.convertigo.eclipse.views.projectexplorer.model.IPropertyTreeObject) UrlAuthenticationTreeObject(com.twinsoft.convertigo.eclipse.views.projectexplorer.model.UrlAuthenticationTreeObject) SequenceTreeObject(com.twinsoft.convertigo.eclipse.views.projectexplorer.model.SequenceTreeObject) MobileRouteActionComponentTreeObject(com.twinsoft.convertigo.eclipse.views.projectexplorer.model.MobileRouteActionComponentTreeObject) ListenerTreeObject(com.twinsoft.convertigo.eclipse.views.projectexplorer.model.ListenerTreeObject) TransactionTreeObject(com.twinsoft.convertigo.eclipse.views.projectexplorer.model.TransactionTreeObject) PropertyTableTreeObject(com.twinsoft.convertigo.eclipse.views.projectexplorer.model.PropertyTableTreeObject) FullSyncListenerTreeObject(com.twinsoft.convertigo.eclipse.views.projectexplorer.model.FullSyncListenerTreeObject) DatabaseObjectTreeObject(com.twinsoft.convertigo.eclipse.views.projectexplorer.model.DatabaseObjectTreeObject) ConnectorTreeObject(com.twinsoft.convertigo.eclipse.views.projectexplorer.model.ConnectorTreeObject) IDesignTreeObject(com.twinsoft.convertigo.eclipse.views.projectexplorer.model.IDesignTreeObject) ScreenClassTreeObject(com.twinsoft.convertigo.eclipse.views.projectexplorer.model.ScreenClassTreeObject) StatementTreeObject(com.twinsoft.convertigo.eclipse.views.projectexplorer.model.StatementTreeObject) NgxApplicationComponentTreeObject(com.twinsoft.convertigo.eclipse.views.projectexplorer.model.NgxApplicationComponentTreeObject) MobileRouteEventComponentTreeObject(com.twinsoft.convertigo.eclipse.views.projectexplorer.model.MobileRouteEventComponentTreeObject) PropertyTableRowTreeObject(com.twinsoft.convertigo.eclipse.views.projectexplorer.model.PropertyTableRowTreeObject) IEditableTreeObject(com.twinsoft.convertigo.eclipse.views.projectexplorer.model.IEditableTreeObject) XMLTableDescriptionTreeObject(com.twinsoft.convertigo.eclipse.views.projectexplorer.model.XMLTableDescriptionTreeObject) ProjectTreeObject(com.twinsoft.convertigo.eclipse.views.projectexplorer.model.ProjectTreeObject) DesignDocumentViewTreeObject(com.twinsoft.convertigo.eclipse.views.projectexplorer.model.DesignDocumentViewTreeObject) TemplateTreeObject(com.twinsoft.convertigo.eclipse.views.projectexplorer.model.TemplateTreeObject) TestCaseTreeObject(com.twinsoft.convertigo.eclipse.views.projectexplorer.model.TestCaseTreeObject) ObjectsFolderTreeObject(com.twinsoft.convertigo.eclipse.views.projectexplorer.model.ObjectsFolderTreeObject) PropertyTableColumnTreeObject(com.twinsoft.convertigo.eclipse.views.projectexplorer.model.PropertyTableColumnTreeObject) DesignDocumentFilterTreeObject(com.twinsoft.convertigo.eclipse.views.projectexplorer.model.DesignDocumentFilterTreeObject) VariableTreeObject(com.twinsoft.convertigo.eclipse.views.projectexplorer.model.VariableTreeObject) DesignDocumentFunctionTreeObject(com.twinsoft.convertigo.eclipse.views.projectexplorer.model.DesignDocumentFunctionTreeObject) MobilePlatformTreeObject(com.twinsoft.convertigo.eclipse.views.projectexplorer.model.MobilePlatformTreeObject) ExtractionRuleTreeObject(com.twinsoft.convertigo.eclipse.views.projectexplorer.model.ExtractionRuleTreeObject) MobileRouteComponentTreeObject(com.twinsoft.convertigo.eclipse.views.projectexplorer.model.MobileRouteComponentTreeObject) SheetTreeObject(com.twinsoft.convertigo.eclipse.views.projectexplorer.model.SheetTreeObject) UrlMapperTreeObject(com.twinsoft.convertigo.eclipse.views.projectexplorer.model.UrlMapperTreeObject) StepTreeObject(com.twinsoft.convertigo.eclipse.views.projectexplorer.model.StepTreeObject) NgxPageComponentTreeObject(com.twinsoft.convertigo.eclipse.views.projectexplorer.model.NgxPageComponentTreeObject) MobilePageComponentTreeObject(com.twinsoft.convertigo.eclipse.views.projectexplorer.model.MobilePageComponentTreeObject) TreeObject(com.twinsoft.convertigo.eclipse.views.projectexplorer.model.TreeObject) TraceTreeObject(com.twinsoft.convertigo.eclipse.views.projectexplorer.model.TraceTreeObject) DocumentTreeObject(com.twinsoft.convertigo.eclipse.views.projectexplorer.model.DocumentTreeObject) TraceTreeObject(com.twinsoft.convertigo.eclipse.views.projectexplorer.model.TraceTreeObject) UndoAction(com.twinsoft.convertigo.eclipse.popup.actions.UndoAction)

Example 2 with IEditableTreeObject

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

the class TransactionEditHandlersAction method run.

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) {
            Object treeObject = explorerView.getFirstSelectedTreeObject();
            if (treeObject instanceof TransactionTreeObject)
                ((IEditableTreeObject) treeObject).launchEditor("JscriptTransactionEditor");
        }
    } catch (Throwable e) {
        ConvertigoPlugin.logException(e, "Unable to edit the transaction!");
    } finally {
        shell.setCursor(null);
        waitCursor.dispose();
    }
}
Also used : TransactionTreeObject(com.twinsoft.convertigo.eclipse.views.projectexplorer.model.TransactionTreeObject) Shell(org.eclipse.swt.widgets.Shell) ProjectExplorerView(com.twinsoft.convertigo.eclipse.views.projectexplorer.ProjectExplorerView) DatabaseObject(com.twinsoft.convertigo.beans.core.DatabaseObject) TreeObject(com.twinsoft.convertigo.eclipse.views.projectexplorer.model.TreeObject) TransactionTreeObject(com.twinsoft.convertigo.eclipse.views.projectexplorer.model.TransactionTreeObject) IEditableTreeObject(com.twinsoft.convertigo.eclipse.views.projectexplorer.model.IEditableTreeObject) Cursor(org.eclipse.swt.graphics.Cursor) Display(org.eclipse.swt.widgets.Display)

Example 3 with IEditableTreeObject

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

the class SheetEditAction method run.

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) {
            Object treeObject = explorerView.getFirstSelectedTreeObject();
            ((IEditableTreeObject) treeObject).launchEditor(null);
        }
    } catch (Throwable e) {
        ConvertigoPlugin.logException(e, "Unable to edit the sheet!");
    } finally {
        shell.setCursor(null);
        waitCursor.dispose();
    }
}
Also used : Shell(org.eclipse.swt.widgets.Shell) ProjectExplorerView(com.twinsoft.convertigo.eclipse.views.projectexplorer.ProjectExplorerView) IEditableTreeObject(com.twinsoft.convertigo.eclipse.views.projectexplorer.model.IEditableTreeObject) Cursor(org.eclipse.swt.graphics.Cursor) Display(org.eclipse.swt.widgets.Display) IEditableTreeObject(com.twinsoft.convertigo.eclipse.views.projectexplorer.model.IEditableTreeObject)

Aggregations

IEditableTreeObject (com.twinsoft.convertigo.eclipse.views.projectexplorer.model.IEditableTreeObject)3 ProjectExplorerView (com.twinsoft.convertigo.eclipse.views.projectexplorer.ProjectExplorerView)2 TransactionTreeObject (com.twinsoft.convertigo.eclipse.views.projectexplorer.model.TransactionTreeObject)2 TreeObject (com.twinsoft.convertigo.eclipse.views.projectexplorer.model.TreeObject)2 Cursor (org.eclipse.swt.graphics.Cursor)2 Display (org.eclipse.swt.widgets.Display)2 Shell (org.eclipse.swt.widgets.Shell)2 DatabaseObject (com.twinsoft.convertigo.beans.core.DatabaseObject)1 StepVariable (com.twinsoft.convertigo.beans.variables.StepVariable)1 ProjectExplorerSaveAllAction (com.twinsoft.convertigo.eclipse.actions.ProjectExplorerSaveAllAction)1 ClipboardCopyAction (com.twinsoft.convertigo.eclipse.popup.actions.ClipboardCopyAction)1 ClipboardCutAction (com.twinsoft.convertigo.eclipse.popup.actions.ClipboardCutAction)1 ClipboardPasteAction (com.twinsoft.convertigo.eclipse.popup.actions.ClipboardPasteAction)1 DatabaseObjectDecreasePriorityAction (com.twinsoft.convertigo.eclipse.popup.actions.DatabaseObjectDecreasePriorityAction)1 DatabaseObjectDeleteAction (com.twinsoft.convertigo.eclipse.popup.actions.DatabaseObjectDeleteAction)1 DatabaseObjectIncreasePriorityAction (com.twinsoft.convertigo.eclipse.popup.actions.DatabaseObjectIncreasePriorityAction)1 DeletePropertyTableColumnAction (com.twinsoft.convertigo.eclipse.popup.actions.DeletePropertyTableColumnAction)1 DeletePropertyTableRowAction (com.twinsoft.convertigo.eclipse.popup.actions.DeletePropertyTableRowAction)1 RedoAction (com.twinsoft.convertigo.eclipse.popup.actions.RedoAction)1 SequenceExecuteSelectedAction (com.twinsoft.convertigo.eclipse.popup.actions.SequenceExecuteSelectedAction)1