Package edu.umd.cs.findbugs

Examples of edu.umd.cs.findbugs.BugAnnotationWithSourceLines


                label.addMouseListener(new BugSummaryMouseListener(bug, label, link));
            }

            label.setText(link.toString());
        } else if (value instanceof BugAnnotationWithSourceLines) {
            BugAnnotationWithSourceLines note = (BugAnnotationWithSourceLines) value;
            final SourceLineAnnotation link = note.getSourceLines();
            String srcStr = "";
            if (link != null && sourceCodeExists(link)) {
                int start = link.getStartLine();
                int end = link.getEndLine();
                if (start < 0 && end < 0) {
                    srcStr = sourceCodeLabel;
                } else if (start == end) {
                    srcStr = " [" + summaryLine + " " + start + "]";
                } else if (start < end) {
                    srcStr = " [" + summaryLines + " " + start + " - " + end + "]";
                }

                if (!srcStr.equals("")) {
                    label.setToolTipText(clickToGoToText + " " + srcStr);
                    label.addMouseListener(new BugSummaryMouseListener(bug, label, link));
                }
            }
            String noteText;
            if (note == bug.getPrimaryMethod() || note == bug.getPrimaryField()) {
                noteText = note.toString();
            } else {
                noteText = note.toString(primaryClass);
            }
            if (!srcStr.equals(sourceCodeLabel)) {
                label.setText(noteText + srcStr);
            } else {
                label.setText(noteText);
View Full Code Here

TOP

Related Classes of edu.umd.cs.findbugs.BugAnnotationWithSourceLines

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.