Search in sources :

Example 6 with JpsJavaCompilerOptions

use of org.jetbrains.jps.model.java.compiler.JpsJavaCompilerOptions in project intellij-community by JetBrains.

the class JpsJavaCompilerOptionsSerializer method loadExtensionWithDefaultSettings.

@Override
public void loadExtensionWithDefaultSettings(@NotNull JpsProject project) {
    JpsJavaCompilerConfiguration configuration = JpsJavaExtensionService.getInstance().getOrCreateCompilerConfiguration(project);
    configuration.setCompilerOptions(myCompilerId, new JpsJavaCompilerOptions());
}
Also used : JpsJavaCompilerConfiguration(org.jetbrains.jps.model.java.compiler.JpsJavaCompilerConfiguration) JpsJavaCompilerOptions(org.jetbrains.jps.model.java.compiler.JpsJavaCompilerOptions)

Example 7 with JpsJavaCompilerOptions

use of org.jetbrains.jps.model.java.compiler.JpsJavaCompilerOptions in project intellij-plugins by JetBrains.

the class BndProjectImporter method setupProject.

public void setupProject() {
    LanguageLevel sourceLevel = LanguageLevel.parse(myWorkspace.getProperty(JAVAC_SOURCE));
    if (sourceLevel != null) {
        LanguageLevelProjectExtension.getInstance(myProject).setLanguageLevel(sourceLevel);
    }
    String targetLevel = myWorkspace.getProperty(JAVAC_TARGET);
    CompilerConfiguration.getInstance(myProject).setProjectBytecodeTarget(targetLevel);
    // compilation options (see Project#getCommonJavac())
    JpsJavaCompilerOptions javacOptions = JavacConfiguration.getOptions(myProject, JavacConfiguration.class);
    javacOptions.DEBUGGING_INFO = booleanProperty(myWorkspace.getProperty("javac.debug", "true"));
    javacOptions.DEPRECATION = booleanProperty(myWorkspace.getProperty("java.deprecation"));
    javacOptions.ADDITIONAL_OPTIONS_STRING = myWorkspace.getProperty("java.options", "");
}
Also used : LanguageLevel(com.intellij.pom.java.LanguageLevel) JpsJavaCompilerOptions(org.jetbrains.jps.model.java.compiler.JpsJavaCompilerOptions)

Aggregations

JpsJavaCompilerOptions (org.jetbrains.jps.model.java.compiler.JpsJavaCompilerOptions)7 JpsJavaCompilerConfiguration (org.jetbrains.jps.model.java.compiler.JpsJavaCompilerConfiguration)3 NotNull (org.jetbrains.annotations.NotNull)2 LanguageLevel (com.intellij.pom.java.LanguageLevel)1 JpsCompilerExcludes (org.jetbrains.jps.model.java.compiler.JpsCompilerExcludes)1 ProcessorConfigProfile (org.jetbrains.jps.model.java.compiler.ProcessorConfigProfile)1