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

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

org.netbeans.modules.refactoring.api 1.0

org.netbeans.modules.refactoring.spi
Class SimpleRefactoringElementImplementation

java.lang.Object
  extended by org.netbeans.modules.refactoring.spi.SimpleRefactoringElementImplementation
All Implemented Interfaces:
RefactoringElementImplementation

public abstract class SimpleRefactoringElementImplementation
extends Object
implements RefactoringElementImplementation

Default implementation of RefactoringElementImplementation interface. It contains implementations of

Since:
1.5.0
See Also:
RefactoringElementImplementation.isEnabled(), RefactoringElementImplementation.setEnabled(boolean), RefactoringElementImplementation.getStatus(), and, RefactoringElementImplementation.openInEditor(), RefactoringElementImplementation.showPreview(), RefactoringElementImplementation

Field Summary
 
Fields inherited from interface org.netbeans.modules.refactoring.spi.RefactoringElementImplementation
GUARDED, NORMAL, READ_ONLY, WARNING
 
Constructor Summary
SimpleRefactoringElementImplementation()
           
 
Method Summary
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
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.netbeans.modules.refactoring.spi.RefactoringElementImplementation
getDisplayText, getLookup, getParentFile, getPosition, getText, performChange
 

Constructor Detail

SimpleRefactoringElementImplementation

public SimpleRefactoringElementImplementation()
Method Detail

isEnabled

public boolean isEnabled()
Description copied from interface: RefactoringElementImplementation
Indicates whether this refactoring element is enabled.

Specified by:
isEnabled in interface RefactoringElementImplementation
Returns:
true if this element is enabled, otherwise false.

setEnabled

public void setEnabled(boolean enabled)
Description copied from interface: RefactoringElementImplementation
Enables/disables this element.

Specified by:
setEnabled in interface RefactoringElementImplementation
Parameters:
enabled - If true the element is enabled, otherwise it is disabled.

getStatus

public int getStatus()
Description copied from interface: RefactoringElementImplementation
Returns the status of this refactoring element (whether it is a normal element, or a warning.

Specified by:
getStatus in interface RefactoringElementImplementation
Returns:
Status of this element.

setStatus

public void setStatus(int status)
Description copied from interface: RefactoringElementImplementation
Setter for property status

Specified by:
setStatus in interface RefactoringElementImplementation
Parameters:
status - new value of propery status

openInEditor

public void openInEditor()
Description copied from interface: RefactoringElementImplementation
opens this RefactoringElement in the editor

Specified by:
openInEditor in interface RefactoringElementImplementation

showPreview

public void showPreview()
Description copied from interface: RefactoringElementImplementation
Shows this element in refactoring preview are

Specified by:
showPreview in interface RefactoringElementImplementation
See Also:
org.netbeans.modules.refactoring.api.ui.UI#setComponentForRefactoringPreview

getNewFileContent

protected String getNewFileContent()
this method is under development. Might be removed in final release. Do not override it so far. return String representation of whole file after refactoring

Returns:

undoChange

public void undoChange()
Description copied from interface: RefactoringElementImplementation
Undo change done by performChange Implementation can be impty if the change is done using some high level transaction model

Specified by:
undoChange in interface RefactoringElementImplementation
See Also:
BackupFacility, RefactoringElementsBag#registerFileChange, RefactoringElementsBag.registerTransaction(org.netbeans.modules.refactoring.spi.Transaction), Transaction, RefactoringElementImplementation.performChange(), RefactoringElementImplementation.undoChange()

org.netbeans.modules.refactoring.api 1.0

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