Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
Copyright (c) 2010 itemis AG ( and others. All rights reserved. This program and the accompanying materials are made available under the terms of the Eclipse Public License v1.0 which accompanies this distribution, and is available at /
 package org.eclipse.xtext.ui.refactoring;
import  org.eclipse.ltk.core.refactoring.RefactoringStatus;
Customizable strategy for the text based rename refactoring of a given EObject.

Jan Koehnlein - Initial contribution and API
public interface IRenameStrategy {
	RefactoringStatus validateNewName(String newName);

Applies the declaration change to the semantic model in the given resource set.
	void applyDeclarationChange(String newNameResourceSet resourceSet);

Reverts the declaration change to the semantic model in the given resource set.
	void revertDeclarationChange(ResourceSet resourceSet);

Creates the document updates and reports them to the updateAcceptor
	void createDeclarationUpdates(String newNameResourceSet resourceSetIRefactoringUpdateAcceptor updateAcceptor);
	interface Provider {

an IRenameStrategy to rename the given target object or null if the element should be skipped (e.g. XtendConstructor)
NoSuchStrategyException�with a reason when refactoring is forbidden.
		IRenameStrategy get(EObject targetEObjectIRenameElementContext renameElementContextthrows NoSuchStrategyException;

			private static final long serialVersionUID = 5167954119728880001L;
			public NoSuchStrategyException(String message) {
New to GrepCode? Check out our FAQ X