站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > NetBeans API Javadoc (Current Development Version)

RefactoringElement (Refactoring API) - NetBeans API Javadoc (Current Development Version)

org.netbeans.modules.refactoring.api 1.0

org.netbeans.modules.refactoring.api
Class RefactoringElement

java.lang.Object
  extended by org.netbeans.modules.refactoring.api.RefactoringElement

public final class RefactoringElement
extends Object

Interface representing a refactoring element (object affected by a refactoring) returned in a collection from AbstractRefactoring.prepare(org.netbeans.modules.refactoring.api.RefactoringSession) operation.

See Also:
RefactoringElementImplementation

Field Summary
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
 
Method Summary
 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 setEnabled(boolean enabled)
          Enables/disables this element.
 void showPreview()
          Shows this element in refactoring preview are
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

NORMAL

public static final int NORMAL
Status corresponding to a normal element

See Also:
Constant Field Values

WARNING

public static final int WARNING
Status corresponding to an element that has a warning associated with it

See Also:
Constant Field Values

GUARDED

public static final int GUARDED
Status flag that indicates that the element cannot be enabled (if a fatal problem is associated with it)

See Also:
Constant Field Values

READ_ONLY

public static final int READ_ONLY
This element is in read-only file

See Also:
Constant Field Values
Method Detail

getText

public String getText()
Returns text describing the refactoring element.

Returns:
Text.

getDisplayText

public String getDisplayText()
Returns text describing the refactoring formatted for display (using HTML tags).

Returns:
Formatted text.

isEnabled

public boolean isEnabled()
Indicates whether this refactoring element is enabled.

Returns:
true if this element is enabled, otherwise false.

setEnabled

public void setEnabled(boolean enabled)
Enables/disables this element.

Parameters:
enabled - If true the element is enabled, otherwise it is disabled.

getLookup

public Lookup getLookup()
Returns Lookup associated with this element. Lookup items might be used by TreeElementFactories to build refactoring preview trees.

Returns:
Lookup.
See Also:
TreeElement, TreeElementFactoryImplementation

getParentFile

public FileObject getParentFile()
Returns file that the element affects (relates to)

Returns:
File

getPosition

public PositionBounds getPosition()
Returns position bounds of the text to be affected by this refactoring element.

Returns:
position bounds

getStatus

public int getStatus()
Returns the status of this refactoring element (whether it is a normal element, or a warning.

Returns:
Status of this element.

showPreview

public void showPreview()
Shows this element in refactoring preview are

See Also:
org.netbeans.modules.refactoring.api.ui.UI#setComponentForRefactoringPreview

openInEditor

public void openInEditor()
opens this RefactoringElement in the editor


org.netbeans.modules.refactoring.api 1.0

Built on May 28 2007.  |  Portions Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.