Package org.eclipse.jface.viewers

Examples of org.eclipse.jface.viewers.ViewerSorter


        }
      }
    });

    /* Sorter */
    fViewer.setSorter(new ViewerSorter() {
      @Override
      public int compare(Viewer viewer, Object e1, Object e2) {
        CredentialsModelData data1 = (CredentialsModelData) e1;
        CredentialsModelData data2 = (CredentialsModelData) e2;

View Full Code Here


                }
                return tooltip;
            }
        });

        ViewerSorter sorter = new ViewerSorter() {
            @Override
            public int compare(Viewer viewer, Object e1, Object e2) {
                if (isIncludedRepo(e1)) {
                    if (isIncludedRepo(e2)) {
                        // Both included => sort on position in included list
View Full Code Here

            return;

        ITreeContentProvider contentProvider = (ITreeContentProvider) unresolvedViewer.getContentProvider();
        Object[] roots = contentProvider.getElements(input);

        ViewerSorter sorter = unresolvedViewer.getSorter();
        if (sorter != null)
            Arrays.sort(roots, new SorterComparatorAdapter(unresolvedViewer, sorter));
        for (Object root : roots) {

            appendLabels(root, contentProvider, builder, 0);
View Full Code Here

        //        builder.append(getClipboardContent(unresolvedTreeElem)).append('\n');

        Object[] children = contentProvider.getChildren(unresolvedTreeElem);
        if (children == null)
            return;
        ViewerSorter sorter = unresolvedViewer.getSorter();
        if (sorter != null)
            Arrays.sort(children, new SorterComparatorAdapter(unresolvedViewer, sorter));
        for (Object child : children) {
            appendLabels(child, contentProvider, builder, indent + 1);
        }
View Full Code Here

        btnAlwaysGenerate.setText(Messages.PackageInfoDialog_AlwaysGenerate);

        viewer = new CheckboxTableViewer(table);
        viewer.setContentProvider(ArrayContentProvider.getInstance());
        viewer.setLabelProvider(new PackageInfoLabelProvider(table.getDisplay()));
        viewer.setSorter(new ViewerSorter() {
            @Override
            public int compare(Viewer viewer, Object e1, Object e2) {
                String s1 = (String) e1;
                String s2 = (String) e2;
                return s1.compareTo(s2);
View Full Code Here

                }
                return tooltip;
            }
        });

        ViewerSorter sorter = new ViewerSorter() {
            @Override
            public int compare(Viewer viewer, Object e1, Object e2) {
                if (isIncludedRepo(e1)) {
                    if (isIncludedRepo(e2)) {
                        // Both included => sort on position in included list
View Full Code Here

        TableViewerColumn tblViewerClmnVersion = new TableViewerColumn(viewer, tblclmnVersion);
        tblViewerClmnVersion.setLabelProvider(new PackageVersionLabelProvider());
        tblViewerClmnVersion.setEditingSupport(new VersionEditingSupport(viewer));

        viewer.setContentProvider(ArrayContentProvider.getInstance());
        viewer.setSorter(new ViewerSorter() {
            @Override
            public int compare(Viewer viewer, Object e1, Object e2) {
                FileVersionTuple f1 = (FileVersionTuple) e1;
                FileVersionTuple f2 = (FileVersionTuple) e2;
                return f1.compareTo(f2);
View Full Code Here

            return;

        ITreeContentProvider contentProvider = (ITreeContentProvider) unresolvedViewer.getContentProvider();
        Object[] roots = contentProvider.getElements(input);

        ViewerSorter sorter = unresolvedViewer.getSorter();
        if (sorter != null)
            Arrays.sort(roots, new SorterComparatorAdapter(unresolvedViewer, sorter));
        for (Object root : roots) {

            appendLabels(root, contentProvider, builder, 0);
View Full Code Here

        //        builder.append(getClipboardContent(unresolvedTreeElem)).append('\n');

        Object[] children = contentProvider.getChildren(unresolvedTreeElem);
        if (children == null)
            return;
        ViewerSorter sorter = unresolvedViewer.getSorter();
        if (sorter != null)
            Arrays.sort(children, new SorterComparatorAdapter(unresolvedViewer, sorter));
        for (Object child : children) {
            appendLabels(child, contentProvider, builder, indent + 1);
        }
View Full Code Here

    viewer.setContentProvider(new RoutesContentProvider());

    viewer.setLabelProvider(new TreeLabelProvider(viewer));

    viewer.setSorter(new ViewerSorter() {

      @Override
      public int compare(Viewer viewer, Object e1, Object e2) {
        TableColumn sortColumn = table.getSortColumn();
        if (sortColumn != null) {
View Full Code Here

TOP

Related Classes of org.eclipse.jface.viewers.ViewerSorter

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.