Package com.google.gwt.user.rebind

Examples of com.google.gwt.user.rebind.SourceWriter.indent()


        writer.println("getPresenter( new AsyncCallback<" + presenterClassName
            + ">(){");
        writer.indent();
        writer.indent();
        writer.println("public void onSuccess(" + presenterClassName + " p ) {");
        writer.indent();
        writer.print("String title = p.");
        writeTitleFunction(titleFunctionDescription, writer);
        writer.println();
        writer.println("event.getHandler().onSetPlaceTitle( title );");
        writer.outdent();
View Full Code Here


      if (titleFunctionDescription != null
          && !titleFunctionDescription.isStatic
          && !titleFunctionDescription.returnString) {
        writer.println();
        writer.println("protected void getPlaceTitle(final GetPlaceTitleEvent event) {");
        writer.indent();
        writer.println("getPresenter( new AsyncCallback<" + presenterClassName
            + ">(){");
        writer.indent();
        writer.indent();
        writer.print("public void onSuccess(" + presenterClassName
View Full Code Here

        writer.println();
        writer.println("protected void getPlaceTitle(final GetPlaceTitleEvent event) {");
        writer.indent();
        writer.println("getPresenter( new AsyncCallback<" + presenterClassName
            + ">(){");
        writer.indent();
        writer.indent();
        writer.print("public void onSuccess(" + presenterClassName
            + " p ) { p.");
        writeTitleFunction(titleFunctionDescription, writer);
        writer.println(" }");
View Full Code Here

        writer.println("protected void getPlaceTitle(final GetPlaceTitleEvent event) {");
        writer.indent();
        writer.println("getPresenter( new AsyncCallback<" + presenterClassName
            + ">(){");
        writer.indent();
        writer.indent();
        writer.print("public void onSuccess(" + presenterClassName
            + " p ) { p.");
        writeTitleFunction(titleFunctionDescription, writer);
        writer.println(" }");
        writer.println("public void onFailure(Throwable t) { event.getHandler().onSetPlaceTitle(null); }");
View Full Code Here

    }

    // Constructor
    writer.println();
    writer.println("public " + implClassName + "() {");
    writer.indent();
    writer.println("DelayedBindRegistry.register(this);");
    writer.outdent();
    writer.println("}");

    // BEGIN Bind method
View Full Code Here

    // BEGIN Bind method
    writer.println();
    writer.println("@Override");
    writer.println("public void delayedBind(Ginjector baseGinjector) {");
    writer.indent();
    writeGinjector(writer, ginjectorClassName);
    if (nameToken == null) {
      // Standard proxy (not a Place)

      if (tabContainerClass != null) {
View Full Code Here

        // public Request<Foo> doFoo(final Foo foo) {
        sw.println("public %s %s %s(%s) {", typeParameterDeclaration,
            jmethod.getReturnType().getParameterizedQualifiedSourceName(),
            jmethod.getName(), parameterDeclaration);
        sw.indent();
        // The implements clause covers InstanceRequest
        // class X extends AbstractRequest<Return> implements Request<Return> {
        sw.println("class X extends %s<%s> implements %s {",
            AbstractRequest.class.getCanonicalName(),
            request.getDataType().getParameterizedQualifiedSourceName(),
View Full Code Here

        // class X extends AbstractRequest<Return> implements Request<Return> {
        sw.println("class X extends %s<%s> implements %s {",
            AbstractRequest.class.getCanonicalName(),
            request.getDataType().getParameterizedQualifiedSourceName(),
            jmethod.getReturnType().getParameterizedQualifiedSourceName());
        sw.indent();

        // public X() { super(FooRequestContext.this); }
        sw.println("public X() { super(%s.this);}",
            method.getSimpleSourceName());
View Full Code Here

      }

      // For each entity property, create a sub-delegate and initialize
      sw.println("protected void attachSubEditors(%s delegateMap) {",
          DelegateMap.class.getCanonicalName());
      sw.indent();
      for (EditorData d : data) {
        String subDelegateType = getEditorDelegate(d);
        sw.println("if (editor.%s != null) {", d.getSimpleExpression());
        sw.indent();
        if (d.isDelegateRequired()) {
View Full Code Here

          DelegateMap.class.getCanonicalName());
      sw.indent();
      for (EditorData d : data) {
        String subDelegateType = getEditorDelegate(d);
        sw.println("if (editor.%s != null) {", d.getSimpleExpression());
        sw.indent();
        if (d.isDelegateRequired()) {
          sw.println("%s = new %s();", delegateFields.get(d), subDelegateType);
          writeDelegateInitialization(sw, d, delegateFields);
          sw.println("delegateMap.put(%1$s.getObject(), %1$s);",
              delegateFields.get(d));
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.