Class ChangeCorrectionProposalCore
java.lang.Object
org.eclipse.jdt.core.manipulation.ChangeCorrectionProposalCore
- Direct Known Subclasses:
ChangeCorrectionProposal,CUCorrectionProposalCore
- Since:
- 1.11
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionChangeCorrectionProposalCore(String name, Change change, int relevance) Constructs a change correction proposal. -
Method Summary
Modifier and TypeMethodDescriptionvoidapply()protected ChangeCreates the change for this proposal.Returns the change that will be executed when the proposal is applied.getName()Returns the name of the proposal.intprotected voidPerforms the change associated with this proposal.voidsetDisplayName(String name) Sets the display name.voidsetRelevance(int relevance) Sets the relevance.
-
Field Details
-
fChange
-
fName
-
fRelevance
protected int fRelevance
-
-
Constructor Details
-
ChangeCorrectionProposalCore
Constructs a change correction proposal.- Parameters:
name- the name that is displayed in the proposal selection dialogchange- the change that is executed when the proposal is applied ornullif the change will be created by implementors ofcreateChange()relevance- the relevance of this proposal
-
-
Method Details
-
apply
- Throws:
CoreException
-
performChange
Performs the change associated with this proposal.Subclasses may extend, but must call the super implementation.
- Throws:
CoreException- when the invocation of the change failed
-
getAdditionalProposalInfo
-
getName
Returns the name of the proposal.- Returns:
- the name of the proposal
-
getChange
Returns the change that will be executed when the proposal is applied. This method callscreateChange()to compute the change.- Returns:
- the change for this proposal, can be
nullin rare cases if creation of the change failed - Throws:
CoreException- when the change could not be created
-
createChange
Creates the change for this proposal. This method is only called once and only when no change has been passed in {#ChangeCorrectionProposal(String, Change, int, Image)}. Subclasses may override.- Returns:
- the created change
- Throws:
CoreException- if the creation of the change failed
-
setDisplayName
Sets the display name.- Parameters:
name- the name to set
-
getRelevance
public int getRelevance() -
setRelevance
public void setRelevance(int relevance) Sets the relevance.- Parameters:
relevance- the relevance to set- See Also:
-