Package org.eclipse.m2m.atl.adt.ui.editor.formatter

## Class AtlCodeFormatter

- java.lang.Object
- - org.eclipse.m2m.atl.adt.ui.editor.formatter.AtlCodeFormatter

    public class AtlCodeFormatter
    extends java.lang.Object

This class represents a code formatter. It uses the current model of the ATL editor to format the ATL source code.

See Also:
  `AtlCodeFormatterPreferences`

### Constructor Summary

Constructors
`AtlCodeFormatter()`

### Method Summary

All Methods Static Methods Instance Methods Concrete Methods
`void` `applyProfileToEditor​(AtlEditor editor)`
`static java.lang.Object` `eGet​(org.eclipse.emf.ecore.EObject self, java.lang.String featureName)` Returns the value of a feature on an EObject.
`java.lang.String` `format​(java.io.InputStream is)`
`void` `format​(org.eclipse.jface.text.IDocument document, java.util.Map<java.lang.String,​java.lang.String> options, AtlModelAnalyser modelAnalyser)`
`void` `format​(AtlEditor editor)` Launches the code formatting on the given editor.
`boolean` `isProjectSpecificSettingsEnabled​(org.eclipse.core.runtime.preferences.IScopeContext context)`

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

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

### Constructor Detail

#### AtlCodeFormatter

    public AtlCodeFormatter()

### Method Detail

#### format

    public void format​(AtlEditor editor)
                throws org.eclipse.jface.text.BadLocationException

Launches the code formatting on the given editor. Entry point of the code formatter.

Parameters:
  `editor` - the editor we want to work on.
Throws:
  `org.eclipse.jface.text.BadLocationException`

#### format

    public void format​(org.eclipse.jface.text.IDocument document,
                       java.util.Map<java.lang.String,​java.lang.String> options,
                       AtlModelAnalyser modelAnalyser)
                throws org.eclipse.jface.text.BadLocationException

Throws:
  `org.eclipse.jface.text.BadLocationException`

#### format

    public java.lang.String format​(java.io.InputStream is)
                            throws java.io.IOException,
                                   org.eclipse.jface.text.BadLocationException

Throws:
  `java.io.IOException`
  `org.eclipse.jface.text.BadLocationException`

#### applyProfileToEditor

    public void applyProfileToEditor​(AtlEditor editor)

#### isProjectSpecificSettingsEnabled

    public boolean isProjectSpecificSettingsEnabled​(org.eclipse.core.runtime.preferences.IScopeContext context)

#### eGet

    public static java.lang.Object eGet​(org.eclipse.emf.ecore.EObject self,
                                        java.lang.String featureName)

Returns the value of a feature on an EObject.

Parameters:
  `self` - the EObject
  `featureName` - the feature name
Returns:
  the feature value