Package org.watermint.sourcecolon.org.opensolaris.opengrok.analysis

Examples of org.watermint.sourcecolon.org.opensolaris.opengrok.analysis.Definitions


                out.write("\">");
                out.write(rpath.substring(rpath.lastIndexOf('/') + 1)); // htmlize ???
                out.write("</a></td><td>");
                if (sh.sourceContext != null) {
                    Genre genre = Genre.get(doc.get("t"));
                    Definitions tags = null;
                    Fieldable tagsField = doc.getFieldable("tags");
                    if (tagsField != null) {
                        tags = Definitions.deserialize(tagsField.getBinaryValue());
                    }
                    if (Genre.XREFABLE == genre && sh.summerizer != null) {
View Full Code Here


            try {
                Document doc = docs.get(ii);
                String filename = doc.get("path");

                Genre genre = Genre.get(doc.get("t"));
                Definitions tags = null;
                Fieldable tagsField = doc.getFieldable("tags");
                if (tagsField != null) {
                    tags = Definitions.deserialize(tagsField.getBinaryValue());
                }
                int nhits = docs.size();
View Full Code Here

            boolean uniqueDefinition = false;
            if (isSingleDefinitionSearch && hits != null && hits.length == 1) {
                Document doc = searcher.doc(hits[0].doc);
                if (doc.getFieldable("tags") != null) {
                    byte[] rawTags = doc.getFieldable("tags").getBinaryValue();
                    Definitions tags = Definitions.deserialize(rawTags);
                    String symbol = ((TermQuery) query).getTerm().text();
                    if (tags.occurrences(symbol) == 1) {
                        uniqueDefinition = true;
                    }
                }
            }
            // @TODO fix me. I should try to figure out where the exact hit is
View Full Code Here

                    String summary = getSummerizer().getSummary(tags).toString();
                    line.setSummary(summary);
                    file.getLines().add(line);
                } else {
                    Fieldable tagsField = doc.getFieldable("tags");
                    Definitions tags = Definitions.deserialize(tagsField.getBinaryValue());
                    for (Definitions.Tag tag : tags.getTags()) {
                        for (LineMatcher lineMatcher : getSourceContext().getLineMatchers()) {
                            if (lineMatcher.match(tag.symbol) == LineMatcher.MATCHED) {
                                ResultLine line = new ResultLine();
                                line.setSummary(tag.text);
                                line.setLine(tag.text);
View Full Code Here

    public String getPlainContents() {
        ByteArrayOutputStream content = new ByteArrayOutputStream();
        OutputStreamWriter writer = new OutputStreamWriter(content);
        try {
            try (BufferedInputStream bin = new BufferedInputStream(new FileInputStream(getResourceFile()))) {
                Definitions defs = null;

                defs = IndexDatabase.getDefinitions(resourceFile);
                FileAnalyzerFactory a = AnalyzerGuru.find(resourceFile.getName());
                AnalyzerGuru.writeXref(a, new InputStreamReader(bin), writer, defs, Project.getProject(resourceFile));
View Full Code Here

TOP

Related Classes of org.watermint.sourcecolon.org.opensolaris.opengrok.analysis.Definitions

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.