Package com.google.gwt.dev

Examples of com.google.gwt.dev.CompilerContext


    String templatePath = "TemplatePath.ui.xml";
    String implName = "ImplClass";
    Set<Resource> uiResources = getUiResources();
    uiResources.addAll(Arrays.asList(moreJava));
    CompilationState state = CompilationStateBuilder.buildFrom(createLogger(),
        new CompilerContext(), uiResources);
    types = state.getTypeOracle();

    elemProvider = new XMLElementProviderImpl(new AttributeParsers(types, null,
        logger), types, logger, DesignTimeUtilsStub.EMPTY);
View Full Code Here


  @Override
  public void setUp() throws Exception {
    super.setUp();
    CompilationState state = CompilationStateBuilder.buildFrom(
        TreeLogger.NULL, new CompilerContext(), UiJavaResources.getUiResources());
    TypeOracle types = state.getTypeOracle();
    JType stringType = types.parse(String.class.getName());
    JType safeUriType = types.parse(SafeUri.class.getName());
    StringAttributeParser stringParser =
        new StringAttributeParser(new FieldReferenceConverter(null), stringType);
View Full Code Here

  @Override
  public void setUp() throws Exception {
    super.setUp();
    CompilationState state = CompilationStateBuilder.buildFrom(TreeLogger.NULL,
        new CompilerContext(), UiJavaResources.getUiResources());
    TypeOracle types = state.getTypeOracle();
    parser = new HorizontalAlignmentConstantParser(new FieldReferenceConverter(
        null), types.parse(HAC), MortalLogger.NULL);
  }
View Full Code Here

  @Override
  public void setUp() throws Exception {
    super.setUp();
    CompilationState state = CompilationStateBuilder.buildFrom(TreeLogger.NULL,
        new CompilerContext(), UiJavaResources.getUiResources());
    TypeOracle types = state.getTypeOracle();
    parser = new IntAttributeParser(new FieldReferenceConverter(null),
        types.parse("int"), MortalLogger.NULL);
  }
View Full Code Here

  public PublicTagTest() throws UnableToCompleteException {
    // Module has the same name as this class.
    String moduleName = getClass().getCanonicalName();
    moduleDef =
        ModuleDefLoader.loadFromClassPath(getRootLogger(), new CompilerContext(), moduleName);
  }
View Full Code Here

  public PropertyTest() throws UnableToCompleteException {
    // Module has the same name as this class.
    String moduleName = getClass().getCanonicalName();
    moduleDef =
        ModuleDefLoader.loadFromClassPath(getRootLogger(), new CompilerContext(), moduleName);
  }
View Full Code Here

    String moduleName = getClass().getCanonicalName();

    for (String name : Arrays.asList("A", "B", "C", "D")) {
      try {
        ModuleDefLoader.loadFromClassPath(
            TreeLogger.NULL, new CompilerContext(), moduleName + "Bad" + name);
        fail("Test " + name + " should have thrown UnableToCompleteException");
      } catch (UnableToCompleteException e) {
        // OK
      }
    }
View Full Code Here

  public void setUp() throws Exception {
    PrintWriterTreeLogger logger = new PrintWriterTreeLogger(new PrintWriter(
        System.err));
    logger.setMaxDetail(TreeLogger.ERROR);
    CompilationState cs = CompilationStateBuilder.buildFrom(logger,
        new CompilerContext(), getResources());
    oracle = cs.getTypeOracle();
    rootType = oracle.findType("test.A");
    intMethod = rootType.findMethod("i", new JType[0]);
    stringMethod = oracle.findType("test.D").findMethod("string", new JType[0]);
    voidMethod = rootType.findMethod("v", new JType[0]);
View Full Code Here

  public TestSuperAndSourceTags() throws UnableToCompleteException {
    // Module has the same name as this class.
    String moduleName = getClass().getCanonicalName();
    moduleDef =
        ModuleDefLoader.loadFromClassPath(getRootLogger(), new CompilerContext(), moduleName);
  }
View Full Code Here

  private static TypeOracle getTestTypeOracle() throws UnableToCompleteException {
    if (sTypeOracle == null) {
      TreeLogger logger = createLogger();
      CompilerContext.Builder compilerContextBuilder = new CompilerContext.Builder();
      CompilerContext compilerContext = compilerContextBuilder.build();
      ModuleDef moduleDef = ModuleDefLoader.createSyntheticModule(logger, compilerContext,
          "com.google.gwt.user.rebind.rpc.testcases.RebindRPCTestCases.JUnit", new String[] {
              "com.google.gwt.user.rebind.rpc.testcases.RebindRPCTestCases",
              "com.google.gwt.junit.JUnit"}, true);
      compilerContext = compilerContextBuilder.module(moduleDef).build();
View Full Code Here

TOP

Related Classes of com.google.gwt.dev.CompilerContext

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.