Example usage for com.google.gwt.uibinder.rebind MortalLogger MortalLogger

List of usage examples for com.google.gwt.uibinder.rebind MortalLogger MortalLogger

Introduction

In this page you can find the example usage for com.google.gwt.uibinder.rebind MortalLogger MortalLogger.

Prototype

public MortalLogger(TreeLogger logger) 

Source Link

Usage

From source file:com.gwtplatform.carstore.rebind.ColumnsInitializerGenerator.java

License:Apache License

@Override
public String generate(TreeLogger treeLogger, GeneratorContext generatorContext, String typeName)
        throws UnableToCompleteException {
    logger = new MortalLogger(treeLogger);
    type = GeneratorUtil.getType(typeName, generatorContext.getTypeOracle(), logger);

    injector = Guice.createInjector(new RebindModule(logger, generatorContext));

    return generateColumnsIntializer();
}

From source file:com.xemantic.tadedon.gwt.field.rebind.UiFieldAccessorGenerator.java

License:Apache License

/** {@inheritDoc} */
@Override//from  w ww  .j av a2s  .  c  om
public String generate(TreeLogger logger, GeneratorContext context, String typeName)
        throws UnableToCompleteException {
    TypeOracle oracle = context.getTypeOracle();
    JClassType interfaceType;
    try {
        interfaceType = oracle.getType(typeName);
    } catch (NotFoundException e) {
        throw new RuntimeException(e);
    }

    String implName = interfaceType.getName().replace('.', '_') + "Impl";
    String packageName = interfaceType.getPackage().getName();

    PrintWriter out = context.tryCreate(logger, packageName, implName);
    if (out != null) {
        UiFieldAccessorGenerators.write(new MortalLogger(logger), context, packageName, implName, interfaceType,
                out, m_uiBinderCtx);
    }
    context.commit(logger, out);
    return packageName + "." + implName;
}