Commit 1fc74f9c authored by Philip Makedonski's avatar Philip Makedonski
Browse files

+ alternative implementation for directFieldElements, #30

parent e6d212d1
Loading
Loading
Loading
Loading
+19 −17
Original line number Diff line number Diff line
@@ -1145,23 +1145,25 @@ class TTCN3ScopeProvider extends AbstractDeclarativeScopeProvider {
	}

	private def Iterable<EObject> directFieldElements(FieldReference field) {
		if (field instanceof StructFieldDef) {
			if (field.type !== null) {
				field.type.ref.scopeReferencedFields
			}
		} else if (field instanceof FormalValuePar) {
			if (field.type !== null) {
				field.type.ref.scopeReferencedFields
			}
		} else if (field instanceof FormalTemplatePar) {
			if (field.type !== null) {
				field.type.ref.scopeReferencedFields
			}
		} else if (field instanceof UnionFieldDef) {
			if (field.type !== null) {
				field.type.ref.scopeReferencedFields
			}
		}
		//nested types
		field.scopeFieldReferences
//		if (field instanceof StructFieldDef) {
//			if (field.type !== null) {
//				field.type.ref.scopeReferencedFields
//			}
//		} else if (field instanceof FormalValuePar) {
//			if (field.type !== null) {
//				field.type.ref.scopeReferencedFields
//			}
//		} else if (field instanceof FormalTemplatePar) {
//			if (field.type !== null) {
//				field.type.ref.scopeReferencedFields
//			}
//		} else if (field instanceof UnionFieldDef) {
//			if (field.type !== null) {
//				field.type.ref.scopeReferencedFields
//			}
//		}
	}
	
	private def Iterable<EObject> directModuleElements(TTCN3Module module) {