Class JavascriptFormatter
- java.lang.Object
-
- net.revelc.code.formatter.AbstractCacheableFormatter
-
- net.revelc.code.formatter.javascript.JavascriptFormatter
-
- All Implemented Interfaces:
Formatter
public class JavascriptFormatter extends AbstractCacheableFormatter implements Formatter
-
-
Field Summary
-
Fields inherited from class net.revelc.code.formatter.AbstractCacheableFormatter
encoding, log
-
-
Constructor Summary
Constructors Constructor Description JavascriptFormatter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
doFormat(String code, LineEnding ending)
void
init(Map<String,String> options, ConfigurationSource cfg)
Initialize theCodeFormatter
instance to be used by this component.boolean
isInitialized()
return true if this formatter have been initialized-
Methods inherited from class net.revelc.code.formatter.AbstractCacheableFormatter
formatFile, initCfg
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface net.revelc.code.formatter.Formatter
formatFile
-
-
-
-
Method Detail
-
init
public void init(Map<String,String> options, ConfigurationSource cfg)
Description copied from interface:Formatter
Initialize theCodeFormatter
instance to be used by this component.- Specified by:
init
in interfaceFormatter
- Specified by:
init
in classAbstractCacheableFormatter
-
doFormat
public String doFormat(String code, LineEnding ending) throws IOException, org.eclipse.jface.text.BadLocationException
- Specified by:
doFormat
in classAbstractCacheableFormatter
- Throws:
IOException
org.eclipse.jface.text.BadLocationException
-
isInitialized
public boolean isInitialized()
Description copied from interface:Formatter
return true if this formatter have been initialized- Specified by:
isInitialized
in interfaceFormatter
-
-