Package org.apache.ivyde.internal.eclipse.revdepexplorer

Examples of org.apache.ivyde.internal.eclipse.revdepexplorer.MultiRevDependencyDescriptor


                TreeItem[] items = viewer.getTree().getItems();

                for (int i = 0; i < items.length; i++) {
                    TreeItem item = items[i];
                    MultiRevDependencyDescriptor multiRD = (MultiRevDependencyDescriptor) item
                            .getData();

                    if (multiRD.hasMultipleRevisons() && !multiRD.hasNewRevision()) {
                        item.setForeground(display.getSystemColor(SWT.COLOR_RED));
                    } else if (multiRD.hasNewRevision()) {
                        item.setForeground(new Color(Display.getDefault(), LIGHT_GREEEN));
                    } else {
                        item.setForeground(display.getSystemColor(SWT.COLOR_BLACK));
                    }
                }
View Full Code Here


            return dependencies;
        }

        public String getColumnText(Object obj, int index) {
            if (obj instanceof MultiRevDependencyDescriptor) {
                MultiRevDependencyDescriptor mrdd = (MultiRevDependencyDescriptor) obj;

                switch (index) {
                    case 0:
                        return mrdd.getOrganization();
                    case 1:
                        return mrdd.getModule();
                    case 2:
                        return toRevisionList(mrdd.getRevisions());
                        // CheckStyle:MagicNumber| OFF
                    case 3:
                        // CheckStyle:MagicNumber| ON
                        return mrdd.getNewRevision();
                    default:
                        break;
                }
            } else if (obj instanceof CPDependencyDescriptor) {
                CPDependencyDescriptor containerDescriptorComposite = (CPDependencyDescriptor) obj;
View Full Code Here

        }

        public Image getImage(Object obj) {
            ISharedImages sharedImages = PlatformUI.getWorkbench().getSharedImages();
            if (obj instanceof MultiRevDependencyDescriptor) {
                MultiRevDependencyDescriptor mrdd = (MultiRevDependencyDescriptor) obj;

                if (mrdd.hasMultipleRevisons() && !mrdd.hasNewRevision()) {
                    return sharedImages.getImage(ISharedImages.IMG_OBJS_WARN_TSK);
                } else {
                    return IvyPlugin.getImageDescriptor("icons/synced.gif").createImage();
                }
            } else if (obj instanceof CPDependencyDescriptor) {
View Full Code Here

            return null;
        }

        public Object[] getChildren(Object parent) {
            if (parent instanceof MultiRevDependencyDescriptor) {
                MultiRevDependencyDescriptor mrdd = (MultiRevDependencyDescriptor) parent;
                IvyClasspathContainerImpl[] containers = mrdd.getIvyClasspathContainers();

                Object[] wrappedProjects = new Object[containers.length];
                for (int i = 0; i < containers.length; i++) {
                    wrappedProjects[i] = new CPDependencyDescriptor(containers[i], mrdd);
                }
View Full Code Here

            return null;
        }

        public boolean hasChildren(Object parent) {
            if (parent instanceof MultiRevDependencyDescriptor) {
                MultiRevDependencyDescriptor mrdd = (MultiRevDependencyDescriptor) parent;

                if (mrdd.getIvyClasspathContainers().length > 0) {
                    return true;
                }
            }

            return false;
View Full Code Here

        public Object getValue(Object element, String property) {
            if (!property.equals(NEW_REVISION)
                    || !(element instanceof MultiRevDependencyDescriptor)) {
                return null;
            }
            MultiRevDependencyDescriptor mrdd = (MultiRevDependencyDescriptor) element;
            String revision = mrdd.getNewRevision();
            if (revision == null) {
                return "";
            }
            return revision;
        }
View Full Code Here

TOP

Related Classes of org.apache.ivyde.internal.eclipse.revdepexplorer.MultiRevDependencyDescriptor

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.