KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > ltk > internal > core > refactoring > history > IRefactoringDescriptorDeleteQuery


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.internal.core.refactoring.history;
12
13 import org.eclipse.ltk.core.refactoring.RefactoringDescriptorProxy;
14 import org.eclipse.ltk.core.refactoring.RefactoringStatus;
15
16 /**
17  * A query interface to decide whether a refactoring descriptor may be deleted.
18  * <p>
19  * Clients should be aware that the methods defined by this interface can be
20  * called from a non-user interface thread.
21  * </p>
22  *
23  * @since 3.2
24  */

25 public interface IRefactoringDescriptorDeleteQuery {
26
27     /**
28      * Have any refactoring descriptors been deleted?
29      *
30      * @return <code>true</code> if any descriptors have been deleted,
31      * <code>true</code> otherwise
32      */

33     public boolean hasDeletions();
34
35     /**
36      * Returns whether the current delete operation can be executed.
37      * <p>
38      * The refactoring descriptor will considered to be deleted only if this
39      * method returns a status of severity {@link RefactoringStatus#OK}.<br>
40      * If a status of severity {@link RefactoringStatus#FATAL} is returned, the
41      * entire operation which this deletion is part of is considered to be
42      * aborted.
43      * </p>
44      *
45      * @param proxy
46      * the refactoring descriptor proxy to delete
47      * @return a refactoring status describing the outcome of the user prompt
48      */

49     public RefactoringStatus proceed(RefactoringDescriptorProxy proxy);
50 }
51
Popular Tags