Index: trunk/t3q/src/org/etsi/t3q/T3Q.java
===================================================================
--- trunk/t3q/src/org/etsi/t3q/T3Q.java	(revision 41)
+++ trunk/t3q/src/org/etsi/t3q/T3Q.java	(revision 43)
@@ -58,6 +58,4 @@
 	
 	private boolean formattingEnabled = false;
-	
-
 	//TODO: statistics shall be ideally based on XSLT, meaning the output shall be transformed into XML 
 	//TODO: also add exception checking for the profiles 
@@ -230,10 +228,14 @@
 			//TODO: core functionality, encapsulate and extract
 			for (int i = 0; i < ttcn3Resources.size(); i++) {
-				analyzer = analyzerFactory.getTTCN3Analyzer(ttcn3Resources
-						.get(i));
-				System.out.println("Analyzing: " + analyzer.getFilename());
-				T3QVisitor visitor = new T3QVisitor();
-				visitor.setFilename(analyzer.getFilename());
-				visitor.acceptDFS((LocationAST) analyzer.getParser().getAST());
+				if (MiscTools.regExpMatch(activeProfile.getIgnoredResourceRegExp() , ttcn3Resources.get(i))){
+					System.out.println("Analyzing: " + ttcn3Resources.get(i) + " (Skipped) "); //TODO: may need to use analyzer.getFilename for consistency
+				} else {
+					analyzer = analyzerFactory.getTTCN3Analyzer(ttcn3Resources
+							.get(i));
+					System.out.println("Analyzing: " + analyzer.getFilename());
+					T3QVisitor visitor = new T3QVisitor();
+					visitor.setFilename(analyzer.getFilename());
+					visitor.acceptDFS((LocationAST) analyzer.getParser().getAST());
+				}
 			}
 			endTime = System.currentTimeMillis();
@@ -295,70 +297,75 @@
 
 			for (int i = 0; i < ttcn3Resources.size(); i++) {
-				analyzer = analyzerFactory.getTTCN3Analyzer(ttcn3Resources
-						.get(i));
-				System.out.println("  Formatting file: "
-						+ analyzer.getFilename());
-				try {
-
-					String resourcePath = ttcn3Resources.get(i);
-
-					String source = MiscTools.readFile(resourcePath);
-
-					String formatted = formatter.formatTTCN3Source(source,
-							T3Q.activeProfile.getFormattingParameters());
-
-					// calculate the target path for the current resource
-
-					// TODO: look into it and fix it -> is it not fixed now?
-					// reason is: absolute paths are difficult to handle
-					// String subPath = resourcePath;
-//					String subPath = "/" + new File(resourcePath).getName(); 
-					
-					String canonicalResourcePath = new File(resourcePath).getCanonicalPath();
-					String canonicalWorkingPath = new File(".").getCanonicalPath();
-										
-					String destinationSubPath = canonicalResourcePath;
-					
-					//TODO: make this subtraction optional and document the feature
-					//CF: Manuel's remark and my answer - it introduces a dependency on the working path which may not be easily understood and has at least be documented properly
-					if (canonicalResourcePath.startsWith(canonicalWorkingPath)){
-						destinationSubPath = canonicalResourcePath.substring(canonicalWorkingPath.length());
+				if (MiscTools.regExpMatch(activeProfile.getIgnoredResourceRegExp() , ttcn3Resources.get(i))){
+					System.out.println("  Formatting file: "
+							+ ttcn3Resources.get(i) + " (Skipped) ");
+				} else {
+					analyzer = analyzerFactory.getTTCN3Analyzer(ttcn3Resources
+							.get(i));
+					System.out.println("  Formatting file: "
+							+ analyzer.getFilename());
+					try {
+	
+						String resourcePath = ttcn3Resources.get(i);
+	
+						String source = MiscTools.readFile(resourcePath);
+	
+						String formatted = formatter.formatTTCN3Source(source,
+								T3Q.activeProfile.getFormattingParameters());
+	
+						// calculate the target path for the current resource
+	
+						// TODO: look into it and fix it -> is it not fixed now?
+						// reason is: absolute paths are difficult to handle
+						// String subPath = resourcePath;
+	//					String subPath = "/" + new File(resourcePath).getName(); 
+						
+						String canonicalResourcePath = new File(resourcePath).getCanonicalPath();
+						String canonicalWorkingPath = new File(".").getCanonicalPath();
+											
+						String destinationSubPath = canonicalResourcePath;
+						
+						//TODO: make this subtraction optional and document the feature
+						//CF: Manuel's remark and my answer - it introduces a dependency on the working path which may not be easily understood and has at least be documented properly
+						if (canonicalResourcePath.startsWith(canonicalWorkingPath)){
+							destinationSubPath = canonicalResourcePath.substring(canonicalWorkingPath.length());
+						}
+	
+						if (destinationSubPath.substring(0,3).endsWith(":\\")){
+							destinationSubPath=destinationSubPath.substring(2);
+						}
+						
+						String outputPathArg = new File(getDestinationPath()).getPath(); // also
+																			// strips
+																			// the
+																			// slash
+																			// if
+																			// present
+						String outputPath = outputPathArg + destinationSubPath;
+	
+						
+						
+	//					System.out.println("****************************");
+	//					System.out.println("ABSOLUTE: \t\t"+canonicalResourcePath);
+	//					System.out.println("WORKING: \t\t"+canonicalWorkingPath);
+	//					System.out.println("ResourcePath: \t\t"+resourcePath);
+	//					System.out.println("SubPath: \t\t"+destinationSubPath);
+	//					System.out.println("OutputPath: \t\t"+outputPath);
+	//					System.out.println("****************************");
+	//					System.out.println(formatted);
+	//					System.out.println(outputPath);
+						MiscTools.writeFile(outputPath, formatted);
+						System.out.println("File \""+outputPath+"\" written successfully!");
+	
+					} catch (RecognitionException e1) {
+						System.err.println("Recognition exception:");
+						System.err.println(e1.getLocalizedMessage());
+					} catch (TokenStreamException e) {
+						System.err.println("Token stream exception:");
+						e.printStackTrace();
+					} catch (Exception e) {
+						System.err.println("Exception:");
+						e.printStackTrace();
 					}
-
-					if (destinationSubPath.substring(0,3).endsWith(":\\")){
-						destinationSubPath=destinationSubPath.substring(2);
-					}
-					
-					String outputPathArg = new File(getDestinationPath()).getPath(); // also
-																		// strips
-																		// the
-																		// slash
-																		// if
-																		// present
-					String outputPath = outputPathArg + destinationSubPath;
-
-					
-					
-//					System.out.println("****************************");
-//					System.out.println("ABSOLUTE: \t\t"+canonicalResourcePath);
-//					System.out.println("WORKING: \t\t"+canonicalWorkingPath);
-//					System.out.println("ResourcePath: \t\t"+resourcePath);
-//					System.out.println("SubPath: \t\t"+destinationSubPath);
-//					System.out.println("OutputPath: \t\t"+outputPath);
-//					System.out.println("****************************");
-//					System.out.println(formatted);
-//					System.out.println(outputPath);
-					MiscTools.writeFile(outputPath, formatted);
-					System.out.println("File \""+outputPath+"\" written successfully!");
-
-				} catch (RecognitionException e1) {
-					System.err.println("Recognition exception:");
-					System.err.println(e1.getLocalizedMessage());
-				} catch (TokenStreamException e) {
-					System.err.println("Token stream exception:");
-					e.printStackTrace();
-				} catch (Exception e) {
-					System.err.println("Exception:");
-					e.printStackTrace();
 				}
 
@@ -369,5 +376,4 @@
 			System.out.println("Code formatting finished in " + elapsed
 					+ "ms (" + MiscTools.doubleToString(elapsedMinutes) + " minutes).");
-
 		}
 		return analyzer;
