Package edu.umd.cs.findbugs.xml

Examples of edu.umd.cs.findbugs.xml.XMLAttributeList.addAttribute()


        String classname = getClassName();
        String sourcePath = getSourcePath();

        XMLAttributeList attributeList = new XMLAttributeList().addAttribute("classname", classname);
        if (isPrimary) {
            attributeList.addAttribute("primary", "true");
        }

        int n = getStartLine(); // start/end are now optional (were too many
        // "-1"s in the xml)
        if (n >= 0) {
View Full Code Here


        }

        int n = getStartLine(); // start/end are now optional (were too many
        // "-1"s in the xml)
        if (n >= 0) {
            attributeList.addAttribute("start", String.valueOf(n));
        }
        n = getEndLine();
        if (n >= 0) {
            attributeList.addAttribute("end", String.valueOf(n));
        }
View Full Code Here

        if (n >= 0) {
            attributeList.addAttribute("start", String.valueOf(n));
        }
        n = getEndLine();
        if (n >= 0) {
            attributeList.addAttribute("end", String.valueOf(n));
        }
        n = getStartBytecode(); // startBytecode/endBytecode haven't been set
        // for a while now
        if (n >= 0) {
            attributeList.addAttribute("startBytecode", String.valueOf(n));
View Full Code Here

            attributeList.addAttribute("end", String.valueOf(n));
        }
        n = getStartBytecode(); // startBytecode/endBytecode haven't been set
        // for a while now
        if (n >= 0) {
            attributeList.addAttribute("startBytecode", String.valueOf(n));
        }
        n = getEndBytecode();
        if (n >= 0) {
            attributeList.addAttribute("endBytecode", String.valueOf(n));
        }
View Full Code Here

        if (n >= 0) {
            attributeList.addAttribute("startBytecode", String.valueOf(n));
        }
        n = getEndBytecode();
        if (n >= 0) {
            attributeList.addAttribute("endBytecode", String.valueOf(n));
        }

        if (isSourceFileKnown()) {
            attributeList.addAttribute("sourcefile", sourceFile);
            attributeList.addAttribute("sourcepath", sourcePath);
View Full Code Here

        if (n >= 0) {
            attributeList.addAttribute("endBytecode", String.valueOf(n));
        }

        if (isSourceFileKnown()) {
            attributeList.addAttribute("sourcefile", sourceFile);
            attributeList.addAttribute("sourcepath", sourcePath);
            Project project = myProject.get();
            if (project != null) {
                try {
                    SourceFinder mySourceFinder = project.getSourceFinder();
View Full Code Here

            attributeList.addAttribute("endBytecode", String.valueOf(n));
        }

        if (isSourceFileKnown()) {
            attributeList.addAttribute("sourcefile", sourceFile);
            attributeList.addAttribute("sourcepath", sourcePath);
            Project project = myProject.get();
            if (project != null) {
                try {
                    SourceFinder mySourceFinder = project.getSourceFinder();
                    String fullPath = new File(mySourceFinder.findSourceFile(this).getFullFileName()).getCanonicalPath();
View Full Code Here

                try {
                    SourceFinder mySourceFinder = project.getSourceFinder();
                    String fullPath = new File(mySourceFinder.findSourceFile(this).getFullFileName()).getCanonicalPath();
                    String myRelativeSourceBase = relativeSourceBase.get();
                    if (fullPath.startsWith(myRelativeSourceBase) && fullPath.length() > myRelativeSourceBase.length()) {
                        attributeList.addAttribute("relSourcepath", fullPath.substring(myRelativeSourceBase.length() + 1));
                    }
                } catch (IOException e) {
                    assert true;
                }
            }
View Full Code Here

            }
        }

        String role = getDescription();
        if (!role.equals(DEFAULT_ROLE)) {
            attributeList.addAttribute("role", getDescription());
        }
        if (synthetic) {
            attributeList.addAttribute("synthetic", "true");
        }
        if (addMessages) {
View Full Code Here

        String role = getDescription();
        if (!role.equals(DEFAULT_ROLE)) {
            attributeList.addAttribute("role", getDescription());
        }
        if (synthetic) {
            attributeList.addAttribute("synthetic", "true");
        }
        if (addMessages) {
            xmlOutput.openTag(ELEMENT_NAME, attributeList);
            xmlOutput.openTag("Message");
            xmlOutput.writeText(this.toString());
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.