Search in sources :

Example 1 with CustomDialog

use of com.twinsoft.convertigo.eclipse.dialogs.CustomDialog in project convertigo by convertigo.

the class ClipboardAction method paste.

public void paste(String source, Shell shell, ProjectExplorerView explorerView, TreeObject selectedTreeObject, boolean isDND) throws ConvertigoException, IOException, ParserConfigurationException, SAXException, CoreException {
    if ((explorerView != null) && (selectedTreeObject != null)) {
        TreeObject targetTreeObject = null;
        Object targetObject = null;
        if (selectedTreeObject instanceof FolderTreeObject) {
            if (selectedTreeObject.getParent() instanceof IDesignTreeObject) {
                selectedTreeObject = selectedTreeObject.getParent();
            }
        }
        if (selectedTreeObject instanceof IPropertyTreeObject) {
            targetTreeObject = selectedTreeObject;
            targetObject = selectedTreeObject;
        } else if (selectedTreeObject instanceof IDesignTreeObject) {
            targetTreeObject = selectedTreeObject;
            targetObject = selectedTreeObject;
            if (clipboardManager.objectsType == ProjectExplorerView.TREE_OBJECT_TYPE_DBO_DOCUMENT) {
                targetTreeObject = ((IDesignTreeObject) selectedTreeObject).getTreeObjectOwner();
                targetObject = (DatabaseObject) targetTreeObject.getObject();
            }
        } else {
            // case of folder, retrieve owner object
            targetTreeObject = explorerView.getFirstSelectedDatabaseObjectTreeObject(selectedTreeObject);
            targetObject = (DatabaseObject) targetTreeObject.getObject();
            // i.e. without having to select the parent database object.
            if (clipboardManager.objectsType == ProjectExplorerView.getTreeObjectType(new TreePath(targetTreeObject))) {
                // it must be different from the currently selected object.
                if (clipboardManager.objectsType == ProjectExplorerView.TREE_OBJECT_TYPE_DBO_SCREEN_CLASS) {
                    CustomDialog customDialog = new CustomDialog(shell, "Paste a Screenclass", "Do you want to paste the Screenclass as a sibling or as an inherited ScreenClass?", 500, 150, new ButtonSpec("As a sibling", true), new ButtonSpec("As an iherited", false), new ButtonSpec(IDialogConstants.CANCEL_LABEL, false));
                    int response = customDialog.open();
                    if (response == 0)
                        targetObject = ((DatabaseObject) targetObject).getParent();
                    else if (response == 2)
                        return;
                } else if (clipboardManager.objectsType == ProjectExplorerView.TREE_OBJECT_TYPE_DBO_STATEMENT_WITH_EXPRESSIONS) {
                    if (clipboardManager.objectsType == ProjectExplorerView.TREE_OBJECT_TYPE_FUNCTION) {
                        targetObject = ((DatabaseObject) targetObject).getParent();
                    } else {
                        CustomDialog customDialog = new CustomDialog(shell, "Paste a statement", "Do you want to paste the statement as a sibling or a child statement?", 500, 150, new ButtonSpec("As a sibling", true), new ButtonSpec("As a child", false), new ButtonSpec(IDialogConstants.CANCEL_LABEL, false));
                        int response = customDialog.open();
                        if (response == 0) {
                            targetObject = ((DatabaseObject) targetObject).getParent();
                        } else if (response == 2) {
                            return;
                        }
                    }
                } else if (clipboardManager.objectsType == ProjectExplorerView.TREE_OBJECT_TYPE_DBO_MOBILE_UICOMPONENT) {
                    if (!clipboardManager.isCut) {
                        CustomDialog customDialog = new CustomDialog(shell, "Paste a Component", "Do you want to paste the Component as a sibling or as a child component?", 500, 150, new ButtonSpec("As a sibling", true), new ButtonSpec("As a child", false), new ButtonSpec(IDialogConstants.CANCEL_LABEL, false));
                        int response = customDialog.open();
                        if (response == 0) {
                            targetObject = ((DatabaseObject) targetObject).getParent();
                        } else if (response == 2) {
                            return;
                        }
                    }
                } else if (clipboardManager.objectsType == ProjectExplorerView.TREE_OBJECT_TYPE_DBO_STEP_WITH_EXPRESSIONS || clipboardManager.objectsType == ProjectExplorerView.TREE_OBJECT_TYPE_DBO_STEP) {
                    targetObject = pasteStep(shell, source, (DatabaseObject) targetObject);
                    if (targetObject == null)
                        return;
                } else if (isDND && clipboardManager.objectsType == ProjectExplorerView.TREE_OBJECT_TYPE_DBO_SEQUENCE) {
                // Do not change target to parent
                } else {
                    targetObject = ((DatabaseObject) targetObject).getParent();
                }
                targetTreeObject = explorerView.findTreeObjectByUserObject(((DatabaseObject) targetObject));
            } else {
                if (clipboardManager.objectsType == ProjectExplorerView.TREE_OBJECT_TYPE_DBO_STEP_WITH_EXPRESSIONS || clipboardManager.objectsType == ProjectExplorerView.TREE_OBJECT_TYPE_DBO_STEP) {
                    targetObject = pasteStep(shell, source, (DatabaseObject) targetObject);
                    if (targetObject == null)
                        return;
                }
            }
        }
        if (clipboardManager.isCut) {
            TreeParent targetTreeParent = null;
            String targetPath = targetTreeObject.getPath();
            if (targetTreeObject instanceof DatabaseObjectTreeObject) {
                targetTreeParent = ((DatabaseObjectTreeObject) targetTreeObject).getOwnerDatabaseObjectTreeObject();
            } else if (targetTreeObject instanceof IPropertyTreeObject) {
                targetTreeParent = ((IPropertyTreeObject) targetTreeObject).getTreeObjectOwner();
            } else if (targetTreeObject instanceof IDesignTreeObject) {
                targetTreeParent = ((IDesignTreeObject) targetTreeObject).getTreeObjectOwner();
            }
            for (int i = 0; i < clipboardManager.objects.length; i++) {
                // Cut & paste
                clipboardManager.cutAndPaste(clipboardManager.objects[i], targetTreeObject);
                // Updating the tree
                // Report 4.5: fix #401
                // explorerView.reloadTreeObject(clipboardManager.parentTreeNodeOfCutObjects[i]);
                TreeObject parentTreeNodeOfCutObjects = clipboardManager.parentTreeNodeOfCutObjects[i];
                parentTreeNodeOfCutObjects.getProjectTreeObject().hasBeenModified(true);
                if (!(parentTreeNodeOfCutObjects instanceof IDesignTreeObject)) {
                    explorerView.reloadTreeObject(parentTreeNodeOfCutObjects);
                }
            }
            if (targetTreeObject != null) {
                if (targetTreeObject.getParent() == null)
                    targetTreeObject = explorerView.findTreeObjectByPath(targetTreeParent, targetPath);
                if (targetTreeObject != null)
                    // Report 4.5: fix #401
                    targetTreeObject.getProjectTreeObject().hasBeenModified(true);
            }
            clipboardManager.reset();
        } else if (source != null) {
            // Paste
            clipboardManager.paste(source, targetObject, true);
            // Case of project copy
            if (clipboardManager.objectsType == ProjectExplorerView.TREE_OBJECT_TYPE_DBO_PROJECT) {
                Object[] pastedObjects = clipboardManager.pastedObjects;
                for (int i = 0; i < pastedObjects.length; i++) {
                    Object object = pastedObjects[i];
                    if ((object != null) && (object instanceof Project)) {
                        Project project = (Project) object;
                        String oldName = project.getName();
                        try {
                            Project importedProject = importProjectTempArchive(oldName, explorerView);
                            if (importedProject != null) {
                                String newName = importedProject.getName();
                                explorerView.importProjectTreeObject(newName, true, oldName);
                            } else
                                throw new EngineException("Unable to import project temporary archive");
                        } catch (Exception e) {
                            throw new EngineException("Unable to paste project", e);
                        }
                    }
                }
            }
        }
        // Updating the tree
        if (targetTreeObject != null) {
            TreeObject treeObjectToReload = targetTreeObject;
            TreeObject treeObjectToSelect = targetTreeObject;
            if (targetTreeObject instanceof IPropertyTreeObject) {
                treeObjectToSelect = ((IPropertyTreeObject) targetTreeObject).getTreeObjectOwner();
                treeObjectToReload = treeObjectToSelect;
                if (treeObjectToReload instanceof DatabaseObjectTreeObject) {
                    treeObjectToReload = treeObjectToReload.getParent();
                    if (treeObjectToReload instanceof FolderTreeObject)
                        treeObjectToReload = treeObjectToReload.getParent();
                }
            }
            if (targetTreeObject instanceof IDesignTreeObject) {
                treeObjectToSelect = ((IDesignTreeObject) targetTreeObject).getTreeObjectOwner();
                treeObjectToReload = treeObjectToSelect;
                if (treeObjectToReload instanceof DatabaseObjectTreeObject) {
                    treeObjectToReload = treeObjectToReload.getParent();
                    if (treeObjectToReload instanceof FolderTreeObject)
                        treeObjectToReload = treeObjectToReload.getParent();
                }
            }
            if (treeObjectToReload != null) {
                // explorerView.reloadTreeObject(targetTreeObject);
                // explorerView.setSelectedTreeObject(targetTreeObject);
                explorerView.objectChanged(new CompositeEvent(treeObjectToReload.getObject(), treeObjectToSelect.getPath()));
            }
        }
    }
}
Also used : DatabaseObjectTreeObject(com.twinsoft.convertigo.eclipse.views.projectexplorer.model.DatabaseObjectTreeObject) IDesignTreeObject(com.twinsoft.convertigo.eclipse.views.projectexplorer.model.IDesignTreeObject) TreeParent(com.twinsoft.convertigo.eclipse.views.projectexplorer.TreeParent) EngineException(com.twinsoft.convertigo.engine.EngineException) CoreException(org.eclipse.core.runtime.CoreException) ConvertigoException(com.twinsoft.convertigo.engine.ConvertigoException) IOException(java.io.IOException) ParserConfigurationException(javax.xml.parsers.ParserConfigurationException) SAXException(org.xml.sax.SAXException) EngineException(com.twinsoft.convertigo.engine.EngineException) Project(com.twinsoft.convertigo.beans.core.Project) TreePath(com.twinsoft.convertigo.eclipse.views.projectexplorer.TreePath) CustomDialog(com.twinsoft.convertigo.eclipse.dialogs.CustomDialog) IPropertyTreeObject(com.twinsoft.convertigo.eclipse.views.projectexplorer.model.IPropertyTreeObject) TreeObject(com.twinsoft.convertigo.eclipse.views.projectexplorer.model.TreeObject) DatabaseObjectTreeObject(com.twinsoft.convertigo.eclipse.views.projectexplorer.model.DatabaseObjectTreeObject) ProjectTreeObject(com.twinsoft.convertigo.eclipse.views.projectexplorer.model.ProjectTreeObject) IDesignTreeObject(com.twinsoft.convertigo.eclipse.views.projectexplorer.model.IDesignTreeObject) FolderTreeObject(com.twinsoft.convertigo.eclipse.views.projectexplorer.model.FolderTreeObject) DatabaseObject(com.twinsoft.convertigo.beans.core.DatabaseObject) IPropertyTreeObject(com.twinsoft.convertigo.eclipse.views.projectexplorer.model.IPropertyTreeObject) DatabaseObject(com.twinsoft.convertigo.beans.core.DatabaseObject) TreeObject(com.twinsoft.convertigo.eclipse.views.projectexplorer.model.TreeObject) DatabaseObjectTreeObject(com.twinsoft.convertigo.eclipse.views.projectexplorer.model.DatabaseObjectTreeObject) ProjectTreeObject(com.twinsoft.convertigo.eclipse.views.projectexplorer.model.ProjectTreeObject) IDesignTreeObject(com.twinsoft.convertigo.eclipse.views.projectexplorer.model.IDesignTreeObject) FolderTreeObject(com.twinsoft.convertigo.eclipse.views.projectexplorer.model.FolderTreeObject) FolderTreeObject(com.twinsoft.convertigo.eclipse.views.projectexplorer.model.FolderTreeObject) ButtonSpec(com.twinsoft.convertigo.eclipse.dialogs.ButtonSpec) CompositeEvent(com.twinsoft.convertigo.eclipse.editors.CompositeEvent) IPropertyTreeObject(com.twinsoft.convertigo.eclipse.views.projectexplorer.model.IPropertyTreeObject)

Example 2 with CustomDialog

use of com.twinsoft.convertigo.eclipse.dialogs.CustomDialog in project convertigo by convertigo.

the class ClipboardAction method pasteStep.

private Object pasteStep(Shell shell, String source, DatabaseObject targetObject) throws ParserConfigurationException, SAXException, IOException {
    // Can only paste on Sequence or Step
    if (targetObject instanceof Sequence)
        return targetObject;
    else if (!(targetObject instanceof Step))
        return null;
    // cannot paste to IThenElseContainer
    if (targetObject instanceof IThenElseContainer)
        return null;
    else {
        List<Object> objects = clipboardManager.read(source);
        int size = objects.size();
        for (Object ob : objects) {
            // Can only paste step objects
            if (!(ob instanceof Step))
                return null;
            // Can paste only on step which may contain children
            if ((ob instanceof StepWithExpressions) && (!(targetObject instanceof StepWithExpressions)))
                return null;
            // cannot paste a ThenStep
            if (ob instanceof ThenStep)
                return null;
            // cannot paste a ElseStep
            if (ob instanceof ElseStep)
                return null;
            // cannot paste a ThenStatement
            if (ob instanceof ThenStatement)
                return null;
            // cannot paste a ElseStatement
            if (ob instanceof ElseStatement)
                return null;
            // Special case of XMLElementStep, ElementStep
            if ((targetObject instanceof XMLElementStep) || (targetObject instanceof ElementStep)) {
                // Case paste on itself -> target is changed to parent
                if ((size == 1) && ((ob instanceof XMLElementStep) || (ob instanceof ElementStep))) {
                    if (((Step) ob).getName().equals(targetObject.getName())) {
                        return targetObject.getParent();
                    }
                    return null;
                } else // Else, only accept paste of XMLAttributeStep
                if (!(ob instanceof XMLAttributeStep || ob instanceof AttributeStep)) {
                    return null;
                }
            } else // Case of step which may contain children
            if (targetObject instanceof StepWithExpressions) {
                // Case paste on itself -> ask user what to do
                if ((size == 1) && (ob.getClass().equals(targetObject.getClass()))) {
                    if (((Step) ob).getName().equals(targetObject.getName())) {
                        CustomDialog customDialog = new CustomDialog(shell, "Paste a step", "Do you want to paste the step as a sibling or a child step?", 500, 150, new ButtonSpec("As a sibling", true), new ButtonSpec("As a child", false), new ButtonSpec(IDialogConstants.CANCEL_LABEL, false));
                        int response = customDialog.open();
                        if (response == 0) {
                            return targetObject.getParent();
                        } else if (response == 2) {
                            return null;
                        } else
                            break;
                    }
                }
                // Else, paste
                break;
            } else // Other case
            {
                // Case paste on itself -> target is changed to parent
                if ((size == 1) && (ob.getClass().equals(targetObject.getClass()))) {
                    if (((Step) ob).getName().equals(targetObject.getName())) {
                        return targetObject.getParent();
                    }
                    return null;
                }
                // Else, not permitted
                return null;
            }
        }
    }
    return targetObject;
}
Also used : IThenElseContainer(com.twinsoft.convertigo.beans.steps.IThenElseContainer) ElseStep(com.twinsoft.convertigo.beans.steps.ElseStep) XMLElementStep(com.twinsoft.convertigo.beans.steps.XMLElementStep) StepWithExpressions(com.twinsoft.convertigo.beans.core.StepWithExpressions) ThenStatement(com.twinsoft.convertigo.beans.statements.ThenStatement) Sequence(com.twinsoft.convertigo.beans.core.Sequence) ThenStep(com.twinsoft.convertigo.beans.steps.ThenStep) XMLAttributeStep(com.twinsoft.convertigo.beans.steps.XMLAttributeStep) Step(com.twinsoft.convertigo.beans.core.Step) ElementStep(com.twinsoft.convertigo.beans.steps.ElementStep) XMLElementStep(com.twinsoft.convertigo.beans.steps.XMLElementStep) ElseStep(com.twinsoft.convertigo.beans.steps.ElseStep) AttributeStep(com.twinsoft.convertigo.beans.steps.AttributeStep) XMLAttributeStep(com.twinsoft.convertigo.beans.steps.XMLAttributeStep) ThenStep(com.twinsoft.convertigo.beans.steps.ThenStep) CustomDialog(com.twinsoft.convertigo.eclipse.dialogs.CustomDialog) ElseStatement(com.twinsoft.convertigo.beans.statements.ElseStatement) XMLAttributeStep(com.twinsoft.convertigo.beans.steps.XMLAttributeStep) AttributeStep(com.twinsoft.convertigo.beans.steps.AttributeStep) IPropertyTreeObject(com.twinsoft.convertigo.eclipse.views.projectexplorer.model.IPropertyTreeObject) DatabaseObject(com.twinsoft.convertigo.beans.core.DatabaseObject) TreeObject(com.twinsoft.convertigo.eclipse.views.projectexplorer.model.TreeObject) DatabaseObjectTreeObject(com.twinsoft.convertigo.eclipse.views.projectexplorer.model.DatabaseObjectTreeObject) ProjectTreeObject(com.twinsoft.convertigo.eclipse.views.projectexplorer.model.ProjectTreeObject) IDesignTreeObject(com.twinsoft.convertigo.eclipse.views.projectexplorer.model.IDesignTreeObject) FolderTreeObject(com.twinsoft.convertigo.eclipse.views.projectexplorer.model.FolderTreeObject) ElementStep(com.twinsoft.convertigo.beans.steps.ElementStep) XMLElementStep(com.twinsoft.convertigo.beans.steps.XMLElementStep) ButtonSpec(com.twinsoft.convertigo.eclipse.dialogs.ButtonSpec)

Example 3 with CustomDialog

use of com.twinsoft.convertigo.eclipse.dialogs.CustomDialog in project convertigo by convertigo.

the class TransactionTreeObject method treeObjectPropertyChanged.

@Override
public void treeObjectPropertyChanged(TreeObjectEvent treeObjectEvent) {
    super.treeObjectPropertyChanged(treeObjectEvent);
    String propertyName = (String) treeObjectEvent.propertyName;
    propertyName = ((propertyName == null) ? "" : propertyName);
    TreeObject treeObject = (TreeObject) treeObjectEvent.getSource();
    if (treeObject instanceof DatabaseObjectTreeObject) {
        DatabaseObject databaseObject = (DatabaseObject) treeObject.getObject();
        // If a bean name has changed
        if ("name".equals(propertyName)) {
            handlesBeanNameChanged(treeObjectEvent);
        } else if ("sqlQuery".equals(propertyName)) {
            if (treeObject.equals(this)) {
                try {
                    SqlTransaction sqlTransaction = (SqlTransaction) databaseObject;
                    sqlTransaction.initializeQueries(true);
                    String oldValue = (String) treeObjectEvent.oldValue;
                    detectVariables(sqlTransaction.getSqlQuery(), oldValue, sqlTransaction.getVariablesList());
                    ConvertigoPlugin.getDefault().getProjectExplorerView().reloadTreeObject(this);
                } catch (Exception e) {
                    ConvertigoPlugin.logWarning(e, "Could not reload in tree Transaction \"" + databaseObject.getName() + "\" !");
                }
            }
        } else if ("subDir".equals(propertyName)) {
            if (treeObject.equals(this)) {
                try {
                    Object oldValue = treeObjectEvent.oldValue;
                    Object newValue = treeObjectEvent.newValue;
                    AbstractHttpTransaction httpTransaction = (AbstractHttpTransaction) databaseObject;
                    List<String> oldPathVariableList = AbstractHttpTransaction.getPathVariableList(oldValue.toString());
                    List<String> newPathVariableList = AbstractHttpTransaction.getPathVariableList(newValue.toString());
                    // Check for variables to be renamed
                    if (oldValue.toString().replaceAll("\\{([a-zA-Z0-9_]+)\\}", "{}").equals(newValue.toString().replaceAll("\\{([a-zA-Z0-9_]+)\\}", "{}"))) {
                        for (int i = 0; i < oldPathVariableList.size(); i++) {
                            String oldVariableName = oldPathVariableList.get(i);
                            String newVariableName = newPathVariableList.get(i);
                            if (!oldVariableName.equals(newVariableName)) {
                                RequestableHttpVariable httpVariable = (RequestableHttpVariable) httpTransaction.getVariable(oldVariableName);
                                if (httpVariable != null) {
                                    try {
                                        VariableTreeObject2 vto = (VariableTreeObject2) findTreeObjectByUserObject(httpVariable);
                                        int update = TreeObjectEvent.UPDATE_NONE;
                                        CustomDialog customDialog = new CustomDialog(viewer.getControl().getShell(), "Update object references", "Do you want to update " + "variable" + " references ?\n You can replace '" + oldVariableName + "' by '" + newVariableName + "' in all loaded projects \n or replace '" + oldVariableName + "' by '" + newVariableName + "' in current project only.", 670, 200, new ButtonSpec("Replace in all loaded projects", true), new ButtonSpec("Replace in current project", false), new ButtonSpec("Do not replace anywhere", false));
                                        int response = customDialog.open();
                                        if (response == 0) {
                                            update = TreeObjectEvent.UPDATE_ALL;
                                        }
                                        if (response == 1) {
                                            update = TreeObjectEvent.UPDATE_LOCAL;
                                        }
                                        if (update != 0) {
                                            httpVariable.setName(newVariableName);
                                            httpVariable.hasChanged = true;
                                            TreeObjectEvent toEvent = new TreeObjectEvent(vto, "name", oldVariableName, newVariableName, update);
                                            ConvertigoPlugin.getDefault().getProjectExplorerView().fireTreeObjectPropertyChanged(toEvent);
                                        }
                                    } catch (Exception e) {
                                        ConvertigoPlugin.logWarning(e, "Could not rename variable for Transaction \"" + databaseObject.getName() + "\" !");
                                    }
                                }
                            }
                        }
                    } else {
                        // Check for variables to be added
                        for (String variableName : newPathVariableList) {
                            if (httpTransaction.getVariable(variableName) == null) {
                                RequestableHttpVariable httpVariable = new RequestableHttpVariable();
                                httpVariable.setName(variableName);
                                httpVariable.setHttpMethod("GET");
                                httpVariable.setHttpName("");
                                httpVariable.bNew = true;
                                httpVariable.hasChanged = true;
                                httpTransaction.addVariable(httpVariable);
                                httpTransaction.hasChanged = true;
                            }
                        }
                        // Check for variables to be deleted
                        for (String variableName : oldPathVariableList) {
                            RequestableHttpVariable httpVariable = (RequestableHttpVariable) httpTransaction.getVariable(variableName);
                            if (httpVariable != null) {
                                if (!newPathVariableList.contains(variableName)) {
                                    try {
                                        MessageBox messageBox = new MessageBox(viewer.getControl().getShell(), SWT.ICON_QUESTION | SWT.YES | SWT.NO);
                                        messageBox.setMessage("Do you want to delete the variable \"" + variableName + "\"?");
                                        messageBox.setText("Delete \"" + variableName + "\"?");
                                        if (messageBox.open() == SWT.YES) {
                                            httpVariable.delete();
                                            httpTransaction.hasChanged = true;
                                        }
                                    } catch (EngineException e) {
                                        ConvertigoPlugin.logException(e, "Error when deleting the variable \"" + variableName + "\"");
                                    }
                                }
                            }
                        }
                    }
                    if (httpTransaction.hasChanged) {
                        ConvertigoPlugin.getDefault().getProjectExplorerView().reloadTreeObject(this);
                    }
                } catch (Exception e) {
                    ConvertigoPlugin.logWarning(e, "Could not reload in tree Transaction \"" + databaseObject.getName() + "\" !");
                }
            }
        }
    }
}
Also used : RequestableHttpVariable(com.twinsoft.convertigo.beans.variables.RequestableHttpVariable) EngineException(com.twinsoft.convertigo.engine.EngineException) SqlTransaction(com.twinsoft.convertigo.beans.transactions.SqlTransaction) PartInitException(org.eclipse.ui.PartInitException) EngineException(com.twinsoft.convertigo.engine.EngineException) AbstractHttpTransaction(com.twinsoft.convertigo.beans.transactions.AbstractHttpTransaction) MessageBox(org.eclipse.swt.widgets.MessageBox) CustomDialog(com.twinsoft.convertigo.eclipse.dialogs.CustomDialog) DatabaseObject(com.twinsoft.convertigo.beans.core.DatabaseObject) DatabaseObject(com.twinsoft.convertigo.beans.core.DatabaseObject) TreeObjectEvent(com.twinsoft.convertigo.eclipse.views.projectexplorer.TreeObjectEvent) ButtonSpec(com.twinsoft.convertigo.eclipse.dialogs.ButtonSpec)

Example 4 with CustomDialog

use of com.twinsoft.convertigo.eclipse.dialogs.CustomDialog in project convertigo by convertigo.

the class ConvertigoPlugin method addListeners.

public void addListeners() {
    try {
        IWorkbench workbench = PlatformUI.getWorkbench();
        // Add a WorkbenchListener
        workbenchListener = new ConvertigoWorkbenchListener();
        workbench.addWorkbenchListener(workbenchListener);
        // Add a WindowListener
        windowListener = new ConvertigoWindowListener();
        workbench.addWindowListener(windowListener);
        IWorkbenchWindow activeWorkbenchWindow = workbench.getActiveWorkbenchWindow();
        if (activeWorkbenchWindow != null) {
            // Add a PerspectiveListener
            if (perspectiveListener == null) {
                perspectiveListener = new ConvertigoPerspectiveListener();
                activeWorkbenchWindow.addPerspectiveListener(perspectiveListener);
            }
            // Add a PartListener
            if (partListener == null) {
                partListener = new ConvertigoPartListener();
                IPartService partService = activeWorkbenchWindow.getPartService();
                partService.addPartListener(partListener);
            }
        }
        Repository.getGlobalListenerList().addWorkingTreeModifiedListener(event -> {
            Engine.logStudio.debug("(Git Event) onWorkingTreeModified " + event);
            File workDir = event.getRepository().getWorkTree();
            Collection<String> files = new TreeSet<>(event.getModified());
            files.addAll(event.getDeleted());
            Set<File> affectedProjects = new HashSet<>();
            for (String f : files) {
                Engine.logStudio.trace("(Git Event) change for " + f);
                if (f.endsWith(".yaml")) {
                    File file = new File(workDir, f);
                    if (file.getName().equals("c8oProject.yaml")) {
                        affectedProjects.add(file.getParentFile());
                    } else {
                        File parent = file.getParentFile();
                        while (parent != null && !parent.getName().equals("_c8oProject")) {
                            parent = parent.getParentFile();
                        }
                        if (parent != null) {
                            parent = parent.getParentFile();
                            if (new File(parent, "c8oProject.yaml").exists()) {
                                affectedProjects.add(parent);
                            }
                        }
                    }
                }
            }
            Engine.logStudio.debug("(Git Event) affected projects: " + affectedProjects);
            ConvertigoPlugin.getDisplay().asyncExec(() -> {
                ProjectExplorerView pew = ConvertigoPlugin.this.getProjectExplorerView();
                for (ProjectTreeObject treeProject : pew.getOpenedProjects()) {
                    if (affectedProjects.contains(new File(treeProject.getObject().getDirPath()))) {
                        String name = "'" + treeProject.getName() + "'";
                        CustomDialog customDialog = new CustomDialog(getMainShell(), "Git modified project description of " + name, "Reload " + name + " with incoming changes ?\n" + "Save " + name + " and ignore incoming changes ?\n" + "Do nothing (reload or save by your own) ?", 500, 180, new ButtonSpec("Reload", true), new ButtonSpec("Save", false), new ButtonSpec("Do nothing", false));
                        int response = customDialog.open();
                        switch(response) {
                            case 0:
                                pew.reloadProject(treeProject);
                                break;
                            case 1:
                                treeProject.save(false);
                                break;
                            default:
                                treeProject.markAsChanged(true);
                                break;
                        }
                    }
                }
            });
        });
    } catch (IllegalStateException e) {
        studioLog.error("Could not add listeners to plugin." + e.getMessage());
    }
}
Also used : IWorkbenchWindow(org.eclipse.ui.IWorkbenchWindow) ProjectExplorerView(com.twinsoft.convertigo.eclipse.views.projectexplorer.ProjectExplorerView) IPartService(org.eclipse.ui.IPartService) IWorkbench(org.eclipse.ui.IWorkbench) CustomDialog(com.twinsoft.convertigo.eclipse.dialogs.CustomDialog) TreeSet(java.util.TreeSet) ProjectTreeObject(com.twinsoft.convertigo.eclipse.views.projectexplorer.model.ProjectTreeObject) File(java.io.File) ButtonSpec(com.twinsoft.convertigo.eclipse.dialogs.ButtonSpec) HashSet(java.util.HashSet)

Example 5 with CustomDialog

use of com.twinsoft.convertigo.eclipse.dialogs.CustomDialog in project convertigo by convertigo.

the class ProjectExplorerView method edit.

private void edit(TreeObject treeObject) {
    final Tree tree = viewer.getTree();
    final TreeEditor editor = new TreeEditor(tree);
    final Color black = getSite().getShell().getDisplay().getSystemColor(SWT.COLOR_BLACK);
    TreeItem[] items = tree.getSelection();
    if (items.length > 0) {
        final TreeItem item = items[0];
        final TreeObject theTreeObject = treeObject;
        if (treeObject instanceof ProjectTreeObject) {
            if (((ProjectTreeObject) treeObject).getModified()) {
                // Project need to be saved to avoid xsd/wsdl modification errors - Fix ticket #2265
                ConvertigoPlugin.warningMessageBox("Please save project before renaming it.");
                return;
            }
        }
        if (treeObject.getObject() instanceof HandlerStatement) {
            return;
        }
        if ((item != null) && lastItem.length > 0 && (item == lastItem[0])) {
            boolean isCarbon = SWT.getPlatform().equals("carbon");
            final Composite composite = new Composite(tree, SWT.NONE);
            if (!isCarbon) {
                composite.setBackground(black);
            }
            final Text text = new Text(composite, SWT.NONE);
            final int inset = isCarbon ? 0 : 1;
            composite.addListener(SWT.Resize, new Listener() {

                public void handleEvent(Event e) {
                    Rectangle rect = composite.getClientArea();
                    text.setBounds(rect.x + inset, rect.y + inset, rect.width - inset * 2, rect.height - inset * 2);
                }
            });
            Listener textListener = new Listener() {

                public void handleEvent(final Event e) {
                    MobileBuilder mba = null;
                    MobileBuilder mbo = null;
                    IEditorPart editorPart = ConvertigoPlugin.getDefault().getApplicationComponentEditor();
                    if (editorPart != null) {
                        IEditorInput input = editorPart.getEditorInput();
                        if (input instanceof com.twinsoft.convertigo.eclipse.editors.mobile.ApplicationComponentEditorInput) {
                            com.twinsoft.convertigo.eclipse.editors.mobile.ApplicationComponentEditorInput editorInput = GenericUtils.cast(input);
                            mba = editorInput.getApplication().getProject().getMobileBuilder();
                        }
                        if (input instanceof com.twinsoft.convertigo.eclipse.editors.ngx.ApplicationComponentEditorInput) {
                            com.twinsoft.convertigo.eclipse.editors.ngx.ApplicationComponentEditorInput editorInput = GenericUtils.cast(input);
                            mba = editorInput.getApplication().getProject().getMobileBuilder();
                        }
                    }
                    if (theTreeObject instanceof DatabaseObjectTreeObject) {
                        mbo = ((DatabaseObjectTreeObject) theTreeObject).getObject().getProject().getMobileBuilder();
                    }
                    String newName = null;
                    String oldName = null;
                    boolean needRefresh = false;
                    boolean needProjectReload = false;
                    if (theTreeObject instanceof DatabaseObjectTreeObject) {
                        oldName = ((DatabaseObject) ((DatabaseObjectTreeObject) theTreeObject).getObject()).getName();
                    } else if (theTreeObject instanceof TraceTreeObject) {
                        oldName = ((TraceTreeObject) theTreeObject).getName();
                    } else if (theTreeObject instanceof DesignDocumentViewTreeObject) {
                        oldName = ((DesignDocumentViewTreeObject) theTreeObject).getName();
                    } else if (theTreeObject instanceof DesignDocumentFunctionTreeObject) {
                        oldName = ((DesignDocumentFunctionTreeObject) theTreeObject).getName();
                    }
                    switch(e.type) {
                        case SWT.FocusOut:
                            editingTextCtrl = null;
                            composite.dispose();
                            break;
                        case SWT.Verify:
                            String newText = text.getText();
                            String leftText = newText.substring(0, e.start);
                            String rightText = newText.substring(e.end, newText.length());
                            GC gc = new GC(text);
                            Point size = gc.textExtent(leftText + e.text + rightText);
                            gc.dispose();
                            size = text.computeSize(size.x, SWT.DEFAULT);
                            editor.horizontalAlignment = SWT.LEFT;
                            Rectangle itemRect = item.getBounds(), rect = tree.getClientArea();
                            editor.minimumWidth = Math.max(size.x, itemRect.width) + inset * 2;
                            int left = itemRect.x, right = rect.x + rect.width;
                            editor.minimumWidth = Math.min(editor.minimumWidth, right - left);
                            editor.minimumHeight = size.y + inset * 2;
                            editor.layout();
                            break;
                        case SWT.Traverse:
                            switch(e.detail) {
                                case SWT.TRAVERSE_RETURN:
                                    Engine.logStudio.info("---------------------- Rename started ----------------------");
                                    if (mba != null) {
                                        mba.prepareBatchBuild();
                                    }
                                    newName = text.getText();
                                    // Save and close editors
                                    if (theTreeObject instanceof IClosableTreeObject) {
                                        ((IClosableTreeObject) theTreeObject).closeAllEditors(true);
                                    }
                                    if (theTreeObject instanceof DatabaseObjectTreeObject) {
                                        DatabaseObjectTreeObject dbObjectTreeObject = (DatabaseObjectTreeObject) theTreeObject;
                                        if (dbObjectTreeObject.rename(newName, Boolean.TRUE)) {
                                            item.setText(newName);
                                            needRefresh = true;
                                            if (theTreeObject instanceof ProjectTreeObject) {
                                                needProjectReload = true;
                                            }
                                        }
                                    } else if (theTreeObject instanceof TraceTreeObject) {
                                        TraceTreeObject traceTreeObject = (TraceTreeObject) theTreeObject;
                                        traceTreeObject.rename(newName);
                                        if (traceTreeObject.hasChanged) {
                                            item.setText(newName);
                                            traceTreeObject.hasChanged = false;
                                            needRefresh = true;
                                        }
                                    } else if (theTreeObject instanceof DesignDocumentViewTreeObject) {
                                        DesignDocumentViewTreeObject ddvto = (DesignDocumentViewTreeObject) theTreeObject;
                                        if (ddvto.rename(newName, Boolean.TRUE)) {
                                            item.setText(newName);
                                            needRefresh = true;
                                        }
                                    } else if (theTreeObject instanceof DesignDocumentFunctionTreeObject) {
                                        DesignDocumentFunctionTreeObject ddfto = (DesignDocumentFunctionTreeObject) theTreeObject;
                                        if (ddfto.rename(newName, Boolean.TRUE)) {
                                            item.setText(newName);
                                            needRefresh = true;
                                        }
                                    }
                                // FALL THROUGH
                                case SWT.TRAVERSE_ESCAPE:
                                    editingTextCtrl = null;
                                    composite.dispose();
                                    e.doit = false;
                            }
                            break;
                    }
                    if (needRefresh) {
                        boolean updateDlg = false;
                        boolean updateReferences = false;
                        int update = 0;
                        // Updates references to object if needed
                        if ((theTreeObject instanceof ProjectTreeObject) || (theTreeObject instanceof SequenceTreeObject) || (theTreeObject instanceof ConnectorTreeObject) || (theTreeObject instanceof TransactionTreeObject) || (theTreeObject instanceof VariableTreeObject2) || (theTreeObject instanceof IDesignTreeObject) || (theTreeObject instanceof MobilePageComponentTreeObject) || (theTreeObject instanceof MobileUIComponentTreeObject) || (theTreeObject instanceof NgxPageComponentTreeObject) || (theTreeObject instanceof NgxUIComponentTreeObject)) {
                            String objectType = "";
                            if (theTreeObject instanceof ProjectTreeObject) {
                                objectType = "project";
                                updateDlg = true;
                            } else if (theTreeObject instanceof SequenceTreeObject) {
                                objectType = "sequence";
                                updateDlg = true;
                            } else if (theTreeObject instanceof ConnectorTreeObject) {
                                objectType = "connector";
                                updateDlg = true;
                            } else if (theTreeObject instanceof TransactionTreeObject) {
                                objectType = "transaction";
                                updateDlg = true;
                            } else if (theTreeObject instanceof VariableTreeObject2) {
                                objectType = "variable";
                                updateDlg = ((DatabaseObject) theTreeObject.getObject()) instanceof RequestableVariable ? true : false;
                            } else if (theTreeObject instanceof DesignDocumentTreeObject) {
                                objectType = "document";
                                updateDlg = true;
                            } else if (theTreeObject instanceof DesignDocumentViewTreeObject) {
                                objectType = "view";
                                updateDlg = true;
                            } else if (theTreeObject instanceof DesignDocumentFilterTreeObject) {
                                objectType = "filter";
                                updateDlg = true;
                            } else if (theTreeObject instanceof DesignDocumentUpdateTreeObject) {
                                objectType = "update";
                                updateDlg = true;
                            } else if (theTreeObject instanceof DesignDocumentValidateTreeObject) {
                                objectType = "validate";
                                updateDlg = true;
                            } else if (theTreeObject instanceof MobilePageComponentTreeObject) {
                                objectType = "page";
                                updateDlg = true;
                            } else if (theTreeObject instanceof NgxPageComponentTreeObject) {
                                objectType = "page";
                                updateDlg = true;
                            } else if (theTreeObject instanceof MobileUIComponentTreeObject) {
                                DatabaseObject dbo = (DatabaseObject) theTreeObject.getObject();
                                if (dbo instanceof com.twinsoft.convertigo.beans.mobile.components.UIDynamicMenu) {
                                    objectType = "menu";
                                    updateDlg = true;
                                }
                                if (dbo instanceof com.twinsoft.convertigo.beans.mobile.components.UIActionStack) {
                                    objectType = "shared action";
                                    updateDlg = true;
                                }
                                if (dbo instanceof com.twinsoft.convertigo.beans.mobile.components.UISharedComponent) {
                                    objectType = "shared component";
                                    updateDlg = true;
                                }
                                if (dbo instanceof com.twinsoft.convertigo.beans.mobile.components.UIStackVariable) {
                                    objectType = "variable";
                                    updateDlg = true;
                                }
                                if (dbo instanceof com.twinsoft.convertigo.beans.mobile.components.UICompVariable) {
                                    objectType = "variable";
                                    updateDlg = true;
                                }
                            } else if (theTreeObject instanceof NgxUIComponentTreeObject) {
                                DatabaseObject dbo = (DatabaseObject) theTreeObject.getObject();
                                if (dbo instanceof com.twinsoft.convertigo.beans.ngx.components.UIDynamicMenu) {
                                    objectType = "menu";
                                    updateDlg = true;
                                }
                                if (dbo instanceof com.twinsoft.convertigo.beans.ngx.components.UIActionStack) {
                                    objectType = "shared action";
                                    updateDlg = true;
                                }
                                if (dbo instanceof com.twinsoft.convertigo.beans.ngx.components.UISharedComponent) {
                                    objectType = "shared component";
                                    updateDlg = true;
                                }
                                if (dbo instanceof com.twinsoft.convertigo.beans.ngx.components.UIStackVariable) {
                                    objectType = "variable";
                                    updateDlg = true;
                                }
                                if (dbo instanceof com.twinsoft.convertigo.beans.ngx.components.UICompVariable) {
                                    objectType = "variable";
                                    updateDlg = true;
                                }
                            }
                            if (updateDlg) {
                                Shell shell = Display.getDefault().getActiveShell();
                                CustomDialog customDialog = new CustomDialog(shell, "Update object references", "Do you want to update " + objectType + " references ?\n You can replace '" + oldName + "' by '" + newName + "' in all loaded projects \n or replace '" + oldName + "' by '" + newName + "' in current project only.", 670, 200, new ButtonSpec("Replace in all loaded projects", true), new ButtonSpec("Replace in current project", false), new ButtonSpec("Do not replace anywhere", false));
                                int response = customDialog.open();
                                if (response == 0) {
                                    updateReferences = true;
                                    update = TreeObjectEvent.UPDATE_ALL;
                                }
                                if (response == 1) {
                                    updateReferences = true;
                                    update = TreeObjectEvent.UPDATE_LOCAL;
                                }
                            }
                        }
                        TreeObjectEvent treeObjectEvent = null;
                        if (updateReferences) {
                            treeObjectEvent = new TreeObjectEvent(theTreeObject, "name", oldName, newName, update);
                        } else {
                            treeObjectEvent = new TreeObjectEvent(theTreeObject, "name", oldName, newName);
                        }
                        BatchOperationHelper.start();
                        ProjectExplorerView.this.refreshTree();
                        ProjectExplorerView.this.setSelectedTreeObject(theTreeObject);
                        ProjectExplorerView.this.fireTreeObjectPropertyChanged(treeObjectEvent);
                        if (updateReferences && needProjectReload) {
                            ((ProjectTreeObject) theTreeObject).save(false);
                        }
                        if (mbo != null) {
                            if (theTreeObject instanceof MobilePageComponentTreeObject) {
                                try {
                                    mbo.pageRenamed((com.twinsoft.convertigo.beans.mobile.components.PageComponent) theTreeObject.getObject(), oldName);
                                } catch (EngineException e1) {
                                    e1.printStackTrace();
                                }
                            }
                            if (theTreeObject instanceof NgxPageComponentTreeObject) {
                                try {
                                    mbo.pageRenamed((com.twinsoft.convertigo.beans.ngx.components.PageComponent) theTreeObject.getObject(), oldName);
                                } catch (EngineException e1) {
                                    e1.printStackTrace();
                                }
                            }
                        }
                        BatchOperationHelper.stop();
                        Engine.logStudio.info("---------------------- Rename ended   ----------------------");
                        StructuredSelection structuredSelection = new StructuredSelection(theTreeObject);
                        ISelectionListener listener = null;
                        // refresh properties view
                        listener = ConvertigoPlugin.getDefault().getPropertiesView();
                        if (listener != null)
                            listener.selectionChanged((IWorkbenchPart) ProjectExplorerView.this, structuredSelection);
                        // refresh references view
                        listener = ConvertigoPlugin.getDefault().getReferencesView();
                        if (listener != null)
                            listener.selectionChanged((IWorkbenchPart) ProjectExplorerView.this, structuredSelection);
                    }
                    if (needProjectReload) {
                        Engine.theApp.databaseObjectsManager.clearCache(newName);
                        reloadProject(theTreeObject);
                        refreshTree();
                    }
                }
            };
            text.addListener(SWT.FocusOut, textListener);
            text.addListener(SWT.Traverse, textListener);
            text.addListener(SWT.Verify, textListener);
            editor.setEditor(composite, item);
            if (theTreeObject instanceof DatabaseObjectTreeObject) {
                text.setText(((DatabaseObjectTreeObject) theTreeObject).getName());
            } else if (theTreeObject instanceof TraceTreeObject) {
                text.setText(((TraceTreeObject) theTreeObject).getName());
            } else if (theTreeObject instanceof DesignDocumentViewTreeObject) {
                text.setText(((DesignDocumentViewTreeObject) theTreeObject).getName());
            } else if (theTreeObject instanceof DesignDocumentFunctionTreeObject) {
                text.setText(((DesignDocumentFunctionTreeObject) theTreeObject).getName());
            }
            text.selectAll();
            text.setFocus();
            editingTextCtrl = text;
        }
        lastItem[0] = item;
    }
}
Also used : NgxUIComponentTreeObject(com.twinsoft.convertigo.eclipse.views.projectexplorer.model.NgxUIComponentTreeObject) DatabaseObjectTreeObject(com.twinsoft.convertigo.eclipse.views.projectexplorer.model.DatabaseObjectTreeObject) TreeItem(org.eclipse.swt.widgets.TreeItem) DesignDocumentTreeObject(com.twinsoft.convertigo.eclipse.views.projectexplorer.model.DesignDocumentTreeObject) Rectangle(org.eclipse.swt.graphics.Rectangle) EngineException(com.twinsoft.convertigo.engine.EngineException) IStructuredSelection(org.eclipse.jface.viewers.IStructuredSelection) StructuredSelection(org.eclipse.jface.viewers.StructuredSelection) ISelectionListener(org.eclipse.ui.ISelectionListener) CustomDialog(com.twinsoft.convertigo.eclipse.dialogs.CustomDialog) IWorkbenchPart(org.eclipse.ui.IWorkbenchPart) Tree(org.eclipse.swt.widgets.Tree) DatabaseObject(com.twinsoft.convertigo.beans.core.DatabaseObject) ButtonSpec(com.twinsoft.convertigo.eclipse.dialogs.ButtonSpec) NgxPageComponentTreeObject(com.twinsoft.convertigo.eclipse.views.projectexplorer.model.NgxPageComponentTreeObject) Color(org.eclipse.swt.graphics.Color) IClosableTreeObject(com.twinsoft.convertigo.eclipse.views.projectexplorer.model.IClosableTreeObject) ConnectorTreeObject(com.twinsoft.convertigo.eclipse.views.projectexplorer.model.ConnectorTreeObject) MobileUIComponentTreeObject(com.twinsoft.convertigo.eclipse.views.projectexplorer.model.MobileUIComponentTreeObject) MobilePageComponentTreeObject(com.twinsoft.convertigo.eclipse.views.projectexplorer.model.MobilePageComponentTreeObject) MobileBuilder(com.twinsoft.convertigo.engine.mobile.MobileBuilder) 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) DesignDocumentFilterTreeObject(com.twinsoft.convertigo.eclipse.views.projectexplorer.model.DesignDocumentFilterTreeObject) TransactionTreeObject(com.twinsoft.convertigo.eclipse.views.projectexplorer.model.TransactionTreeObject) MigrationListener(com.twinsoft.convertigo.engine.MigrationListener) TreeDragListener(com.twinsoft.convertigo.eclipse.dnd.TreeDragListener) ISelectionListener(org.eclipse.ui.ISelectionListener) CompositeListener(com.twinsoft.convertigo.eclipse.editors.CompositeListener) DatabaseObjectListener(com.twinsoft.convertigo.engine.DatabaseObjectListener) Listener(org.eclipse.swt.widgets.Listener) EngineListener(com.twinsoft.convertigo.engine.EngineListener) IDoubleClickListener(org.eclipse.jface.viewers.IDoubleClickListener) ITreeViewerListener(org.eclipse.jface.viewers.ITreeViewerListener) IMenuListener(org.eclipse.jface.action.IMenuListener) ISelectionChangedListener(org.eclipse.jface.viewers.ISelectionChangedListener) IDesignTreeObject(com.twinsoft.convertigo.eclipse.views.projectexplorer.model.IDesignTreeObject) DesignDocumentViewTreeObject(com.twinsoft.convertigo.eclipse.views.projectexplorer.model.DesignDocumentViewTreeObject) HandlerStatement(com.twinsoft.convertigo.beans.statements.HandlerStatement) Shell(org.eclipse.swt.widgets.Shell) GC(org.eclipse.swt.graphics.GC) VariableTreeObject2(com.twinsoft.convertigo.eclipse.views.projectexplorer.model.VariableTreeObject2) DesignDocumentValidateTreeObject(com.twinsoft.convertigo.eclipse.views.projectexplorer.model.DesignDocumentValidateTreeObject) TreeEditor(org.eclipse.swt.custom.TreeEditor) Composite(org.eclipse.swt.widgets.Composite) SequenceTreeObject(com.twinsoft.convertigo.eclipse.views.projectexplorer.model.SequenceTreeObject) Text(org.eclipse.swt.widgets.Text) RequestableVariable(com.twinsoft.convertigo.beans.variables.RequestableVariable) IEditorPart(org.eclipse.ui.IEditorPart) Point(org.eclipse.swt.graphics.Point) Point(org.eclipse.swt.graphics.Point) DesignDocumentFunctionTreeObject(com.twinsoft.convertigo.eclipse.views.projectexplorer.model.DesignDocumentFunctionTreeObject) SelectionChangedEvent(org.eclipse.jface.viewers.SelectionChangedEvent) EngineEvent(com.twinsoft.convertigo.engine.EngineEvent) TreeExpansionEvent(org.eclipse.jface.viewers.TreeExpansionEvent) DatabaseObjectImportedEvent(com.twinsoft.convertigo.engine.DatabaseObjectImportedEvent) KeyEvent(org.eclipse.swt.events.KeyEvent) DatabaseObjectLoadedEvent(com.twinsoft.convertigo.engine.DatabaseObjectLoadedEvent) DoubleClickEvent(org.eclipse.jface.viewers.DoubleClickEvent) CompositeEvent(com.twinsoft.convertigo.eclipse.editors.CompositeEvent) Event(org.eclipse.swt.widgets.Event) UnloadedProjectTreeObject(com.twinsoft.convertigo.eclipse.views.projectexplorer.model.UnloadedProjectTreeObject) ProjectTreeObject(com.twinsoft.convertigo.eclipse.views.projectexplorer.model.ProjectTreeObject) TraceTreeObject(com.twinsoft.convertigo.eclipse.views.projectexplorer.model.TraceTreeObject) IEditorInput(org.eclipse.ui.IEditorInput) DesignDocumentUpdateTreeObject(com.twinsoft.convertigo.eclipse.views.projectexplorer.model.DesignDocumentUpdateTreeObject)

Aggregations

ButtonSpec (com.twinsoft.convertigo.eclipse.dialogs.ButtonSpec)8 CustomDialog (com.twinsoft.convertigo.eclipse.dialogs.CustomDialog)8 DatabaseObject (com.twinsoft.convertigo.beans.core.DatabaseObject)6 TreeObject (com.twinsoft.convertigo.eclipse.views.projectexplorer.model.TreeObject)5 EngineException (com.twinsoft.convertigo.engine.EngineException)5 DatabaseObjectTreeObject (com.twinsoft.convertigo.eclipse.views.projectexplorer.model.DatabaseObjectTreeObject)4 ProjectTreeObject (com.twinsoft.convertigo.eclipse.views.projectexplorer.model.ProjectTreeObject)4 Project (com.twinsoft.convertigo.beans.core.Project)3 ProjectExplorerView (com.twinsoft.convertigo.eclipse.views.projectexplorer.ProjectExplorerView)3 IDesignTreeObject (com.twinsoft.convertigo.eclipse.views.projectexplorer.model.IDesignTreeObject)3 IPropertyTreeObject (com.twinsoft.convertigo.eclipse.views.projectexplorer.model.IPropertyTreeObject)3 Shell (org.eclipse.swt.widgets.Shell)3 Sequence (com.twinsoft.convertigo.beans.core.Sequence)2 Step (com.twinsoft.convertigo.beans.core.Step)2 StepWithExpressions (com.twinsoft.convertigo.beans.core.StepWithExpressions)2 CompositeEvent (com.twinsoft.convertigo.eclipse.editors.CompositeEvent)2 TreeObjectEvent (com.twinsoft.convertigo.eclipse.views.projectexplorer.TreeObjectEvent)2 ConnectorTreeObject (com.twinsoft.convertigo.eclipse.views.projectexplorer.model.ConnectorTreeObject)2 CriteriaTreeObject (com.twinsoft.convertigo.eclipse.views.projectexplorer.model.CriteriaTreeObject)2 DesignDocumentFilterTreeObject (com.twinsoft.convertigo.eclipse.views.projectexplorer.model.DesignDocumentFilterTreeObject)2