public abstract class SimpleRefactoringElementImplementation extends Object implements RefactoringElementImplementation
RefactoringElementImplementation.isEnabled()
,
RefactoringElementImplementation.setEnabled(boolean)
,
RefactoringElementImplementation.getStatus()
,
and
,
RefactoringElementImplementation.openInEditor()
,
RefactoringElementImplementation.showPreview()
,
RefactoringElementImplementation
GUARDED, NORMAL, READ_ONLY, WARNING
Constructor and Description |
---|
SimpleRefactoringElementImplementation() |
Modifier and Type | Method and Description |
---|---|
protected String |
getNewFileContent()
this method is under development.
|
int |
getStatus()
Returns the status of this refactoring element (whether it is a normal element,
or a warning.
|
boolean |
isEnabled()
Indicates whether this refactoring element is enabled.
|
void |
openInEditor()
opens this RefactoringElement in the editor
|
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
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getDisplayText, getLookup, getParentFile, getPosition, getText, performChange
public SimpleRefactoringElementImplementation()
public boolean isEnabled()
RefactoringElementImplementation
isEnabled
in interface RefactoringElementImplementation
true
if this element is enabled, otherwise false
.public void setEnabled(boolean enabled)
RefactoringElementImplementation
setEnabled
in interface RefactoringElementImplementation
enabled
- If true
the element is enabled, otherwise it is disabled.public int getStatus()
RefactoringElementImplementation
getStatus
in interface RefactoringElementImplementation
public void setStatus(int status)
RefactoringElementImplementation
setStatus
in interface RefactoringElementImplementation
status
- new value of propery statuspublic void openInEditor()
RefactoringElementImplementation
openInEditor
in interface RefactoringElementImplementation
public void showPreview()
RefactoringElementImplementation
showPreview
in interface RefactoringElementImplementation
UI.setComponentForRefactoringPreview(java.awt.Component)
protected String getNewFileContent()
public void undoChange()
RefactoringElementImplementation
undoChange
in interface RefactoringElementImplementation
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()