<commit_before>/*
 * Copyright 2016 Red Hat, Inc. and/or its affiliates.
 *
 * Licensed under the Eclipse Public License version 1.0, available at
 * http://www.eclipse.org/legal/epl-v10.html
 */
package org.jboss.forge.addon.springboot.project;

import java.util.ArrayList;
import java.util.List;

import org.jboss.forge.addon.parser.java.facets.JavaCompilerFacet;
import org.jboss.forge.addon.parser.java.facets.JavaSourceFacet;
import org.jboss.forge.addon.projects.AbstractProjectType;
import org.jboss.forge.addon.projects.ProjectFacet;
import org.jboss.forge.addon.projects.facets.DependencyFacet;
import org.jboss.forge.addon.projects.facets.MetadataFacet;
import org.jboss.forge.addon.projects.facets.PackagingFacet;
import org.jboss.forge.addon.projects.facets.ResourcesFacet;
import org.jboss.forge.addon.projects.facets.WebResourcesFacet;
import org.jboss.forge.addon.projects.stacks.Stack;
import org.jboss.forge.addon.springboot.commands.setup.SetupProjectCommand;
import org.jboss.forge.addon.ui.wizard.UIWizardStep;

public class SpringBootProjectType extends AbstractProjectType
{

   @Override
   public boolean supports(Stack stack)
   {
      return false;
   }

   @Override
   public String getType()
   {
      return "Spring Boot";
   }

   @Override
   public Iterable<Class<? extends ProjectFacet>> getRequiredFacets()
   {
      List<Class<? extends ProjectFacet>> result = new ArrayList<Class<? extends ProjectFacet>>(7);
      result.add(MetadataFacet.class);
      result.add(PackagingFacet.class);
      result.add(DependencyFacet.class);
      result.add(ResourcesFacet.class);
      result.add(WebResourcesFacet.class);
      result.add(JavaSourceFacet.class);
      result.add(JavaCompilerFacet.class);
      return result;
   }

   @Override
   public int priority()
   {
      return 100;
   }

   @Override
   public Class<? extends UIWizardStep> getSetupFlow()
   {
      return SetupProjectCommand.class;<commit_msg>Use constant for required facets.<commit_after>/*
 * Copyright 2016 Red Hat, Inc. and/or its affiliates.
 *
 * Licensed under the Eclipse Public License version 1.0, available at
 * http://www.eclipse.org/legal/epl-v10.html
 */
package org.jboss.forge.addon.springboot.project;

import org.jboss.forge.addon.parser.java.facets.JavaCompilerFacet;
import org.jboss.forge.addon.parser.java.facets.JavaSourceFacet;
import org.jboss.forge.addon.projects.AbstractProjectType;
import org.jboss.forge.addon.projects.ProjectFacet;
import org.jboss.forge.addon.projects.facets.*;
import org.jboss.forge.addon.projects.stacks.Stack;
import org.jboss.forge.addon.springboot.commands.setup.SetupProjectCommand;
import org.jboss.forge.addon.ui.wizard.UIWizardStep;

import java.util.ArrayList;
import java.util.List;

public class SpringBootProjectType extends AbstractProjectType
{
   private static final List<Class<? extends ProjectFacet>> REQUIRED_FACETS = new ArrayList<>(7);

   static {
      REQUIRED_FACETS.add(MetadataFacet.class);
      REQUIRED_FACETS.add(PackagingFacet.class);
      REQUIRED_FACETS.add(DependencyFacet.class);
      REQUIRED_FACETS.add(ResourcesFacet.class);
      REQUIRED_FACETS.add(WebResourcesFacet.class);
      REQUIRED_FACETS.add(JavaSourceFacet.class);
      REQUIRED_FACETS.add(JavaCompilerFacet.class);
   }

   @Override
   public boolean supports(Stack stack)
   {
      return false;
   }

   @Override
   public String getType()
   {
      return "Spring Boot";
   }

   @Override
   public Iterable<Class<? extends ProjectFacet>> getRequiredFacets()
   {
      return REQUIRED_FACETS;
   }

   @Override
   public int priority()
   {
      return 100;
   }

   @Override
   public Class<? extends UIWizardStep> getSetupFlow()
   {
      return SetupProjectCommand.class;
{'fraction_non_alphanumeric': 0.1062300319488818, 'fraction_numerical': 0.006389776357827476, 'mean_word_length': 4.063342318059299, 'pattern_counts': {'":': 0, '<': 16, '<?xml version=': 0, '>': 16, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5031498', 'n_tokens_mistral': 1291, 'n_tokens_neox': 1196, 'n_words': 209}