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 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
Constructor
Description
`AtlCodeFormatter()`

## Method Summary

Modifier and Type
Method
Description
`void`
`applyProfileToEditor(AtlEditor editor)`
`static Object`
`eGet(org.eclipse.emf.ecore.EObject self, String featureName)`
Returns the value of a feature on an EObject.
`String`
`format(InputStream is)`
`void`
`format(org.eclipse.jface.text.IDocument document, Map<String,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 Details

### AtlCodeFormatter

public AtlCodeFormatter()

## Method Details

### 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, Map<String,String> options, AtlModelAnalyser modelAnalyser) throws org.eclipse.jface.text.BadLocationException

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

### format

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

Throws:
  `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 Object eGet(org.eclipse.emf.ecore.EObject self, String featureName)
Returns the value of a feature on an EObject.

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