IDEA-108202 Create maven configured workspace.
authorSergey Evdokimov <sergey.evdokimov@jetbrains.com>
Tue, 15 Oct 2013 10:34:38 +0000 (14:34 +0400)
committerSergey Evdokimov <sergey.evdokimov@jetbrains.com>
Tue, 15 Oct 2013 10:35:03 +0000 (14:35 +0400)
Support "assertNotNull" property.

plugins/maven/src/main/java/org/jetbrains/idea/maven/importing/configurers/MavenIdeaPluginConfigurer.java

index e37ae8ccde9a2cdcf0ccba1fe09ecf4a055cc90b..986a3ef3bcffce67a93bf5b197c622ff43688c9e 100644 (file)
@@ -15,6 +15,7 @@
  */
 package org.jetbrains.idea.maven.importing.configurers;
 
+import com.intellij.compiler.CompilerConfiguration;
 import com.intellij.openapi.module.Module;
 import com.intellij.openapi.project.Project;
 import com.intellij.openapi.projectRoots.JavaSdk;
@@ -54,6 +55,11 @@ public class MavenIdeaPluginConfigurer extends MavenModuleConfigurer {
     if (!StringUtil.isEmptyOrSpaces(downloadJavadocs)) {
       projectsManager.getImportingSettings().setDownloadDocsAutomatically(Boolean.parseBoolean(downloadJavadocs));
     }
+
+    String assertNotNull = cfg.getChildTextTrim("assertNotNull");
+    if (!StringUtil.isEmptyOrSpaces(assertNotNull)) {
+      CompilerConfiguration.getInstance(project).setAddNotNullAssertions(Boolean.parseBoolean(assertNotNull));
+    }
   }
 
   private static void configureJdk(Element cfg, @NotNull Module module) {