/** | |
* Copyright (c) 2018 CEA LIST. | |
* | |
* 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 | |
* | |
* Contributors: | |
* Arnault Lapitre (CEA LIST) arnault.lapitre@cea.fr | |
* - Initial API and Implementation | |
*/ | |
package org.eclipse.efm.formalml.xtext | |
import org.eclipse.emf.common.notify.Notifier | |
import org.eclipse.emf.ecore.resource.ResourceSet | |
import org.eclipse.xtext.builder.clustering.CurrentDescriptions; | |
import org.eclipse.xtext.resource.IResourceDescriptions | |
import org.eclipse.xtext.resource.containers.ResourceSetBasedAllContainersStateProvider | |
class FormalMLResourceSetBasedAllContainersStateProvider | |
extends ResourceSetBasedAllContainersStateProvider { | |
override | |
protected ResourceSet getResourceSet(IResourceDescriptions context) { | |
if (context instanceof CurrentDescriptions) { | |
val Notifier target = (context as CurrentDescriptions).getTarget(); | |
if (target instanceof ResourceSet) { | |
return target as ResourceSet; | |
} | |
} | |
return super.getResourceSet(context); | |
} | |
} |