Examples of LanguageFilter


Examples of net.sourceforge.processdash.tool.diff.LanguageFilter

        this.languageFilters = languageFilters;
    }

    public LanguageFilter selectLanguageFilter(FileToAnalyze file,
            Charset charset, String initialContents, String options) {
        LanguageFilter resultFilter = null;

        String filename = file.getFilename();

        if (languageFilters != null) {
            Iterator i = languageFilters.iterator();
            int currentRating, resultRating = 0;
            while (i.hasNext()) {
                LanguageFilter currentFilter = null;
                try {
                    currentFilter = (LanguageFilter) i.next();
                } catch (ClassCastException e) {
                }
                if (currentFilter == null)
                    continue;

                currentRating = currentFilter.languageMatches(filename,
                    initialContents, options);

                if (currentRating > resultRating) {
                    resultRating = currentRating;
                    resultFilter = currentFilter;
View Full Code Here

Examples of net.sourceforge.processdash.tool.diff.LanguageFilter

        if (fileTraits.binary)
            return new DiffResult(file, BinaryFilter.INSTANCE, options,
                    fileTraits.changeType, null, null);

        LanguageFilter filter = languageFilterSelector.selectLanguageFilter(
            file, charset, fileTraits.initialContents, options);
        if (filter == null)
            return null;

        DiffAnalysisRequest r = new DiffAnalysisRequest(file, filter, options,
View Full Code Here

Examples of net.sourceforge.processdash.tool.diff.LanguageFilter

            out.print(resources.getString("Report.Title"));
            out.println("</h1>");
        }

        // print line describing the language filter in use
        LanguageFilter filter = diff.getFilter();
        String filterHTML = "</i><tt><b>"
            + AbstractLanguageFilter.getFilterName(filter)
            + "</b></tt><i>";
        String options = getParameter("options");
        String key = "Report.Using_Filter_FMT";
        if (options != null && options.length() > 0)
            key = "Report.Using_Filter_Options_FMT";
        out.print("<p><i>");
        out.print(resources.format(key, filterHTML,
                                   "</i><tt><b>"+options+"</b></tt><i>"));
        out.println("</i></p>");

        // print any caveats about this filter's operation.
        out.println("<span class='doNotPrint'>");
        out.flush();
        filter.service(inStream, outStream, env);
        out.println("</span>");
    }
View Full Code Here

Examples of pspdash.LanguageFilter

        } else {
            out.println("<h1>LOC Differences</h1>");
        }

        // print line describing the language filter in use
        LanguageFilter filter = diff.getFilter();
        out.print("<p><i>Using </i><tt><b>");
        out.print(AbstractLanguageFilter.getFilterName(filter));
        out.print("</b></tt><i> filter");
        String options = getParameter("options");
        if (options != null && options.length() > 0) {
            out.print(" with options</i><tt><b> ");
            out.print(options);
            out.print(" </b></tt><i>");
        }
        out.println("</i></p>");

        // print any caveats about this filter's operation.
        out.println("<span class='doNotPrint'>");
        out.flush();
        filter.service(inStream, outStream, env);
        out.println("</span>");
    }
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.