Example usage for org.eclipse.jdt.core.util CompilationUnitSorter sort

List of usage examples for org.eclipse.jdt.core.util CompilationUnitSorter sort

Introduction

In this page you can find the example usage for org.eclipse.jdt.core.util CompilationUnitSorter sort.

Prototype

public static void sort(int level, ICompilationUnit compilationUnit, int[] positions, Comparator comparator,
        int options, IProgressMonitor monitor) throws JavaModelException 

Source Link

Document

Reorders the declarations in the given compilation unit according to the specified AST level.

Usage

From source file:com.github.parzonka.ccms.sorter.RandomMethodSorter.java

License:Open Source License

@Override
public void sort(ICompilationUnit cu) {

    try {//from  w w w .  j  a v  a 2 s. c  o m
        CompilationUnitSorter.sort(3, cu, null, createComparator(cu), 0, null);
    } catch (final JavaModelException e) {
        throw new RuntimeException(e);
    }

}