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 Constructor Description AtlCodeFormatter()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description 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)
-
-
-
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 EObjectfeatureName
- the feature name- Returns:
- the feature value
-
-