public class ChangeCorrectionProposalCore extends Object
Modifier and Type | Field and Description |
---|---|
protected Change |
fChange |
protected String |
fName |
protected int |
fRelevance |
Constructor and Description |
---|
ChangeCorrectionProposalCore(String name,
Change change,
int relevance)
Constructs a change correction proposal.
|
Modifier and Type | Method and Description |
---|---|
void |
apply() |
protected Change |
createChange()
Creates the change for this proposal.
|
Object |
getAdditionalProposalInfo(IProgressMonitor monitor) |
Change |
getChange()
Returns the change that will be executed when the proposal is applied.
|
String |
getName()
Returns the name of the proposal.
|
int |
getRelevance() |
protected void |
performChange()
Performs the change associated with this proposal.
|
void |
setDisplayName(String name)
Sets the display name.
|
void |
setRelevance(int relevance)
Sets the relevance.
|
protected Change fChange
protected String fName
protected int fRelevance
public ChangeCorrectionProposalCore(String name, Change change, int relevance)
name
- the name that is displayed in the proposal selection dialogchange
- the change that is executed when the proposal is applied or null
if the change will be created by implementors of createChange()
relevance
- the relevance of this proposalpublic void apply() throws CoreException
CoreException
protected void performChange() throws CoreException
Subclasses may extend, but must call the super implementation.
CoreException
- when the invocation of the change failedpublic Object getAdditionalProposalInfo(IProgressMonitor monitor)
public String getName()
public Change getChange() throws CoreException
createChange()
to compute the change.null
in rare cases if creation of
the change failedCoreException
- when the change could not be createdprotected Change createChange() throws CoreException
CoreException
- if the creation of the change failedpublic void setDisplayName(String name)
name
- the name to setpublic int getRelevance()
public void setRelevance(int relevance)
relevance
- the relevance to setgetRelevance()
Copyright (c) 2000, 2018 Eclipse Contributors and others. All rights reserved.Guidelines for using Eclipse APIs.