void configure(@NotNull MavenProject mavenProject, @NotNull Project project, @NotNull Module module) {
    Element cfg = mavenProject.getPluginConfiguration("com.googlecode", "maven-idea-plugin");
    if (cfg == null) return;


    configureJdk(cfg, module);

    MavenProjectsManager projectsManager = MavenProjectsManager.getInstance(project);

    String downloadSources = cfg.getChildTextTrim("downloadSources");
    if (!StringUtil.isEmptyOrSpaces(downloadSources)) {
      projectsManager.getImportingSettings().setDownloadSourcesAutomatically(Boolean.parseBoolean(downloadSources));
    }

    String downloadJavadocs = cfg.getChildTextTrim("downloadJavadocs");
    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));
    }

    String autoscrollToSource = cfg.getChildTextTrim("autoscrollToSource");
    if (!StringUtil.isEmptyOrSpaces(autoscrollToSource)) {
      ((ProjectViewImpl)ProjectView.getInstance(project)).setAutoscrollToSource(Boolean.parseBoolean(autoscrollToSource),
                                                                                ProjectViewPane.ID);
    }

    String autoscrollFromSource = cfg.getChildTextTrim("autoscrollFromSource");
    if (!StringUtil.isEmptyOrSpaces(autoscrollFromSource)) {
      ((ProjectViewImpl)ProjectView.getInstance(project)).setAutoscrollFromSource(Boolean.parseBoolean(autoscrollFromSource),
                                                                                  ProjectViewPane.ID);
    }

    String hideEmptyPackages = cfg.getChildTextTrim("hideEmptyPackages");
    if (!StringUtil.isEmptyOrSpaces(hideEmptyPackages)) {
      ProjectView.getInstance(project).setHideEmptyPackages(ProjectViewPane.ID, Boolean.parseBoolean(hideEmptyPackages));
    }

    String optimizeImportsBeforeCommit = cfg.getChildTextTrim("optimizeImportsBeforeCommit");
    if (!StringUtil.isEmptyOrSpaces(optimizeImportsBeforeCommit)) {
      VcsConfiguration.getInstance(module.getProject()).OPTIMIZE_IMPORTS_BEFORE_PROJECT_COMMIT =
        Boolean.parseBoolean(optimizeImportsBeforeCommit);
    }

    String performCodeAnalisisBeforeCommit = cfg.getChildTextTrim("performCodeAnalisisBeforeCommit");
    if (!StringUtil.isEmptyOrSpaces(performCodeAnalisisBeforeCommit)) {
      VcsConfiguration.getInstance(module.getProject()).CHECK_CODE_SMELLS_BEFORE_PROJECT_COMMIT =
        Boolean.parseBoolean(performCodeAnalisisBeforeCommit);
    }

    String reformatCodeBeforeCommit = cfg.getChildTextTrim("reformatCodeBeforeCommit");
    if (!StringUtil.isEmptyOrSpaces(reformatCodeBeforeCommit)) {
      VcsConfiguration vcsConfiguration = VcsConfiguration.getInstance(module.getProject());
      vcsConfiguration.REFORMAT_BEFORE_PROJECT_COMMIT = Boolean.parseBoolean(reformatCodeBeforeCommit);
    }
  }
void configure(@NotNull MavenProject mavenProject, @NotNull Project project, @NotNull Module module)