Class AbstractDeclarativeIdeQuickfixProvider
- java.lang.Object
-
- org.eclipse.xtext.ide.editor.quickfix.AbstractDeclarativeIdeQuickfixProvider
-
- All Implemented Interfaces:
IQuickFixProvider
@Beta public class AbstractDeclarativeIdeQuickfixProvider extends java.lang.Object implements IQuickFixProvider
- Since:
- 2.24
-
-
Constructor Summary
Constructors Constructor Description AbstractDeclarativeIdeQuickfixProvider()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected java.util.List<org.eclipse.lsp4j.TextEdit>createTextEdit(org.eclipse.lsp4j.Diagnostic diagnostic, java.lang.String text)Creates a singleton list with only oneTextEditthat replaces the region of the diagnostic with the given textjava.util.List<java.lang.reflect.Method>getFixMethods(org.eclipse.lsp4j.Diagnostic diagnostic)java.util.List<DiagnosticResolution>getResolutions(ICodeActionService2.Options options, org.eclipse.lsp4j.Diagnostic diagnostic)Collects all possible quickfixes for the given issue.booleanhandlesDiagnostic(org.eclipse.lsp4j.Diagnostic diagnostic)If the provider handles (it has code to produce resolutions for) the given diagnostic.
-
-
-
Method Detail
-
getResolutions
public java.util.List<DiagnosticResolution> getResolutions(ICodeActionService2.Options options, org.eclipse.lsp4j.Diagnostic diagnostic)
Description copied from interface:IQuickFixProviderCollects all possible quickfixes for the given issue. If there are none, returns an empty list- Specified by:
getResolutionsin interfaceIQuickFixProvider- Parameters:
options- Contextual action optionsdiagnostic- the diagnostic- Returns:
- 0..n resolutions for the given issue
-
handlesDiagnostic
public boolean handlesDiagnostic(org.eclipse.lsp4j.Diagnostic diagnostic)
Description copied from interface:IQuickFixProviderIf the provider handles (it has code to produce resolutions for) the given diagnostic.- Specified by:
handlesDiagnosticin interfaceIQuickFixProvider- Parameters:
diagnostic- the diagnostic- Returns:
- true if the provider handles the given diagnostic
-
getFixMethods
public java.util.List<java.lang.reflect.Method> getFixMethods(org.eclipse.lsp4j.Diagnostic diagnostic)
-
createTextEdit
protected java.util.List<org.eclipse.lsp4j.TextEdit> createTextEdit(org.eclipse.lsp4j.Diagnostic diagnostic, java.lang.String text)Creates a singleton list with only oneTextEditthat replaces the region of the diagnostic with the given text- Parameters:
diagnostic- theDiagnostictext- the text- Returns:
- a singleton list with only one
TextEdit - Since:
- 2.27
-
-