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;
Uses a Guice provider to instantiate and initialize a org.eclipse.xtext.ui.refactoring.IRenameStrategy.

Jan Koehnlein - Initial contribution and API
	public static interface IInitializable extends IRenameStrategy {
		boolean initialize(EObject targetEObjectIRenameElementContext renameElementContext);
	@Inject(optional = true)
	public IRenameStrategy get(EObject targetEObjectIRenameElementContext renameElementContextthrows NoSuchStrategyException {
		IRenameStrategy renameStrategy = createRenameStrategy(targetEObjectrenameElementContext);
		if (renameStrategy instanceof DefaultRenameStrategyProvider.IInitializable
				&& ((DefaultRenameStrategyProvider.IInitializablerenameStrategy).initialize(targetEObject,
						renameElementContext)) {
			return renameStrategy;
		return null;
	protected IRenameStrategy createRenameStrategy(EObject targetEObjectIRenameElementContext renameElementContext) {
		return  == null ? null : .get();
New to GrepCode? Check out our FAQ X