Examples of JavaSourceDocument


Examples of edu.umd.cs.findbugs.sourceViewer.JavaSourceDocument

    private JavaSourceDocument getDocument(SourceLineAnnotation source) {
        try {
            SourceFile sourceFile = frame.getProject().getSourceFinder().findSourceFile(source);
            String fullFileName = sourceFile.getFullFileName();
            SoftReference<JavaSourceDocument> resultReference = map.get(fullFileName);
            JavaSourceDocument result = null;
            if (resultReference != null) {
                result = resultReference.get();
            }
            if (result != null) {
                return result;
            }
            try {
                InputStream in = sourceFile.getInputStream();
                result = new JavaSourceDocument(source.getClassName(), SourceCharset.bufferedReader(in), sourceFile);
            } catch (Exception e) {
                result = JavaSourceDocument.UNKNOWNSOURCE;
                Debug.println(e); // e.printStackTrace();
            }
            map.put(fullFileName, new SoftReference<JavaSourceDocument>(result));
View Full Code Here

Examples of edu.umd.cs.findbugs.sourceViewer.JavaSourceDocument

                frame.clearSourcePane();
                continue;
            }

            try {
                JavaSourceDocument src = getDocument(mySourceLine);
                this.myDocument = src;
                src.getHighlightInformation().clear();
                String primaryKind = mySourceLine.getDescription();
                // Display myBug and mySourceLine
                for (Iterator<BugAnnotation> i = myBug.annotationIterator(); i.hasNext();) {
                    BugAnnotation annotation = i.next();
                    if (annotation instanceof SourceLineAnnotation) {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.