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.impl;
import  org.eclipse.core.runtime.IProgressMonitor;
import  org.eclipse.core.runtime.OperationCanceledException;
import  org.eclipse.core.runtime.SubMonitor;
Delivers all contained elements of an element to be renamed in order to updated references to them.

Jan Koehnlein - Initial contribution and API
	private static final int MONITOR_CHUNK_SIZE = 1000;
	public List<URIgetDependentElementURIs(EObject baseElement, IProgressMonitor monitor) {
		SubMonitor progress = SubMonitor.convert(monitor, 2);
		List<URIelementURIs = Lists.newArrayList();
		int counter = 0;
		for (Iterator<EObjectiterator = EcoreUtil.getAllProperContents(baseElementfalse); iterator.hasNext();) {
			if(progress.isCanceled()) {
				throw new OperationCanceledException();
			EObject childElement =;
			if (.getFullyQualifiedName(childElement)!=null) {
				URI childURI = EcoreUtil.getURI(childElement);
				if (childURI != null) {
			if (counter %  == 0) {
		return elementURIs;
New to GrepCode? Check out our FAQ X