Package org.guvnor.tools.views.model

Examples of org.guvnor.tools.views.model.TreeParent


            super.setErrorMessage(null);
        }
        IStructuredSelection selection = (IStructuredSelection)viewer.getSelection();
        GuvWizardModel model = ((IGuvnorWizard)super.getWizard()).getModel();
        if (selection.getFirstElement() instanceof TreeParent) {
            TreeParent node = (TreeParent)selection.getFirstElement();
            if (node.getNodeType() != Type.NONE) {
                viewer.expandToLevel(node, 1);
                String base = node.getFullPath().endsWith("/")?node.getFullPath():node.getFullPath() + "/"; //$NON-NLS-1$ //$NON-NLS-2$
                model.setTargetLocation(base);
                super.getWizard().getContainer().updateButtons();
            } else {
                model.setTargetLocation(null);
                super.getWizard().getContainer().updateButtons();
View Full Code Here


            super.setErrorMessage(null);
        }
        IStructuredSelection selection = (IStructuredSelection)viewer.getSelection();
        GuvWizardModel model = ((IGuvnorWizard)super.getWizard()).getModel();
        if (selection.getFirstElement() instanceof TreeParent) {
            TreeParent node = (TreeParent)selection.getFirstElement();
            if (node.getNodeType() == TreeObject.Type.PACKAGE
               || node.getNodeType() == TreeObject.Type.REPOSITORY) {
                viewer.expandToLevel(node, 1);
                String base = node.getFullPath().endsWith("/")?node.getFullPath():node.getFullPath() + "/"; //$NON-NLS-1$ //$NON-NLS-2$
                model.setTargetLocation(base);
                super.getWizard().getContainer().updateButtons();
            } else {
                model.setTargetLocation(null);
                super.getWizard().getContainer().updateButtons();
View Full Code Here

        return false;
    }

    private void initialize() {
        boolean shouldAdd = true;
        invisibleRoot = new TreeParent("", TreeObject.Type.NONE); //$NON-NLS-1$
        List<GuvnorRepository> reps = Activator.getLocationManager().getRepositories();
        for (int i = 0; i < reps.size(); i++) {
            if (repUrl != null) {
                if (repUrl.equals(reps.get(i).getLocation())) {
                    shouldAdd = true;
                } else {
                    shouldAdd = false;
                }
            } else {
                shouldAdd = true;
            }
            if (shouldAdd) {
                TreeParent p = new TreeParent(reps.get(i).getLocation(),
                                             TreeObject.Type.REPOSITORY);
                p.setGuvnorRepository(reps.get(i));
                ResourceProperties props = new ResourceProperties();
                props.setBase(""); //$NON-NLS-1$
                p.setResourceProps(props);
                invisibleRoot.addChild(p);
            }
        }
    }
View Full Code Here

TOP

Related Classes of org.guvnor.tools.views.model.TreeParent

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.