Package org.watermint.sourcecolon.org.opensolaris.opengrok.configuration

Examples of org.watermint.sourcecolon.org.opensolaris.opengrok.configuration.RuntimeEnvironment


    }

    static void listFrequentTokens(List<String> subFiles) throws IOException {
        final int limit = 4;

        RuntimeEnvironment env = RuntimeEnvironment.getInstance();
        if (env.hasProjects()) {
            if (subFiles == null || subFiles.isEmpty()) {
                for (Project project : env.getProjects()) {
                    IndexDatabase db = new IndexDatabase(project);
                    db.listTokens(4);
                }
            } else {
                for (String path : subFiles) {
View Full Code Here


     *         it cannot be located.
     */
    public static IndexReader getIndexReader(String path) {
        IndexReader ret = null;

        RuntimeEnvironment env = RuntimeEnvironment.getInstance();
        File indexDir = new File(env.getDataRootFile(), "index");

        if (env.hasProjects()) {
            Project p = Project.getProject(path);
            if (p == null) {
                return null;
            }
            indexDir = new File(indexDir, p.getPath());
View Full Code Here

     * @throws ParseException         if an error happens when building the Lucene query
     * @throws ClassNotFoundException if the class for the stored definitions
     *                                instance cannot be found
     */
    public static Definitions getDefinitions(File file) throws IOException, ParseException, ClassNotFoundException {
        RuntimeEnvironment env = RuntimeEnvironment.getInstance();
        String path = env.getPathRelativeToSourceRoot(file, 0);

        IndexReader indexReader = getIndexReader(path);

        if (indexReader == null) {
            // No index, no definitions...
View Full Code Here

TOP

Related Classes of org.watermint.sourcecolon.org.opensolaris.opengrok.configuration.RuntimeEnvironment

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.