Commit 31fa64fe authored by Malte Heithoff's avatar Malte Heithoff
Browse files

Take only streams that matches file structure

parent 52898bf1
Pipeline #325190 passed with stage
in 2 minutes and 6 seconds
...@@ -67,7 +67,8 @@ public final class StreamScanner { ...@@ -67,7 +67,8 @@ public final class StreamScanner {
Optional<ASTStreamUnitsCompilationUnit> ast = new StreamUnitsParser().parse(f.getAbsolutePath()); Optional<ASTStreamUnitsCompilationUnit> ast = new StreamUnitsParser().parse(f.getAbsolutePath());
if (ast.isPresent()) { if (ast.isPresent()) {
String packageName = Joiners.DOT.join(ast.get().getPackageList()); String packageName = Joiners.DOT.join(ast.get().getPackageList());
if (getStreamModelName(relativePath.getParent()).equals(packageName)){ String modelName = f.getName().substring(0, f.getName().indexOf("."));
if (streamModelName.equals(packageName + "." + modelName)){
ComponentStreamUnitsSymbol s = scanner.symTab.<ComponentStreamUnitsSymbol>resolve(streamModelName, ComponentStreamUnitsSymbol s = scanner.symTab.<ComponentStreamUnitsSymbol>resolve(streamModelName,
ComponentStreamUnitsSymbol.KIND).orElse(null); ComponentStreamUnitsSymbol.KIND).orElse(null);
if (s != null) { if (s != null) {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment