org.eclipse.wst.jsdt.chromium.debug.jsdtbridge

## Class AdHocFormatter

- java.lang.Object
- - org.eclipse.wst.jsdt.chromium.debug.jsdtbridge.AdHocFormatter

    public class AdHocFormatter
    extends java.lang.Object

A relatively simple `String.indexOf(int)`-based formatter that inserts newlines after semicolons and maintains indentations based on curly brace symbols it meets. The quality of work is quite poor: it doesn't recognize string literals or comments and will format their internals as well.

(Technical details: in JavaScript one cannot detect RegExp syntax without doing a full parsing; since RegExp syntax allows quotes among other symbols, one cannot also detect string literals; consequently there's no way one can detect comments. That's why all this syntax elements remain unrecognized.)

### Constructor Summary

Constructors
Constructor and Description
`AdHocFormatter()`

### Method Summary

All Methods Static Methods Concrete Methods
`static TextEdit` `format(java.lang.String source, java.lang.String header)`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Constructor Detail

#### AdHocFormatter

    public AdHocFormatter()

### Method Detail

#### format

    public static TextEdit format(java.lang.String source,
                                  java.lang.String header)