Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
Copyright (c) 2011 itemis AG (http://www.itemis.eu) 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 http://www.eclipse.org/legal/epl-v10.html /
 
 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.

Author(s):
Jan Koehnlein - Initial contribution and API
Holger Schill
	public void createDeclarationUpdates(String newNameResourceSet resourceSet,
			IRefactoringUpdateAcceptor updateAcceptor) {
		Resource targetResource = resourceSet.getResource(getTargetElementOriginalURI().trimFragment(), false);
		EcoreUtil.resolveAll(targetResource);
		applyDeclarationChange(newNameresourceSet);
		try {
			.addSaveAsUpdate(targetResourceupdateAcceptor);
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