public interface RefactoringElementImplementation
AbstractRefactoring.prepare(org.netbeans.modules.refactoring.api.RefactoringSession)
operation.
Modifier and Type | Field and Description |
---|---|
static int |
GUARDED
Status flag that indicates that the element cannot be enabled (if a fatal
problem is associated with it)
|
static int |
NORMAL
Status corresponding to a normal element
|
static int |
READ_ONLY
This element is in read-only file
|
static int |
WARNING
Status corresponding to an element that has a warning associated with it
|
Modifier and Type | Method and Description |
---|---|
String |
getDisplayText()
Returns text describing the refactoring formatted for display (using HTML tags).
|
Lookup |
getLookup()
Returns Lookup associated with this element.
|
FileObject |
getParentFile()
Returns file that the element affects (relates to)
|
PositionBounds |
getPosition()
Returns position bounds of the text to be affected by this refactoring element.
|
int |
getStatus()
Returns the status of this refactoring element (whether it is a normal element,
or a warning.
|
String |
getText()
Returns text describing the refactoring element.
|
boolean |
isEnabled()
Indicates whether this refactoring element is enabled.
|
void |
openInEditor()
opens this RefactoringElement in the editor
|
void |
performChange()
Performs the change represented by this refactoring element.
|
void |
setEnabled(boolean enabled)
Enables/disables this element.
|
void |
setStatus(int status)
Setter for property status
|
void |
showPreview()
Shows this element in refactoring preview are
|
void |
undoChange()
Undo change done by performChange
Implementation can be impty if the change is done using some high level
transaction model
|
static final int NORMAL
static final int WARNING
static final int GUARDED
static final int READ_ONLY
String getText()
String getDisplayText()
boolean isEnabled()
true
if this element is enabled, otherwise false
.void setEnabled(boolean enabled)
enabled
- If true
the element is enabled, otherwise it is disabled.void performChange()
BackupFacility
,
RefactoringElementsBag.addFileChange(org.netbeans.modules.refactoring.api.AbstractRefactoring, org.netbeans.modules.refactoring.spi.RefactoringElementImplementation)
,
RefactoringElementsBag.registerTransaction(org.netbeans.modules.refactoring.spi.Transaction)
,
Transaction
,
RefactoringElementImplementation.performChange()
,
RefactoringElementImplementation.undoChange()
void undoChange()
BackupFacility
,
RefactoringElementsBag.addFileChange(org.netbeans.modules.refactoring.api.AbstractRefactoring, org.netbeans.modules.refactoring.spi.RefactoringElementImplementation)
,
RefactoringElementsBag.registerTransaction(org.netbeans.modules.refactoring.spi.Transaction)
,
Transaction
,
RefactoringElementImplementation.performChange()
,
RefactoringElementImplementation.undoChange()
Lookup getLookup()
TreeElement
,
TreeElementFactory
,
TreeElementFactoryImplementation
@NonNull FileObject getParentFile()
PositionBounds getPosition()
int getStatus()
void setStatus(int status)
status
- new value of propery statusvoid openInEditor()
void showPreview()