public final class RefactoringElement extends Object
AbstractRefactoring.prepare(org.netbeans.modules.refactoring.api.RefactoringSession)
operation.
RefactoringElementImplementation
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 |
---|---|
boolean |
equals(Object obj) |
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.
|
int |
hashCode() |
boolean |
include(FiltersManager filtersManager)
Indicates if this element should be included in the results.
|
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 |
showPreview()
Shows this element in refactoring preview are
|
public static final int NORMAL
public static final int WARNING
public static final int GUARDED
public static final int READ_ONLY
@NonNull public String getText()
@NonNull public String getDisplayText()
public boolean isEnabled()
true
if this element is enabled, otherwise false
.public void setEnabled(boolean enabled)
enabled
- If true
the element is enabled, otherwise it is disabled.@NonNull public Lookup getLookup()
TreeElement
,
TreeElementFactoryImplementation
public FileObject getParentFile()
public PositionBounds getPosition()
public int getStatus()
public void showPreview()
public void openInEditor()
public boolean include(FiltersManager filtersManager)
filtersManager
- the FiltersManager to use