blob: ceaceb6adf4a3ea3e4b3a2de7a97dddb5720b42d [file] [log] [blame]
/*******************************************************************************
* Copyright (c) 2005, 2007 IBM Corporation and others.
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* SPDX-License-Identifier: EPL-2.0
*
*******************************************************************************/
package org.eclipse.dltk.internal.corext.refactoring.tagging;
/**
* Interface for refactorings which provide a comment for the history.
*
*
*/
public interface ICommentProvider {
/**
* Performs a dynamic check whether this refactoring object is capable of
* accepting user comments to be stored in the refactoring history. The
* return value of this method may change according to the state of the
* refactoring.
*/
public boolean canEnableComment();
/**
* If <code>canEnableComment</code> returns <code>true</code>, then
* this method is used to ask the refactoring object for the comment
* associated with the refactoring. This call can be ignored if
* <code>canEnableComment</code> returns <code>false</code>.
*
* @return the comment, or <code>null</code>
*/
public String getComment();
/**
* If <code>canEnableComment</code> returns <code>true</code>, then
* this method may be called to set the comment associated with the
* refactoring. This call can be ignored if <code>canEnableComment</code>
* returns <code>false</code>.
*
* @param comment
* the comment to set, or <code>null</code>
*/
public void setComment(String comment);
}