Package org.locationtech.udig.issues.internal.view

Examples of org.locationtech.udig.issues.internal.view.IssuesLabelProvider


        Display.getDefault().syncExec(new Runnable(){
            public void run() {
                // test labels and text

                IssuesLabelProvider p = new IssuesLabelProvider();
                // priority image
                assertNotNull(p.getColumnImage(list.get(0), IssuesView.PRIORITY_COLUMN));
                assertNotNull(p.getColumnImage(list.get(1), IssuesView.PRIORITY_COLUMN));
                assertNotNull(p.getColumnImage(list.get(2), IssuesView.PRIORITY_COLUMN));
                assertNotNull(p.getColumnImage(list.get(3), IssuesView.PRIORITY_COLUMN));
                assertNotNull(p.getColumnImage(list.get(4), IssuesView.PRIORITY_COLUMN));

                assertEquals(p.getColumnImage(list.get(0), IssuesView.PRIORITY_COLUMN), IssuesActivator
                    .getDefault().getImage(ImageConstants.PRIORITY_CRITICAL));
                assertEquals(p.getColumnImage(list.get(1), IssuesView.PRIORITY_COLUMN), IssuesActivator
                    .getDefault().getImage(ImageConstants.PRIORITY_HIGH));
                assertEquals(p.getColumnImage(list.get(2), IssuesView.PRIORITY_COLUMN), IssuesActivator
                    .getDefault().getImage(ImageConstants.PRIORITY_LOW));
                assertEquals(p.getColumnImage(list.get(3), IssuesView.PRIORITY_COLUMN), IssuesActivator
                    .getDefault().getImage(ImageConstants.PRIORITY_TRIVIAL));
                assertEquals(p.getColumnImage(list.get(4), IssuesView.PRIORITY_COLUMN), IssuesActivator
                    .getDefault().getImage(ImageConstants.PRIORITY_WARNING));

                // resolution image
                assertNotNull(p.getColumnImage(list.get(0), IssuesView.RESOLUTION_COLUMN));
                assertNotNull(p.getColumnImage(list.get(1), IssuesView.RESOLUTION_COLUMN));
                assertNotNull(p.getColumnImage(list.get(2), IssuesView.RESOLUTION_COLUMN));
                assertNotNull(p.getColumnImage(list.get(3), IssuesView.RESOLUTION_COLUMN));
                assertNotNull(p.getColumnImage(list.get(4), IssuesView.RESOLUTION_COLUMN));

                assertEquals(p.getColumnImage(list.get(0), IssuesView.RESOLUTION_COLUMN), IssuesActivator
                    .getDefault().getImage(ImageConstants.RESOLUTION_UNRESOLVED));
                assertEquals(p.getColumnImage(list.get(1), IssuesView.RESOLUTION_COLUMN), IssuesActivator
                    .getDefault().getImage(ImageConstants.RESOLUTION_VIEWED));
                assertEquals(p.getColumnImage(list.get(2), IssuesView.RESOLUTION_COLUMN), IssuesActivator
                    .getDefault().getImage(ImageConstants.RESOLUTION_RESOLVED));
                assertEquals(p.getColumnImage(list.get(3), IssuesView.RESOLUTION_COLUMN), IssuesActivator
                    .getDefault().getImage(ImageConstants.RESOLUTION_UNKNOWN));
                assertEquals(p.getColumnImage(list.get(4), IssuesView.RESOLUTION_COLUMN), IssuesActivator
                    .getDefault().getImage(ImageConstants.RESOLUTION_UNRESOLVED));

                // name image
                assertNull(p.getColumnImage(list.get(0), IssuesView.OBJECT_COLUMN));
                assertNull(p.getColumnImage(list.get(1), IssuesView.OBJECT_COLUMN));
                assertNull(p.getColumnImage(list.get(2), IssuesView.OBJECT_COLUMN));
                assertNull(p.getColumnImage(list.get(3), IssuesView.OBJECT_COLUMN));
                assertNull(p.getColumnImage(list.get(4), IssuesView.OBJECT_COLUMN));
                // desc image
                assertNull(p.getColumnImage(list.get(0), IssuesView.DESC_COLUMN));
                assertNull(p.getColumnImage(list.get(1), IssuesView.DESC_COLUMN));
                assertNull(p.getColumnImage(list.get(2), IssuesView.DESC_COLUMN));
                assertNull(p.getColumnImage(list.get(3), IssuesView.DESC_COLUMN));
                assertNull(p.getColumnImage(list.get(4), IssuesView.DESC_COLUMN));

                // priority text
                assertNull(p.getColumnText(list.get(0), IssuesView.PRIORITY_COLUMN));
                assertNull(p.getColumnText(list.get(1), IssuesView.PRIORITY_COLUMN));
                assertNull(p.getColumnText(list.get(2), IssuesView.PRIORITY_COLUMN));
                assertNull(p.getColumnText(list.get(3), IssuesView.PRIORITY_COLUMN));
                assertNull(p.getColumnText(list.get(4), IssuesView.PRIORITY_COLUMN));

                // Resolution text
                assertNull(p.getColumnText(list.get(0), IssuesView.RESOLUTION_COLUMN));
                assertNull(p.getColumnText(list.get(1), IssuesView.RESOLUTION_COLUMN));
                assertNull(p.getColumnText(list.get(2), IssuesView.RESOLUTION_COLUMN));
                assertNull(p.getColumnText(list.get(3), IssuesView.RESOLUTION_COLUMN));
                assertNull(p.getColumnText(list.get(4), IssuesView.RESOLUTION_COLUMN));
                // name text
                assertEquals(
                        "problem" + Priority.CRITICAL, p.getColumnText(list.get(0), IssuesView.OBJECT_COLUMN)); //$NON-NLS-1$
                assertEquals(
                        "problem" + Priority.HIGH, p.getColumnText(list.get(1), IssuesView.OBJECT_COLUMN)); //$NON-NLS-1$
                assertEquals(
                        "problem" + Priority.LOW, p.getColumnText(list.get(2), IssuesView.OBJECT_COLUMN)); //$NON-NLS-1$
                assertEquals(
                        "problem" + Priority.TRIVIAL, p.getColumnText(list.get(3), IssuesView.OBJECT_COLUMN)); //$NON-NLS-1$
                assertEquals(
                        "problem" + Priority.WARNING, p.getColumnText(list.get(4), IssuesView.OBJECT_COLUMN)); //$NON-NLS-1$
                // desc text
                assertEquals(
                        "desc" + Priority.CRITICAL, p.getColumnText(list.get(0), IssuesView.DESC_COLUMN)); //$NON-NLS-1$
                assertEquals(
                        "desc" + Priority.HIGH, p.getColumnText(list.get(1), IssuesView.DESC_COLUMN)); //$NON-NLS-1$
                assertEquals(
                        "desc" + Priority.LOW, p.getColumnText(list.get(2), IssuesView.DESC_COLUMN)); //$NON-NLS-1$
                assertEquals(
                        "desc" + Priority.TRIVIAL, p.getColumnText(list.get(3), IssuesView.DESC_COLUMN)); //$NON-NLS-1$
                assertEquals(
                        "desc" + Priority.WARNING, p.getColumnText(list.get(4), IssuesView.DESC_COLUMN)); //$NON-NLS-1$
            }
        });

    }
View Full Code Here


    /**
     * Resets the expansion provider.  The default expands all elements.
     */
    public void setDefaultLabelProvider( ){
        setLabelProvider(new IssuesLabelProvider());
    }
View Full Code Here

TOP

Related Classes of org.locationtech.udig.issues.internal.view.IssuesLabelProvider

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.