Added SOURCE_ROOTS_KEY for compiler configuration.

This commit is contained in:
Evgeny Gerashchenko
2012-07-09 18:00:23 +04:00
parent 8aee0e0543
commit d8b0070f1e
2 changed files with 34 additions and 0 deletions
@@ -28,6 +28,7 @@ import com.intellij.psi.PsiManager;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.jet.asJava.JavaElementFinder;
import org.jetbrains.jet.cli.jvm.JVMConfigurationKeys;
import org.jetbrains.jet.config.CommonConfigurationKeys;
import org.jetbrains.jet.config.CompilerConfiguration;
import org.jetbrains.jet.lang.parsing.JetParser;
import org.jetbrains.jet.lang.parsing.JetParserDefinition;
@@ -88,6 +89,9 @@ public class JetCoreEnvironment extends JavaCoreEnvironment {
for (File path : configuration.getList(JVMConfigurationKeys.ANNOTATIONS_PATH_KEY)) {
addExternalAnnotationsRoot(PathUtil.jarFileOrDirectoryToVirtualFile(path));
}
for (String path : configuration.getList(CommonConfigurationKeys.SOURCE_ROOTS_KEY)) {
addSources(path);
}
JetStandardLibrary.initialize(getProject());
}
@@ -0,0 +1,30 @@
/*
* Copyright 2010-2012 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.jetbrains.jet.config;
import com.intellij.openapi.util.Key;
import java.util.List;
/**
* @author Evgeny Gerashchenko
* @since 7/9/12
*/
public class CommonConfigurationKeys {
public static final Key<List<String>> SOURCE_ROOTS_KEY = Key.create("source roots");
}