Index: trunk/t3q/src/org/etsi/t3q/visitor/QualityChecker.java
===================================================================
--- trunk/t3q/src/org/etsi/t3q/visitor/QualityChecker.java	(revision 7)
+++ trunk/t3q/src/org/etsi/t3q/visitor/QualityChecker.java	(revision 12)
@@ -1397,49 +1397,45 @@
 
 	public void checkTypeDefOrderInGroup(LocationAST node) {
-		String previousDefId = null;
-		String currentDefId = null;
-		LocationAST identifierNode = node.getFirstChild();
-		String identifierText = identifierNode.getFirstChild().getText();
-
-		if (identifierNode.getNextSibling() != null) {
-			LocationAST moduleDefinition = identifierNode.getNextSibling()
+		String previousDefinitionIdentifierText = null;
+		String currentDefinitionIdentifierText = null;
+		LocationAST groupIdentifierNode = node.getFirstChild();
+		String groupIdentifierText = groupIdentifierNode.getFirstChild().getText();
+
+		if (groupIdentifierNode.getNextSibling() != null) {
+			LocationAST moduleDefinitionNode = groupIdentifierNode.getNextSibling()
 					.getNthChild(2);
 			do {
-				if (moduleDefinition.getType() != TTCN3ParserTokenTypes.SemiColon) {
-					if (moduleDefinition.getFirstChild().getType() == TTCN3ParserTokenTypes.TypeDef) {
-						LinkedList<LocationAST> identifierList = ASTUtil
-								.findTypeNodes(moduleDefinition,
-										TTCN3ParserTokenTypes.Identifier);
-						if (identifierList.size() > 0){
-							
-							LocationAST definitionIdentifier = identifierList
-									.get(0);
-	
-							currentDefId = definitionIdentifier.getFirstChild()
-									.getText();
+				if (moduleDefinitionNode.getType() != TTCN3ParserTokenTypes.SemiColon) {
+					if (LocationAST.getModuleDefinitionTypeNode(moduleDefinitionNode).getType() == TTCN3ParserTokenTypes.TypeDef) {
+						ArrayList<LocationAST> moduleDefinitionIdentifiersList = LocationAST.getModuleDefinitionIdentifiersList(moduleDefinitionNode);
+						for (LocationAST moduleDefinitionIdentifier : moduleDefinitionIdentifiersList) {
+							currentDefinitionIdentifierText = moduleDefinitionIdentifier
+									.getFirstChild().getText();
 							// switched to case insensitive ordering
-							if (previousDefId != null
-									&& (currentDefId
-											.compareToIgnoreCase(previousDefId) <= 0)) {
-								this.getLoggingInterface().logWarning(
-										node.getLine(),
-										node.getEndLine(),
-										MessageClass.STRUCTURE,
-										"Type definitions <\""
-														+ previousDefId
-														+ "\",\""
-														+ currentDefId
-														+ "\"> within group \""
-														+ identifierText
-														+ "\" are not alphabetically ordered!" +
-										"4.1, " + MiscTools.getMethodName());
+							if (previousDefinitionIdentifierText != null) {
+								if (currentDefinitionIdentifierText
+										.compareToIgnoreCase(previousDefinitionIdentifierText) <= 0) {
+									this.getLoggingInterface()
+											.logWarning(
+													node.getLine(),
+													node.getEndLine(),
+													MessageClass.STRUCTURE,
+													"Type definitions <\""
+															+ previousDefinitionIdentifierText
+															+ "\",\""
+															+ currentDefinitionIdentifierText
+															+ "\"> within group \""
+															+ groupIdentifierText
+															+ "\" are not alphabetically ordered!"
+															+ "4.1, "
+															+ MiscTools
+																	.getMethodName());
+								}
 							}
-							previousDefId = currentDefId;
-						
+							previousDefinitionIdentifierText = currentDefinitionIdentifierText;
 						}
-
-					}
-				}
-			} while ((moduleDefinition = moduleDefinition.getNextSibling()) != null);
+					}
+				}
+			} while ((moduleDefinitionNode = moduleDefinitionNode.getNextSibling()) != null);
 		}
 	}
