Java Code Examples for org.eclipse.xtext.xbase.typesystem.internal.TypeData#isOwnedBy()

The following examples show how to use org.eclipse.xtext.xbase.typesystem.internal.TypeData#isOwnedBy() . 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: ValidatingReassigningResolvedTypes.java    From xtext-extras with Eclipse Public License 2.0 5 votes vote down vote up
@Override
public TypeData mergeTypeData(XExpression expression, List<TypeData> allValues, boolean returnType, boolean nullIfEmpty) {
	for (TypeData it : allValues) {
		if (!it.isOwnedBy(getReferenceOwner())) {
			throw new IllegalArgumentException("result is not owned by this resolved types");
		}
	}
	TypeData result = super.mergeTypeData(expression, allValues, returnType, nullIfEmpty);
	if (!result.isOwnedBy(getReferenceOwner())) {
		throw new IllegalArgumentException("result is not owned by this resolved types");
	}
	return result;
}
 
Example 2
Source File: ValidatingRootResolvedTypes.java    From xtext-extras with Eclipse Public License 2.0 5 votes vote down vote up
@Override
public TypeData mergeTypeData(XExpression expression, List<TypeData> allValues, boolean returnType, boolean nullIfEmpty) {
	for (TypeData it : allValues) {
		if (!it.isOwnedBy(getReferenceOwner())) {
			throw new IllegalArgumentException("result is not owned by this resolved types");
		}
	}
	TypeData result = super.mergeTypeData(expression, allValues, returnType, nullIfEmpty);
	if (!result.isOwnedBy(getReferenceOwner())) {
		throw new IllegalArgumentException("result is not owned by this resolved types");
	}
	return result;
}
 
Example 3
Source File: ValidatingRootResolvedTypes.java    From xtext-extras with Eclipse Public License 2.0 5 votes vote down vote up
@Override
public void acceptType(XExpression expression, TypeData typeData) {
	if (!typeData.isOwnedBy(getReferenceOwner())) {
		throw new IllegalArgumentException("typeData is not owned by this resolved types");
	}
	super.acceptType(expression, typeData);
}
 
Example 4
Source File: ValidatingRootResolvedTypes.java    From xtext-extras with Eclipse Public License 2.0 5 votes vote down vote up
@Override
public List<TypeData> doGetTypeData(XExpression expression) {
	List<TypeData> result = super.doGetTypeData(expression);
	if (result != null) {
		for (TypeData it : result) {
			if (!it.isOwnedBy(getReferenceOwner())) {
				throw new IllegalArgumentException("result is not owned by this resolved types");
			}
		}
	}
	return result;
}
 
Example 5
Source File: ValidatingExpressionAwareResolvedTypes.java    From xtext-extras with Eclipse Public License 2.0 5 votes vote down vote up
@Override
public TypeData mergeTypeData(XExpression expression, List<TypeData> allValues, boolean returnType, boolean nullIfEmpty) {
	for (TypeData it : allValues) {
		if (!it.isOwnedBy(getReferenceOwner())) {
			throw new IllegalArgumentException("result is not owned by this resolved types");
		}
	}
	TypeData result = super.mergeTypeData(expression, allValues, returnType, nullIfEmpty);
	if (result != null && !result.isOwnedBy(getReferenceOwner())) {
		throw new IllegalArgumentException("result is not owned by this resolved types");
	}
	return result;
}
 
Example 6
Source File: ValidatingStackedResolvedTypes.java    From xtext-extras with Eclipse Public License 2.0 5 votes vote down vote up
@Override
public TypeData mergeTypeData(XExpression expression, List<TypeData> allValues, boolean returnType, boolean nullIfEmpty) {
	for (TypeData it : allValues) {
		if (!it.isOwnedBy(getReferenceOwner())) {
			throw new IllegalArgumentException("result is not owned by this resolved types");
		}
	}
	TypeData result = super.mergeTypeData(expression, allValues, returnType, nullIfEmpty);
	if (!result.isOwnedBy(getReferenceOwner())) {
		throw new IllegalArgumentException("result is not owned by this resolved types");
	}
	return result;
}