Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
Copyright (c) 2011 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.impl;
import static org.eclipse.ltk.core.refactoring.RefactoringStatus.*;
Generic rename strategy for EMF resources. For XtextResources you should rather use the DefaultRenameStrategy.

Jan Koehnlein - Initial contribution and API
Holger Schill
	public void createDeclarationUpdates(String newNameResourceSet resourceSet,
			IRefactoringUpdateAcceptor updateAcceptor) {
		Resource targetResource = resourceSet.getResource(getTargetElementOriginalURI().trimFragment(), false);
		try {
catch (IOException exc) {
			updateAcceptor.getRefactoringStatus().add(ERROR, exc.getMessage());
finally {
	protected EAttribute getNameAttribute(EObject targetElement) {
		if (targetElement instanceof ENamedElement) {
		return null;
New to GrepCode? Check out our FAQ X