Package com._1c.g5.v8.dt.bsl.ui.quickfix
Class AbstractExternalQuickfixProvider.ExternalQuickfixModification<E extends org.eclipse.emf.ecore.EObject>
- java.lang.Object
-
- com._1c.g5.v8.dt.bsl.ui.quickfix.AbstractExternalQuickfixProvider.ExternalQuickfixModification<E>
-
- Type Parameters:
E
- type of model object is contained inIssue
- All Implemented Interfaces:
org.eclipse.xtext.ui.editor.model.edit.IModification
- Enclosing class:
- AbstractExternalQuickfixProvider
protected static class AbstractExternalQuickfixProvider.ExternalQuickfixModification<E extends org.eclipse.emf.ecore.EObject> extends Object implements org.eclipse.xtext.ui.editor.model.edit.IModification
Implementation ofIModification
for creating and applying quickfix text changes.
-
-
Constructor Summary
Constructors Constructor Description ExternalQuickfixModification(org.eclipse.xtext.validation.Issue issue, Class<E> clazz, com.google.common.base.Function<E,org.eclipse.text.edits.TextEdit> function)
Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
apply(org.eclipse.xtext.ui.editor.model.edit.IModificationContext context)
protected org.eclipse.text.edits.TextEdit
createChanges(org.eclipse.xtext.ui.editor.model.IXtextDocument document, org.eclipse.xtext.validation.Issue issue, Class<E> clazz, com.google.common.base.Function<E,org.eclipse.text.edits.TextEdit> function)
Creates quickfix changesprotected org.eclipse.xtext.ui.editor.model.IXtextDocument
getActualDocument(org.eclipse.xtext.ui.editor.model.edit.IModificationContext context)
Gets actualIXtextDocument
fromIModificationContext
-
-
-
Constructor Detail
-
ExternalQuickfixModification
public ExternalQuickfixModification(org.eclipse.xtext.validation.Issue issue, Class<E> clazz, com.google.common.base.Function<E,org.eclipse.text.edits.TextEdit> function)
Constructor- Parameters:
issue
- processing validationIssue
, can't benull
clazz
-Class
of the Built-in object corresponding to validationIssue
, can't benull
function
- specialFunction
that contains logic about creatingTextEdit
changes corresponding to quickfix, can't benull
-
-
Method Detail
-
apply
public void apply(org.eclipse.xtext.ui.editor.model.edit.IModificationContext context) throws Exception
- Specified by:
apply
in interfaceorg.eclipse.xtext.ui.editor.model.edit.IModification
- Throws:
Exception
-
createChanges
protected org.eclipse.text.edits.TextEdit createChanges(org.eclipse.xtext.ui.editor.model.IXtextDocument document, org.eclipse.xtext.validation.Issue issue, Class<E> clazz, com.google.common.base.Function<E,org.eclipse.text.edits.TextEdit> function)
Creates quickfix changes- Parameters:
document
- actualIXtextDocument
, creating text changes will be applied to it, can't benull
issue
- processing validationIssue
, can't benull
clazz
-Class
of the Built-in object corresponding to validationIssue
, can't benull
function
- specialFunction
that contains logic about creatingTextEdit
changes corresponding to quickfix, can't benull
- Returns:
- Created
TextEdit
quickfix changes, can benull
in some cases:- object contained in
Issue
isn't instanceofclazz
function
returnnull
- object contained in
-
getActualDocument
protected org.eclipse.xtext.ui.editor.model.IXtextDocument getActualDocument(org.eclipse.xtext.ui.editor.model.edit.IModificationContext context)
Gets actualIXtextDocument
fromIModificationContext
- Parameters:
context
- actualIModificationContext
of quickfix, can't benull
- Returns:
IXtextDocument
fromIModificationContext
ornull
it there is no implementation ofIXtextDocument
for thisIModificationContext
-
-