Loading de.ugoe.cs.swe.T3Q/config/t3q.cfg +1 −1 Original line number Diff line number Diff line Loading @@ -3,7 +3,7 @@ <QualityCheckProfile> <profileName>defaultProfile</profileName> <profileVersion>v2.0.0b9</profileVersion> <ignoredResourceRegExp>.*IGNORED.*</ignoredResourceRegExp> <ignoredResourceRegExp>(.*[/\\]Common[/\\](IMS_LibSip|IMS_XSD)[/\\].*[.]ttcn)</ignoredResourceRegExp> <settingAbortOnError>true</settingAbortOnError> <loggingConfiguration> <showFullPath>false</showFullPath> Loading de.ugoe.cs.swe.T3Q/src/de/ugoe/cs/swe/T3Q/TTCN3ResourceProvider.java +12 −14 Original line number Diff line number Diff line Loading @@ -76,27 +76,17 @@ public class TTCN3ResourceProvider { for (String path : paths) { File file = new File(path); // check if file is a ignored one and if so do not parse it Pattern pattern = Pattern.compile(activeProfile.getIgnoredResourceRegExp()); Matcher matcher = null; if (file.isFile()) { matcher = pattern.matcher(file.getName()); if(!matcher.matches()) { parser.add(new FileParser(file, qualifiedNameProvider)); } } else if (file.isDirectory()) { Collection<File> files = FileUtils.listFiles(file, new RegexFileFilter("^.*ttcn3$|^.*ttcn$|^.*3mp$"), DirectoryFileFilter.DIRECTORY); for (File f : files) { matcher = pattern.matcher(f.getName()); if(!matcher.matches()) { parser.add(new FileParser(f, qualifiedNameProvider)); } } } } try { List<Future<Resource>> list = pool.invokeAll(parser); Loading Loading @@ -137,10 +127,18 @@ public class TTCN3ResourceProvider { Stopwatch watchAnalyzing = Stopwatch.createStarted(); ExecutorService pool = Executors.newFixedThreadPool(4); // Check if resource is a ignored one and if so, do not analyze it. Pattern pattern = Pattern.compile(activeProfile.getIgnoredResourceRegExp()); Matcher matcher = null; ArrayList<Analyzer> analyzer = new ArrayList<Analyzer>(); for (int i = 0; i < TTCN3GlobalScopeProvider.RESOURCES.size(); i++) { Resource resource = TTCN3GlobalScopeProvider.RESOURCES.get(i); matcher = pattern.matcher(resource.getURI().toFileString()); if(!matcher.matches()) { analyzer.add(new Analyzer(TTCN3GlobalScopeProvider.RESOURCES.get(i), logger)); } } try { List<Future<TTCN3Output>> output = pool.invokeAll(analyzer); pool.shutdown(); Loading Loading
de.ugoe.cs.swe.T3Q/config/t3q.cfg +1 −1 Original line number Diff line number Diff line Loading @@ -3,7 +3,7 @@ <QualityCheckProfile> <profileName>defaultProfile</profileName> <profileVersion>v2.0.0b9</profileVersion> <ignoredResourceRegExp>.*IGNORED.*</ignoredResourceRegExp> <ignoredResourceRegExp>(.*[/\\]Common[/\\](IMS_LibSip|IMS_XSD)[/\\].*[.]ttcn)</ignoredResourceRegExp> <settingAbortOnError>true</settingAbortOnError> <loggingConfiguration> <showFullPath>false</showFullPath> Loading
de.ugoe.cs.swe.T3Q/src/de/ugoe/cs/swe/T3Q/TTCN3ResourceProvider.java +12 −14 Original line number Diff line number Diff line Loading @@ -76,27 +76,17 @@ public class TTCN3ResourceProvider { for (String path : paths) { File file = new File(path); // check if file is a ignored one and if so do not parse it Pattern pattern = Pattern.compile(activeProfile.getIgnoredResourceRegExp()); Matcher matcher = null; if (file.isFile()) { matcher = pattern.matcher(file.getName()); if(!matcher.matches()) { parser.add(new FileParser(file, qualifiedNameProvider)); } } else if (file.isDirectory()) { Collection<File> files = FileUtils.listFiles(file, new RegexFileFilter("^.*ttcn3$|^.*ttcn$|^.*3mp$"), DirectoryFileFilter.DIRECTORY); for (File f : files) { matcher = pattern.matcher(f.getName()); if(!matcher.matches()) { parser.add(new FileParser(f, qualifiedNameProvider)); } } } } try { List<Future<Resource>> list = pool.invokeAll(parser); Loading Loading @@ -137,10 +127,18 @@ public class TTCN3ResourceProvider { Stopwatch watchAnalyzing = Stopwatch.createStarted(); ExecutorService pool = Executors.newFixedThreadPool(4); // Check if resource is a ignored one and if so, do not analyze it. Pattern pattern = Pattern.compile(activeProfile.getIgnoredResourceRegExp()); Matcher matcher = null; ArrayList<Analyzer> analyzer = new ArrayList<Analyzer>(); for (int i = 0; i < TTCN3GlobalScopeProvider.RESOURCES.size(); i++) { Resource resource = TTCN3GlobalScopeProvider.RESOURCES.get(i); matcher = pattern.matcher(resource.getURI().toFileString()); if(!matcher.matches()) { analyzer.add(new Analyzer(TTCN3GlobalScopeProvider.RESOURCES.get(i), logger)); } } try { List<Future<TTCN3Output>> output = pool.invokeAll(analyzer); pool.shutdown(); Loading