Package org.netbeans.modules.exceptions.utils

Examples of org.netbeans.modules.exceptions.utils.LineComparator


                try {
                    stacktrace = em.find(Stacktrace.class, stacktrace.getId());
                    while (stacktrace != null) {
                        out.println(stacktrace.getMessage().trim());
                        List<Line> lines = PersistenceUtils.executeNamedQuery(em, "Line.findByStacktrace", Collections.singletonMap("stacktrace", (Object) stacktrace), Line.class);
                        Collections.sort(lines, new LineComparator());
                        for(Line line : lines) {
                            formatLine(out, line);
                        }
                        stacktrace = stacktrace.getAnnotation();
                    }
View Full Code Here


        }
        return compareStacktaces(lines, stackTrace, depth);
    }
       
    private static boolean compareStacktaces(List<Line> lines, StackTraceElement[] stackTrace, int depth){
        Collections.sort(lines, new LineComparator());
        if (depth == -1) {// compare whole stacktraces
            if (stackTrace.length != lines.size()) {// different lines count
                return false;
            }
            depth = lines.size();
View Full Code Here

                    Exceptions exc = FilteringUtils.getRootExceptions(stacktrace);
                    if (searchOnlyOpens && !PersistenceUtils.exceptionIsOpen(exc)){
                        continue;
                    }
                    List<Line> lines = new ArrayList<Line>(stacktrace.getLineCollection());
                    Collections.sort(lines, new LineComparator());
                    Iterator<Line> iterator = lines.iterator();
                    while (iterator.hasNext()){
                        Line line = iterator.next();
                        int j = 0;
                        while (FilteringUtils.areEquals(line, elements[shortestLineIndex+j])){
View Full Code Here

        return lineCollection;
    }

    public List<Line> getSortedLines(){
        List<Line> lines = new ArrayList<Line>(getLineCollection());
        Collections.sort(lines, new LineComparator());
        return lines;
    }
View Full Code Here

        @Override
        public StackTraceElement[] getStackTrace() {
            if (preparedStacktrace == null){
                List<Line> lines = new ArrayList<Line>(stack.getLineCollection());
                Collections.sort(lines, new LineComparator());
                List<StackTraceElement> stacktrace = new ArrayList<StackTraceElement>(lines.size());
                for (Line line : lines) {
                    stacktrace.add(line.getMethod().getStackTraceElement());
                }
                preparedStacktrace = stacktrace.toArray(new StackTraceElement[0]);
View Full Code Here

TOP

Related Classes of org.netbeans.modules.exceptions.utils.LineComparator

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.