Class AtlCodeFormatter
java.lang.Object
org.eclipse.m2m.atl.adt.ui.editor.formatter.AtlCodeFormatter
This class represents a code formatter. It uses the current model of the ATL editor to format the ATL
source code.
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
applyProfileToEditor
(AtlEditor editor) static Object
Returns the value of a feature on an EObject.format
(InputStream is) void
format
(org.eclipse.jface.text.IDocument document, Map<String, String> options, AtlModelAnalyser modelAnalyser) void
Launches the code formatting on the given editor.boolean
isProjectSpecificSettingsEnabled
(org.eclipse.core.runtime.preferences.IScopeContext context)
-
Constructor Details
-
AtlCodeFormatter
public AtlCodeFormatter()
-
-
Method Details
-
format
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
-
isProjectSpecificSettingsEnabled
public boolean isProjectSpecificSettingsEnabled(org.eclipse.core.runtime.preferences.IScopeContext context) -
eGet
Returns the value of a feature on an EObject.- Parameters:
self
- the EObjectfeatureName
- the feature name- Returns:
- the feature value
-