Interface NewQuickFix
-
public interface NewQuickFix
Describe a quick fix for aNewIssue
, with a description and a collection ofNewInputFileEdit
. Input file edits will be applied in the order they are added, insofar that they are compatible with one another.- Since:
- 9.13
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description NewQuickFix
addInputFileEdit(NewInputFileEdit newInputFileEdit)
Add a new input file edit to this quick fixNewQuickFix
message(java.lang.String message)
Define the message for this quick fix, which will be shown to the user as an action item.NewInputFileEdit
newInputFileEdit()
Create a new input file edit
-
-
-
Method Detail
-
message
NewQuickFix message(java.lang.String message)
Define the message for this quick fix, which will be shown to the user as an action item. The fix message may be inspired by the issue message, but the context into which they appear is different, so it might be better to adapt it. A good message should:- Be short (ideally, not more than 50 characters)
- Use sentence capitalization
- Not end with a full stop (
.
) - Describe the expected outcome of the change, e.g. Make the constructor explicit instead of Add the "explicit" keyword. It tells the user how to fix the issue
- Focus on the target more than the current situation. For instance, Replace "AAA" with "BBB" would be better phrased Replace with "BBB"
- Avoid the use of a demonstrative, e.g. this. Prefer the more neutral the. The message may be used in several contexts, some of which would not work very well with a demonstrative
- Parameters:
message
- a description for this quick fix- Returns:
- the updated quickfix
-
newInputFileEdit
NewInputFileEdit newInputFileEdit()
Create a new input file edit- Returns:
- a new uninitialized instance of a file edit for a given fix
-
addInputFileEdit
NewQuickFix addInputFileEdit(NewInputFileEdit newInputFileEdit)
Add a new input file edit to this quick fix- Parameters:
newInputFileEdit
- the input file edit to add- Returns:
- this instance
-
-