Commit f5a8707b authored by Daniel Honsel's avatar Daniel Honsel
Browse files

fixed STF160 naming conventions for templates

parent d7bd41a9
Loading
Loading
Loading
Loading
+4 −5
Original line number Diff line number Diff line
@@ -277,15 +277,14 @@ public class NamingConventionsValidator extends AbstractDeclarativeValidator {
		// check if it is not a present restriction, but a restriction
		if (templateDef.restriction != null && templateDef.restriction.present == null) {
			for (p : template.parList.params) {
				if (p instanceof FormalTemplatePar) {
					if (p.restriction == null || p.restriction.restriction == null ||
						p.restriction.restriction.present != null) {
				if (p.template != null) {
					if (p.template.restriction == null || p.template.restriction.restriction == null ||
						p.template.restriction.restriction.present != null) {
						isAmbiguous = true // problem occurred, inconsistent definition
					}
				} else {
					isAmbiguous = true // problem occurred, inconsistent definition
				}
				if (isAmbiguous) {
					TTCN3StatisticsProvider.getInstance.increaseCountNaming
					val INode node = NodeModelUtils.getNode(template)
					val infoMessage = "The template definition for \"" + template.name +
						"\" is ambiguous. It cannot be determined whether it is a send or a receive template according to STF160's conventions. It will not be analyzed further for naming conventions compliance."