KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > jdt > internal > corext > refactoring > tagging > ICommentProvider


1 /*******************************************************************************
2  * Copyright (c) 2005, 2006 IBM Corporation and others.
3  * All rights reserved. This program and the accompanying materials
4  * are made available under the terms of the Eclipse Public License v1.0
5  * which accompanies this distribution, and is available at
6  * http://www.eclipse.org/legal/epl-v10.html
7  *
8  * Contributors:
9  * IBM Corporation - initial API and implementation
10  *******************************************************************************/

11 package org.eclipse.jdt.internal.corext.refactoring.tagging;
12
13 /**
14  * Interface for refactorings which provide a comment for the history.
15  *
16  * @since 3.2
17  */

18 public interface ICommentProvider {
19
20     /**
21      * Performs a dynamic check whether this refactoring object is capable of
22      * accepting user comments to be stored in the refactoring history. The
23      * return value of this method may change according to the state of the
24      * refactoring.
25      */

26     public boolean canEnableComment();
27
28     /**
29      * If <code>canEnableComment</code> returns <code>true</code>, then
30      * this method is used to ask the refactoring object for the comment
31      * associated with the refactoring. This call can be ignored if
32      * <code>canEnableComment</code> returns <code>false</code>.
33      *
34      * @return the comment, or <code>null</code>
35      */

36     public String JavaDoc getComment();
37
38     /**
39      * If <code>canEnableComment</code> returns <code>true</code>, then
40      * this method may be called to set the comment associated with the
41      * refactoring. This call can be ignored if <code>canEnableComment</code>
42      * returns <code>false</code>.
43      *
44      * @param comment
45      * the comment to set, or <code>null</code>
46      */

47     public void setComment(String JavaDoc comment);
48 }
49
Popular Tags