Commit 240484cf authored by Philip Makedonski's avatar Philip Makedonski
Browse files

+ adjusted implementation to check component definitions across modules where...

+ adjusted implementation to check component definitions across modules where other local definitions are still only checked within the same module.
parent 1a80a17f
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -1283,9 +1283,11 @@ class CodeStyleValidator extends AbstractDeclarativeValidator {
		val component = variable.findDesiredParent(ComponentDef)
		val parentControl = variable.findDesiredParent(ModuleControlBody)
		val parent = variable.variableLocal
		if (component == null && (parent != null || parentControl != null)) {
		if (parent != null || parentControl != null) {
			val module = variable.findDesiredParent(TTCN3Module)
			if (variable.isUnreferenced(module, false)) {
			val isComponentDefinition = (component != null)
			val unreferenced = variable.isUnreferenced(module, isComponentDefinition)
			if (unreferenced) {
				statistics.incrementCountStyle
				var varName = "Module Control Part"
				if (parent != null) {