Java Code Examples for org.eclipse.xtext.ui.refactoring.IRefactoringUpdateAcceptor#getRefactoringStatus()

The following examples show how to use org.eclipse.xtext.ui.refactoring.IRefactoringUpdateAcceptor#getRefactoringStatus() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: AbstractReferenceUpdater.java    From xtext-eclipse with Eclipse Public License 2.0 6 votes vote down vote up
protected void createReferenceUpdates(
		ElementRenameArguments elementRenameArguments,
		Iterable<IReferenceDescription> referenceDescriptions,
		IRefactoringUpdateAcceptor updateAcceptor,
		RefactoringResourceSetProvider resourceSetProvider,
		IProgressMonitor monitor) {
	SubMonitor progress = SubMonitor.convert(monitor, 100);
	progress.beginTask("Sort references by project", 1);
	Multimap<IProject, IReferenceDescription> project2references = sorter.sortByProject(referenceDescriptions);
	SubMonitor allProjectsProgress = progress.newChild(98).setWorkRemaining(project2references.keySet().size());
	for (IProject project : project2references.keySet()) {
		if (allProjectsProgress.isCanceled()) {
			throw new OperationCanceledException();
		}
		Multimap<URI, IReferenceDescription> resource2references = sorter.sortByResource(project2references
				.get(project));
		ResourceSet resourceSet = resourceSetProvider.get(project);
		StatusWrapper status = updateAcceptor.getRefactoringStatus();
		createClusteredReferenceUpdates(elementRenameArguments, resource2references, resourceSet, updateAcceptor,
				status, allProjectsProgress.newChild(1));
	}
}
 
Example 2
Source File: ReferenceUpdaterDispatcher.java    From xtext-eclipse with Eclipse Public License 2.0 4 votes vote down vote up
protected ReferenceDescriptionAcceptor createFindReferenceAcceptor(IRefactoringUpdateAcceptor updateAcceptor) {
	return new ReferenceDescriptionAcceptor(resourceServiceProviderRegistry, updateAcceptor.getRefactoringStatus());
}