Package com.dci.intellij.dbn.data.sorting

Examples of com.dci.intellij.dbn.data.sorting.SortDirection


        List<SortingInstruction> sortingInstructions = sortingState.getSortingInstructions();
        if (sortingInstructions.size() > 0) {
            buffer.append(" order by ");
            boolean instructionAdded = false;
            for (SortingInstruction sortingInstruction : sortingInstructions) {
                SortDirection sortDirection = sortingInstruction.getDirection();
                DBColumn column = dataset.getColumn(sortingInstruction.getColumnName());
                if (column != null && !sortDirection.isIndefinite()) {
                    buffer.append(instructionAdded ? ", " : "");
                    buffer.append(column.getName());
                    buffer.append(" ");
                    buffer.append(sortDirection.getSqlToken());
                    instructionAdded = true;
                }
            }
        }
    }
View Full Code Here


        this.form = form;
    }

    public void update(AnActionEvent e) {
        SortingInstruction sortingInstruction = form.getSortingInstruction();
        SortDirection direction = sortingInstruction.getDirection();
        Icon icon =
            direction == SortDirection.ASCENDING ? Icons.DATA_SORTING_ASC :
            direction == SortDirection.DESCENDING ? Icons.DATA_SORTING_DESC : null;
        e.getPresentation().setIcon(icon);
        e.getPresentation().setText("Change sorting direction");
View Full Code Here

TOP

Related Classes of com.dci.intellij.dbn.data.sorting.SortDirection

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.