Examples of format()


Examples of org.eclipse.wst.jsdt.core.formatter.CodeFormatter.format()

            // with place holder values
            JsniJavaRefReplacementResult replacementResults = replaceJsniJavaRefs(body);
            body = replacementResults.getJsni();
            CodeFormatter codeFormatter = ToolFactory.createCodeFormatter(javaScriptFormattingPrefs);

            TextEdit formatEdit = codeFormatter.format(CodeFormatter.K_STATEMENTS, body, 0, body.length(),
                    methodIndentLevel + 1, lineDelimiter);

            if (formatEdit != null) {

                body = restoreJsniJavaRefs(replacementResults);
View Full Code Here

Examples of org.eclipse.wst.sse.core.internal.format.IStructuredFormatter.format()

        if (formatter instanceof HTMLFormatter) {
          HTMLFormatter htmlFormatter = (HTMLFormatter) formatter;
          htmlFormatter.formatNode(child, contraints);
        }
        else {
          formatter.format(child);
        }
      }

      if (canInsertBreakAfter(child)) {
        insertBreakAfter(child, contraints);
View Full Code Here

Examples of org.eigenbase.sql.pretty.SqlPrettyWriter.format()

        SqlParser.create("alter system set schema = true").parseStmt();
    SqlSetOption opt = (SqlSetOption) node;
    assertThat(opt.getScope(), equalTo("SYSTEM"));
    assertThat(opt.getName(), equalTo("SCHEMA"));
    SqlPrettyWriter writer = new SqlPrettyWriter(SqlDialect.EIGENBASE);
    assertThat(writer.format(opt.getValue()), equalTo("TRUE"));
    writer = new SqlPrettyWriter(SqlDialect.EIGENBASE);
    assertThat(writer.format(opt),
        equalTo("ALTER SYSTEM SET \"SCHEMA\" = TRUE"));

    check("alter system set \"a number\" = 1",
View Full Code Here

Examples of org.elasticsearch.action.view.ViewRequest.format()

    }

    public void handleRequest(final RestRequest request, final RestChannel channel) {
        ViewRequest viewRequest = new ViewRequest(request.param("index"), request.param("type"), request.param("id"));
        if (request.hasParam("format")) {
            viewRequest.format(request.param("format"));
        }

        // we just send a response, no need to fork
        viewRequest.listenerThreaded(false);
        // we don't spawn, then fork if local
View Full Code Here

Examples of org.exoplatform.portal.mop.page.PageKey.format()

            // Navigation related properties
            addProperty(properties, navigationURIQName, currentNode.getURI());

            // Page related properties
            PageKey pageRef = currentNode.getPageRef();
            UIPage currentPage = currentSite.getUIPage(pageRef != null ? pageRef.format() : null);
            if (currentPage != null) {
                addProperty(properties, pageNameQName, currentPage.getTitle());
            }

            // Site related properties
View Full Code Here

Examples of org.fest.assertions.error.MessageFormatter.format()

  public void should_fail_if_actual_is_not_NaN() {
    try {
      floats.assertIsNaN(description, 8f);
    } catch (org.junit.ComparisonFailure e) {
      MessageFormatter messageFormatter = MessageFormatter.instance();
      String message = messageFormatter.format(description, "expected:<%s> but was:<%s>", Float.NaN, 8f);
      e.getMessage().equalsIgnoreCase(message);
      return;
    }
    expectedAssertionErrorNotThrown();
  }
View Full Code Here

Examples of org.geoserver.util.ISO8601Formatter.format()

        cal.setTimeZone(TimeZone.getTimeZone("GMT"));
        cal.clear();

        // base assertion
        cal.set(Calendar.YEAR, 1);
        assertEquals("0001-01-01T00:00:00.000Z", fmt.format(cal.getTime()));
       
        // according to the spec, the year before is year 0000
        cal.add(Calendar.YEAR, -1);
        assertEquals("0000-01-01T00:00:00.000Z", fmt.format(cal.getTime()));
       
View Full Code Here

Examples of org.geotools.measure.AngleFormat.format()

                final CoordinateOperation op = ReferencingFactoryFinder.getCoordinateOperationFactory(null)
                        .createOperation(crs2D, DefaultGeographicCRS.WGS84);
                bounds = CRS.transform(op, bounds, null);
            }
            final AngleFormat fmt = new AngleFormat("DD°MM.m'");
            fmt.format(new  Latitude(bounds.getMinY()), buffer, null).append('-');
            fmt.format(new  Latitude(bounds.getMaxY()), buffer, null).append(' ');
            fmt.format(new Longitude(bounds.getMinX()), buffer, null).append('-');
            fmt.format(new Longitude(bounds.getMaxX()), buffer, null);
            return buffer.toString();
        } catch (TransformException e) {
View Full Code Here

Examples of org.geotools.measure.CoordinateFormat.format()

            return Math.abs(x1-x2) * getSemiMajorAxis(); // Points are on the equator.
        }
        // Other cases: no solution for this algorithm.
        final CoordinateFormat format = new CoordinateFormat();
        throw new ArithmeticException(Errors.format(ErrorKeys.NO_CONVERGENCE_$2,
                  format.format(new GeneralDirectPosition(Math.toDegrees(x1),Math.toDegrees(y1))),
                  format.format(new GeneralDirectPosition(Math.toDegrees(x2),Math.toDegrees(y2)))));
    }

    /**
     * Compare this ellipsoid with the specified object for equality.
View Full Code Here

Examples of org.geotools.parameter.ParameterWriter.format()

             * if the user ask for a specific math transform.
             */
            final String lineSeparator = System.getProperty("line.separator", "\n");
            for (final OperationMethod method : methods) {
                arguments.out.write(lineSeparator);
                writer.format(method);
            }
        } catch (NoSuchIdentifierException exception) {
            arguments.err.println(exception.getLocalizedMessage());
            return;
        } catch (Exception exception) {
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.