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

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

org.netbeans.modules.refactoring.api 1.0

org.netbeans.modules.refactoring.spi.ui
Interface RefactoringUI


public interface RefactoringUI

Interface representing UI for a refactoring.


Method Summary
 Problem checkParameters()
          check parameters of refactoring
 String getDescription()
          Returns description of the refactoring.
 HelpCtx getHelpCtx()
           
 String getName()
          Returns name of the refactoring.
 CustomRefactoringPanel getPanel(ChangeListener parent)
          Returns refactoring-specific panel containing input fields for refactoring parameters.
 AbstractRefactoring getRefactoring()
          Returns underlying refactoring object.
 boolean hasParameters()
          true, if refactoring has parameters false otherwise.
 boolean isQuery()
          Indicates whether this class represents a real refactoring that changes code or whether it is just a query (e.g.
 Problem setParameters()
          Implementation of this method should set the refactoring parameters entered by user into the refactoring-specific parameters panel (returned from getPanel method) into the underlying refactoring object.
 

Method Detail

getName

String getName()
Returns name of the refactoring.

Returns:
Refactoring name.

getDescription

String getDescription()
Returns description of the refactoring.

Returns:
Refactoring description.

isQuery

boolean isQuery()
Indicates whether this class represents a real refactoring that changes code or whether it is just a query (e.g. all usages for a class).

Returns:
true if the class represents only a query, false if the class represents a real refactoring.

getPanel

CustomRefactoringPanel getPanel(ChangeListener parent)
Returns refactoring-specific panel containing input fields for refactoring parameters. This method is called by ParametersPanel which is responsible for displaying refactoring parameters dialog. Name of the panel returned from this method will be used as the dialog name. This panel can use setPreviewEnabled method of the passed ParametersPanel to enable/disable Preview button of the refactoring parameters dialog. this method might return null if hasParameters return false.

Parameters:
parent - ParametersPanel that the returned panel will be displayed in.
Returns:
Refactoring-specific parameters panel.
See Also:
hasParameters()

setParameters

Problem setParameters()
Implementation of this method should set the refactoring parameters entered by user into the refactoring-specific parameters panel (returned from getPanel method) into the underlying refactoring object.

Returns:
Chain of problems returned from the underlying refactoring object when trying to set its parameters.

checkParameters

Problem checkParameters()
check parameters of refactoring

Returns:
Chain of problems returned from the underlying refactoring object when trying to check its parameters.

hasParameters

boolean hasParameters()
true, if refactoring has parameters false otherwise. In this case getPanel(javax.swing.event.ChangeListener) method can return null

Returns:
false if this UI does not require any parameters. True otherwise.

getRefactoring

AbstractRefactoring getRefactoring()
Returns underlying refactoring object.

Returns:
Underlying refactoring object.

getHelpCtx

HelpCtx getHelpCtx()
Returns:
helpcontext

org.netbeans.modules.refactoring.api 1.0

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