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: import org.eclipse.core.runtime.CoreException;
13:
14: import org.eclipse.ltk.core.refactoring.RefactoringStatus;
15:
16: /**
17: * Represents processors in the JDT space that rename elements.
18: */
19: public interface INameUpdating {
20:
21: /**
22: * Sets new name for the entity that this refactoring is working on.
23: */
24: public void setNewElementName(String newName);
25:
26: /**
27: * Get the name for the entity that this refactoring is working on.
28: */
29: public String getNewElementName();
30:
31: /**
32: * Gets the current name of the entity that this refactoring is working on.
33: */
34: public String getCurrentElementName();
35:
36: /**
37: * Gets the original elements. Since an <code>INameUpdating</code> only renames one element,
38: * this method must return an array containing exactly one element.
39: * @return an array containing exactly one element
40: * @see org.eclipse.ltk.core.refactoring.participants.RefactoringProcessor#getElements()
41: */
42: public Object[] getElements();
43:
44: /**
45: * Gets the element after renaming, or <code>null</code> if not available.
46: */
47: public Object getNewElement() throws CoreException;
48:
49: /**
50: * Checks if the new name is valid for the entity that this refactoring renames.
51: */
52: public RefactoringStatus checkNewElementName(String newName)
53: throws CoreException;
54: }
|