Package com.e1c.langtool.v8.dt.xtext
Class AbstractXtextObjectTextEditor
java.lang.Object
com.e1c.langtool.v8.dt.xtext.AbstractXtextObjectTextEditor
- All Implemented Interfaces:
ITextProcessor
- Direct Known Subclasses:
ModuleTextEditor,QlTextEditor,TemplateTextEditor
Abstract class for any Xtext language text processor that makes changes on processing
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract MultiTextEditParseTreeVisitorcreateTreeVisitor(org.eclipse.text.edits.MultiTextEdit edit, org.eclipse.emf.ecore.EObject root, org.eclipse.core.runtime.IProgressMonitor monitor) Creates the Multi-edit tree visitor.protected voiddispose()Dispose internal resources of the editor.Gets the processed text that can be modified or same as source text.Gets the source text that didn't modified.org.eclipse.core.runtime.IStatusprocess(org.eclipse.core.runtime.IProgressMonitor monitor) Process the text.
-
Constructor Details
-
AbstractXtextObjectTextEditor
public AbstractXtextObjectTextEditor(org.eclipse.emf.ecore.EObject root)
-
-
Method Details
-
process
public org.eclipse.core.runtime.IStatus process(org.eclipse.core.runtime.IProgressMonitor monitor) Description copied from interface:ITextProcessorProcess the text.- Specified by:
processin interfaceITextProcessor- Parameters:
monitor- the monitor, cannot benull- Returns:
- the status of processing, cannot return
null
-
createTreeVisitor
protected abstract MultiTextEditParseTreeVisitor createTreeVisitor(org.eclipse.text.edits.MultiTextEdit edit, org.eclipse.emf.ecore.EObject root, org.eclipse.core.runtime.IProgressMonitor monitor) Creates the Multi-edit tree visitor.- Parameters:
edit- the edit instance, cannot benullroot- the root object, cannot benullmonitor- the monitor, cannot benull- Returns:
- the multi text edit parse tree visitor
-
getSourceText
Description copied from interface:ITextProcessorGets the source text that didn't modified.- Specified by:
getSourceTextin interfaceITextProcessor- Returns:
- the source text, cannot return
null.
-
getProcessedText
Description copied from interface:ITextProcessorGets the processed text that can be modified or same as source text.- Specified by:
getProcessedTextin interfaceITextProcessor- Returns:
- the processed text or the source text, cannot return
null.
-
dispose
protected void dispose()Dispose internal resources of the editor.
-