Package com.google.gwt.dev.resource

Examples of com.google.gwt.dev.resource.ResourceOracle


  @Override
  public String generate(TreeLogger logger, GeneratorContext genCtx,
                         String fqInterfaceName) throws UnableToCompleteException {
    TypeOracle oracle = genCtx.getTypeOracle();
    ResourceOracle resourceOracle = genCtx.getResourcesOracle();

    JClassType interfaceType;
    try {
      interfaceType = oracle.getType(fqInterfaceName);
    }
View Full Code Here


  @Override
  public String generate(TreeLogger logger, GeneratorContext genCtx,
                         String fqInterfaceName) throws UnableToCompleteException {
    TypeOracle oracle = genCtx.getTypeOracle();
    ResourceOracle resourceOracle = genCtx.getResourcesOracle();

    JClassType interfaceType;
    try {
      interfaceType = oracle.getType(fqInterfaceName);
    }
View Full Code Here

  @Override
  public String generate(TreeLogger logger, GeneratorContext genCtx,
      String fqInterfaceName) throws UnableToCompleteException {
    TypeOracle oracle = genCtx.getTypeOracle();
    ResourceOracle resourceOracle = genCtx.getResourcesOracle();   

    JClassType interfaceType;
    try {
      interfaceType = oracle.getType(fqInterfaceName);
    } catch (NotFoundException e) {
View Full Code Here

  @Override
  public String generate(TreeLogger logger, GeneratorContext context, String typeName) throws UnableToCompleteException {

    TypeOracle typeOracle = context.getTypeOracle();
    PropertyOracle propOracle = context.getPropertyOracle();
    ResourceOracle resOracle = context.getResourcesOracle();
   
    JClassType classType;
    try {
      classType = typeOracle.getType(typeName);
    } catch (NotFoundException e) {
      e.printStackTrace();
      return null;
    }
   
    SelectionProperty localeProperty = null;
    try {
      localeProperty = propOracle.getSelectionProperty(logger, "locale");
    } catch (BadPropertyValueException e) {
      e.printStackTrace();
    }
   
    String locale = localeProperty.getCurrentValue();
   
    String resourceName = typeName.replace('.', '/')+"_"+locale+".properties";
    for(Resource r : resOracle.getResources()) {
      if(!resourceName.equals(r.getPath()))
        continue;
     
      InputStream in = r.openContents();
      try {
View Full Code Here

    @Override
    public String generate(TreeLogger logger, GeneratorContext genCtx,
            String fqInterfaceName) throws UnableToCompleteException {
        TypeOracle oracle = genCtx.getTypeOracle();
        ResourceOracle resourceOracle = genCtx.getResourcesOracle();

        JClassType interfaceType;
        try {
            interfaceType = oracle.getType(fqInterfaceName);
        } catch (NotFoundException e) {
View Full Code Here

  @Override
  public String generate(TreeLogger logger, GeneratorContext genCtx,
      String fqInterfaceName) throws UnableToCompleteException {
    TypeOracle oracle = genCtx.getTypeOracle();
    ResourceOracle resourceOracle = genCtx.getResourcesOracle();

    JClassType interfaceType;
    try {
      interfaceType = oracle.getType(fqInterfaceName);
    } catch (NotFoundException e) {
View Full Code Here

            "Unable to determine current working directory", e);
        return;
      }
    }

    ResourceOracle oracle = createResourceOracle(logger);
    PrintWriter out = createWriter(logger);

    // Sort the entries to provide consistent behavior
    TreeSet<Resource> sortedResources = new TreeSet<Resource>(
        new Comparator<Resource>() {
          public int compare(Resource o1, Resource o2) {
            return o1.getPath().compareTo(o2.getPath());
          }
        });
    sortedResources.addAll(oracle.getResources());

    writeMethods(logger, out, sortedResources);

    out.close();
  }
View Full Code Here

            logger, designTime);
    doc = docHelper.documentFor(domString, null);
    item = (Element) doc.getDocumentElement().getElementsByTagName("with").item(0);
    elm = elemProvider.get(item);
    JClassType aClass = types.findType(baseClass);
    ResourceOracle resourceOracle = new MockResourceOracle();
    writer = new UiBinderWriter(aClass, "foo", "", types, logger, fieldManager, null,
        DesignTimeUtilsStub.EMPTY, new UiBinderContext(), true, true, "", resourceOracle);
    parser = new UiBinderParser(writer, null, fieldManager, types, null, "", new UiBinderContext(),
        resourceOracle);
    designTime.rememberPathForElements(doc);
View Full Code Here

    elm = elemProvider.get(item);
    JClassType aClass = types.findType(baseClass);
    MessagesWriter messages =
        new MessagesWriter(types, BINDER_URI, logger, rendererClass.getPath(), "rendererPackage",
            "rendererClassName");
    ResourceOracle resourceOracle = new MockResourceOracle();
    writer = new UiBinderWriter(aClass, "foo", "", types, logger, fieldManager, messages,
        DesignTimeUtilsStub.EMPTY, uiBinderCtx, true, true, BINDER_URI, resourceOracle);
    parser = new UiBinderParser(writer, messages, fieldManager, types, null, BINDER_URI,
        new UiBinderContext(), resourceOracle);
    designTime.rememberPathForElements(doc);
View Full Code Here

  public boolean run(TreeLogger logger) throws UnableToCompleteException {
    loop_modules : for (String moduleName : options.getModuleNames()) {
      ModuleDef module =
          ModuleDefLoader.loadFromClassPath(logger, compilerContext, moduleName);
      compilerContext = compilerContextBuilder.module(module).build();
      ResourceOracle publicResourceOracle = compilerContext.getPublicResourceOracle();

      File compilerWorkDir = options.getCompilerWorkDir(moduleName);

      // Look for the compilerOptions file output from running AnalyzeModule
      PrecompileTaskOptions precompileOptions = AnalyzeModule.readAnalyzeModuleOptionsFile(
View Full Code Here

TOP

Related Classes of com.google.gwt.dev.resource.ResourceOracle

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.