Package com.e1c.g5.v8.dt.bsl.check.qfix
Class SingleVariantXtextBslModuleFix
- java.lang.Object
-
- com.e1c.g5.v8.dt.check.qfix.components.BasicFix<C>
-
- com.e1c.g5.v8.dt.check.qfix.components.SingleVariantBasicFix<SingleVariantXtextBslModuleFixContext>
-
- com.e1c.g5.v8.dt.bsl.check.qfix.SingleVariantXtextBslModuleFix
-
- All Implemented Interfaces:
IFix<SingleVariantXtextBslModuleFixContext>
,IFixVariant<SingleVariantXtextBslModuleFixContext>
public abstract class SingleVariantXtextBslModuleFix extends SingleVariantBasicFix<SingleVariantXtextBslModuleFixContext>
Single variant xtext bsl module fix common class for multi-variant quick fixes
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected static class
SingleVariantXtextBslModuleFix.FixConfigurer
Configuration container for theSingleVariantXtextBslModuleFixContext
descendants allowing them to specify fix parameters via the pure Java API
-
Constructor Summary
Constructors Constructor Description SingleVariantXtextBslModuleFix()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected void
applyChanges(SingleVariantXtextBslModuleFixContext context, IFixSession session)
protected void
configureFix(SingleVariantXtextBslModuleFix.FixConfigurer configurer)
Configures the fix.FixVariantDescriptor
describeChanges(SingleVariantXtextBslModuleFixContext context, IFixSession session)
Gets the quick fix variant descriptorprotected abstract org.eclipse.text.edits.TextEdit
fixIssue(org.eclipse.xtext.resource.XtextResource state, IXtextBslModuleFixModel model)
Modification of code to be overriden by clientsClass<SingleVariantXtextBslModuleFixContext>
getRequiredContextType()
Gets the required context typevoid
onRegistration(FixDescriptor registrationContext)
This method is being called by the fix engine during the initialization phase.Collection<IFixChange>
prepareChanges(SingleVariantXtextBslModuleFixContext context, IFixSession session)
Prepares the changes to form the fix-
Methods inherited from class com.e1c.g5.v8.dt.check.qfix.components.SingleVariantBasicFix
getVariants, isFixApplicable
-
Methods inherited from class com.e1c.g5.v8.dt.check.qfix.components.BasicFix
getCheckId
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.e1c.g5.v8.dt.check.qfix.IFix
getCheckId
-
-
-
-
Method Detail
-
prepareChanges
public Collection<IFixChange> prepareChanges(SingleVariantXtextBslModuleFixContext context, IFixSession session)
Description copied from interface:IFixVariant
Prepares the changes to form the fix- Parameters:
context
- The fix context. May not benull
- Returns:
- The collection of prepared fix changes (if applicable). Never
null
. May be empty
-
describeChanges
public final FixVariantDescriptor describeChanges(SingleVariantXtextBslModuleFixContext context, IFixSession session)
Description copied from interface:IFixVariant
Gets the quick fix variant descriptor- Parameters:
context
- the context, cannot benull
session
- the session, cannot benull
- Returns:
- fix variant descriptor, never
null
-
onRegistration
public final void onRegistration(FixDescriptor registrationContext)
Description copied from interface:IFix
This method is being called by the fix engine during the initialization phase. The developer may register additional fix entitier, like context factories, fix change processors, preview providers which are specific only to this fix- Parameters:
registrationContext
- The descriptor of the fix. A fix developer should use it to register fix specific components. May not benull
-
getRequiredContextType
public Class<SingleVariantXtextBslModuleFixContext> getRequiredContextType()
Description copied from interface:IFix
Gets the required context type- Returns:
- The type of the context that is required by the fix variant to work. May not be
null
-
configureFix
protected void configureFix(SingleVariantXtextBslModuleFix.FixConfigurer configurer)
Configures the fix. The developer could provide descreptive/filtering information for the fix here- Parameters:
configurer
- The configurer of the fix. May not benull
-
fixIssue
protected abstract org.eclipse.text.edits.TextEdit fixIssue(org.eclipse.xtext.resource.XtextResource state, IXtextBslModuleFixModel model) throws org.eclipse.jface.text.BadLocationException
Modification of code to be overriden by clients- Parameters:
state
- the xtext resource, cannot benull
model
- xtext bsl module fix model facade, cannot benull
- Returns:
TextEdit
, can benull
- Throws:
org.eclipse.jface.text.BadLocationException
-
applyChanges
protected void applyChanges(SingleVariantXtextBslModuleFixContext context, IFixSession session)
-
-