KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > jdt > internal > corext > refactoring > reorg > NullReorgQueries


1 /*******************************************************************************
2  * Copyright (c) 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.reorg;
12
13 import org.eclipse.core.runtime.OperationCanceledException;
14
15 /**
16  * Null implementation of reorg queries.
17  *
18  * @since 3.3
19  */

20 public final class NullReorgQueries implements IReorgQueries {
21
22     /** Null implementation of confirm query */
23     private static final class NullConfirmQuery implements IConfirmQuery {
24
25         /**
26          * {@inheritDoc}
27          */

28         public boolean confirm(String JavaDoc question) throws OperationCanceledException {
29             return true;
30         }
31
32         /**
33          * {@inheritDoc}
34          */

35         public boolean confirm(String JavaDoc question, Object JavaDoc[] elements) throws OperationCanceledException {
36             return true;
37         }
38     }
39
40     /** The null query */
41     private static final IConfirmQuery NULL_QUERY= new NullConfirmQuery();
42
43     /**
44      * {@inheritDoc}
45      */

46     public IConfirmQuery createSkipQuery(String JavaDoc queryTitle, int queryID) {
47         return NULL_QUERY;
48     }
49
50     /**
51      * {@inheritDoc}
52      */

53     public IConfirmQuery createYesNoQuery(String JavaDoc queryTitle, boolean allowCancel, int queryID) {
54         return NULL_QUERY;
55     }
56
57     /**
58      * {@inheritDoc}
59      */

60     public IConfirmQuery createYesYesToAllNoNoToAllQuery(String JavaDoc queryTitle, boolean allowCancel, int queryID) {
61         return NULL_QUERY;
62     }
63 }
64
Popular Tags