01: /*******************************************************************************
02: * Copyright (c) 2000, 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 are able to create
14: * appropriate delegates for the refactored elements.
15: *
16: * @since 3.2
17: *
18: */
19: public interface IDelegateUpdating {
20:
21: /**
22: * Performs a dynamic check whether this refactoring object is capable of
23: * creating appropriate delegates for the refactored elements. The
24: * return value of this method may change according to the state of the
25: * refactoring.
26: */
27: public boolean canEnableDelegateUpdating();
28:
29: /**
30: * If <code>canEnableDelegateUpdating</code> returns
31: * <code>true</code>, then this method is used to ask the refactoring
32: * object whether delegates will be created.
33: * This call can be ignored if <code>canEnableDelegateUpdating</code>
34: * returns <code>false</code>.
35: */
36: public boolean getDelegateUpdating();
37:
38: /**
39: * Returns the title of the preference to update delegates in the user
40: * interface.
41: *
42: * @param plural
43: * <code>true</code> if several delegates are created,
44: * <code>false</code> otherwise
45: * @return the non-null string denoting the title
46: */
47: public String getDelegateUpdatingTitle(boolean plural);
48:
49: /**
50: * If <code>canEnableDelegateUpdating</code> returns
51: * <code>true</code>, then this method is used to ask the refactoring
52: * object whether delegates will be deprecated.
53: * This call can be ignored if <code>canEnableDelegateUpdating</code>
54: * returns <code>false</code>.
55: */
56: public boolean getDeprecateDelegates();
57:
58: /**
59: * If <code>canEnableDelegateUpdating</code> returns
60: * <code>true</code>, then this method may be called to set whether
61: * to create delegates.
62: * This call can be ignored if <code>canEnableDelegateUpdating</code>
63: * returns <code>false</code>.
64: */
65: public void setDelegateUpdating(boolean updating);
66:
67: /**
68: * If <code>canEnableDelegateUpdating</code> returns
69: * <code>true</code>, then this method may be called to set whether
70: * to deprecate delegates.
71: * This call can be ignored if <code>canEnableDelegateUpdating</code>
72: * returns <code>false</code>.
73: */
74: public void setDeprecateDelegates(boolean deprecate);
75: }
|