Loading de.ugoe.cs.swe.TTCN3/src/de/ugoe/cs/swe/validation/StructureOfDataValidator.xtend +37 −25 Original line number Diff line number Diff line Loading @@ -240,33 +240,43 @@ class StructureOfDataValidator extends AbstractDeclarativeValidator { if (!activeProfile.checkNoAllKeywordInPortDefinitions) return; val INode node = NodeModelUtils.getNode(port) var allIsUsed = false; val procOrTypeList = port.body.attribs.getAllContentsOfType(ProcOrTypeList) val allOrSignatureList = port.body.attribs.getAllContentsOfType(AllOrSignatureList) val allOrTypeList = port.body.attribs.getAllContentsOfType(AllOrTypeList) for (a : procOrTypeList) { if (a.all != null) { allIsUsed = true TTCN3StatisticsProvider.getInstance.incrementCountStructure val INode node = NodeModelUtils.getNode(a) val message = "\"all\" keyword is used in the definition of port \"" + port.name + "\"!" warning( message, TTCN3Package.eINSTANCE.TTCN3Reference_Name, MessageClass.STRUCTURE.toString, node.startLine.toString, node.endLine.toString, "4.2.1, " + MiscTools.getMethodName() ); } } if (!allIsUsed) { for (a : allOrSignatureList) { if (a.all != null) { allIsUsed = true } TTCN3StatisticsProvider.getInstance.incrementCountStructure val INode node = NodeModelUtils.getNode(a) val message = "\"all\" keyword is used in the definition of port \"" + port.name + "\"!" warning( message, TTCN3Package.eINSTANCE.TTCN3Reference_Name, MessageClass.STRUCTURE.toString, node.startLine.toString, node.endLine.toString, "4.2.1, " + MiscTools.getMethodName() ); } } if (!allIsUsed) { for (a : allOrTypeList) { if (a.all != null) { allIsUsed = true } } } if (allIsUsed) { TTCN3StatisticsProvider.getInstance.incrementCountStructure val INode node = NodeModelUtils.getNode(a) val message = "\"all\" keyword is used in the definition of port \"" + port.name + "\"!" warning( message, Loading @@ -279,6 +289,8 @@ class StructureOfDataValidator extends AbstractDeclarativeValidator { } } } override register(EValidatorRegistrar registrar) { //not needed for classes used as ComposedCheck } Loading Loading
de.ugoe.cs.swe.TTCN3/src/de/ugoe/cs/swe/validation/StructureOfDataValidator.xtend +37 −25 Original line number Diff line number Diff line Loading @@ -240,33 +240,43 @@ class StructureOfDataValidator extends AbstractDeclarativeValidator { if (!activeProfile.checkNoAllKeywordInPortDefinitions) return; val INode node = NodeModelUtils.getNode(port) var allIsUsed = false; val procOrTypeList = port.body.attribs.getAllContentsOfType(ProcOrTypeList) val allOrSignatureList = port.body.attribs.getAllContentsOfType(AllOrSignatureList) val allOrTypeList = port.body.attribs.getAllContentsOfType(AllOrTypeList) for (a : procOrTypeList) { if (a.all != null) { allIsUsed = true TTCN3StatisticsProvider.getInstance.incrementCountStructure val INode node = NodeModelUtils.getNode(a) val message = "\"all\" keyword is used in the definition of port \"" + port.name + "\"!" warning( message, TTCN3Package.eINSTANCE.TTCN3Reference_Name, MessageClass.STRUCTURE.toString, node.startLine.toString, node.endLine.toString, "4.2.1, " + MiscTools.getMethodName() ); } } if (!allIsUsed) { for (a : allOrSignatureList) { if (a.all != null) { allIsUsed = true } TTCN3StatisticsProvider.getInstance.incrementCountStructure val INode node = NodeModelUtils.getNode(a) val message = "\"all\" keyword is used in the definition of port \"" + port.name + "\"!" warning( message, TTCN3Package.eINSTANCE.TTCN3Reference_Name, MessageClass.STRUCTURE.toString, node.startLine.toString, node.endLine.toString, "4.2.1, " + MiscTools.getMethodName() ); } } if (!allIsUsed) { for (a : allOrTypeList) { if (a.all != null) { allIsUsed = true } } } if (allIsUsed) { TTCN3StatisticsProvider.getInstance.incrementCountStructure val INode node = NodeModelUtils.getNode(a) val message = "\"all\" keyword is used in the definition of port \"" + port.name + "\"!" warning( message, Loading @@ -279,6 +289,8 @@ class StructureOfDataValidator extends AbstractDeclarativeValidator { } } } override register(EValidatorRegistrar registrar) { //not needed for classes used as ComposedCheck } Loading