<commit_before>/*
 * generated by Xtext
 */
package de.uni_paderborn.fujaba.muml.allocation.language.scoping

/**
 * This class contains custom scoping description.
 * 
 * see : http://www.eclipse.org/Xtext/documentation.html#scoping
 * on how and when to use it 
 *
 */
class AllocationSpecificationLanguageScopeProvider extends org.eclipse.ocl.examples.xtext.essentialocl.scoping.EssentialOCLScopeProvider {

}<commit_msg>- compute the scope for the type MeasureFunctionCS "polymorphically" (as it is done by default)<commit_after>/*
 * generated by Xtext
 */
package de.uni_paderborn.fujaba.muml.allocation.language.scoping

import org.eclipse.xtext.scoping.IScope
import org.eclipse.emf.ecore.EObject
import org.eclipse.emf.ecore.EReference
import de.uni_paderborn.fujaba.muml.allocation.language.cs.MeasureFunctionCS

/**
 * This class contains custom scoping description.
 * 
 * see : http://www.eclipse.org/Xtext/documentation.html#scoping
 * on how and when to use it 
 *
 */
class AllocationSpecificationLanguageScopeProvider extends org.eclipse.ocl.examples.xtext.essentialocl.scoping.EssentialOCLScopeProvider {
	
	override IScope getScope(EObject context, EReference reference) {
		if (context instanceof MeasureFunctionCS) {
			polymorphicGetScope(context, reference)
		} else {
			super.getScope(context, reference)	
		}
	}
	
	// copied (and xtend-ified) from org.eclipse.xtext.scoping.impl.AbstractDeclarativeScopeProvider.getScope
	// because getScope is overridden by a superclass
	def protected IScope polymorphicGetScope(EObject context, EReference reference) {
		var IScope scope = polymorphicFindScopeForReferenceName(context, reference)
		if (scope == null) {
			scope = polymorphicFindScopeForClassName(context, reference)
			if (scope == null) {
				scope = delegateGetScope(context, reference)
			}
		}
		scope
	}
}
{'fraction_non_alphanumeric': 0.09347826086956522, 'fraction_numerical': 0.0, 'mean_word_length': 4.825949367088608, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7596352', 'n_tokens_mistral': 607, 'n_tokens_neox': 554, 'n_words': 124}