All Downloads are FREE. Search and download functionalities are using the official Maven repository.

play.TemplateImports Maven / Gradle / Ivy

There is a newer version: 2.9.0-M6
Show newest version
/*
 * Copyright (C) Lightbend Inc. 
 */

package play;

import java.util.Arrays;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;

public class TemplateImports {

  public static final List minimalJavaTemplateImports;
  public static final List defaultJavaTemplateImports;
  public static final List defaultScalaTemplateImports;

  private static final List defaultTemplateImports =
      Collections.unmodifiableList(
          Arrays.asList(
              "models._",
              "controllers._",
              "play.api.i18n._",
              "views.%format%._",
              "play.api.templates.PlayMagic._"));

  static {
    List minimalJavaImports = new ArrayList();
    minimalJavaImports.addAll(defaultTemplateImports);
    minimalJavaImports.add("java.lang._");
    minimalJavaImports.add("java.util._");
    minimalJavaImports.add("play.core.j.PlayMagicForJava._");
    minimalJavaImports.add("play.mvc._");
    minimalJavaImports.add("play.api.data.Field");
    minimalJavaTemplateImports = Collections.unmodifiableList(minimalJavaImports);

    List defaultJavaImports = new ArrayList();
    defaultJavaImports.addAll(minimalJavaTemplateImports);
    defaultJavaImports.add("play.data._");
    defaultJavaImports.add("play.core.j.PlayFormsMagicForJava._");
    defaultJavaTemplateImports = Collections.unmodifiableList(defaultJavaImports);

    List scalaImports = new ArrayList();
    scalaImports.addAll(defaultTemplateImports);
    scalaImports.add("play.api.mvc._");
    scalaImports.add("play.api.data._");
    defaultScalaTemplateImports = Collections.unmodifiableList(scalaImports);
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy