01: /*******************************************************************************
02: * Copyright (c) 2005, 2006 IBM Corporation and others.
03: * All rights reserved. This program and the accompanying materials
04: * are made available under the terms of the Eclipse Public License v1.0
05: * which accompanies this distribution, and is available at
06: * http://www.eclipse.org/legal/epl-v10.html
07: *
08: * Contributors:
09: * IBM Corporation - initial API and implementation
10: *******************************************************************************/package org.eclipse.jdt.internal.corext.refactoring.tagging;
11:
12: /**
13: * Interface for refactorings which provide a comment for the history.
14: *
15: * @since 3.2
16: */
17: public interface ICommentProvider {
18:
19: /**
20: * Performs a dynamic check whether this refactoring object is capable of
21: * accepting user comments to be stored in the refactoring history. The
22: * return value of this method may change according to the state of the
23: * refactoring.
24: */
25: public boolean canEnableComment();
26:
27: /**
28: * If <code>canEnableComment</code> returns <code>true</code>, then
29: * this method is used to ask the refactoring object for the comment
30: * associated with the refactoring. This call can be ignored if
31: * <code>canEnableComment</code> returns <code>false</code>.
32: *
33: * @return the comment, or <code>null</code>
34: */
35: public String getComment();
36:
37: /**
38: * If <code>canEnableComment</code> returns <code>true</code>, then
39: * this method may be called to set the comment associated with the
40: * refactoring. This call can be ignored if <code>canEnableComment</code>
41: * returns <code>false</code>.
42: *
43: * @param comment
44: * the comment to set, or <code>null</code>
45: */
46: public void setComment(String comment);
47: }
|