KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > ltk > core > refactoring > history > RefactoringHistory


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.ltk.core.refactoring.history;
12
13 import org.eclipse.core.runtime.PlatformObject;
14
15 import org.eclipse.ltk.core.refactoring.RefactoringDescriptorProxy;
16
17 /**
18  * Object which represents a sequence of executed refactorings with optional time
19  * information.
20  * <p>
21  * Refactoring histories are exposed by the refactoring history service as
22  * result of queries and contain only lightweight proxy objects. The refactoring
23  * history service may hand out any number of refactoring histories and
24  * associated refactoring descriptor proxies for any given query.
25  * </p>
26  * <p>
27  * Note: this class may be extended to provide different implementations
28  * </p>
29  *
30  * @see IRefactoringHistoryService
31  * @see RefactoringDescriptorProxy
32  *
33  * @since 3.2
34  */

35 public abstract class RefactoringHistory extends PlatformObject {
36
37     /**
38      * Returns the refactoring descriptors of this history, in descending order
39      * of their time stamps.
40      *
41      * @return the refactoring descriptors, or an empty array
42      */

43     public abstract RefactoringDescriptorProxy[] getDescriptors();
44
45     /**
46      * Is the refactoring history empty?
47      *
48      * @return <code>true</code> if the history is empty, <code>false</code>
49      * otherwise
50      */

51     public abstract boolean isEmpty();
52
53     /**
54      * Returns this refactoring history with all entries from the other history
55      * removed.
56      * <p>
57      * The current refactoring history remains unchanged.
58      * </p>
59      *
60      * @param history
61      * the refactoring history
62      * @return the resulting refactoring history
63      */

64     public abstract RefactoringHistory removeAll(RefactoringHistory history);
65 }
66
Popular Tags