11package de .variantsync .evolution .variability .pc .visitor .common ;
22
3- import de .variantsync .evolution .util .io .CaseSensitivePath ;
43import de .variantsync .evolution .util .functional .Result ;
4+ import de .variantsync .evolution .util .io .CaseSensitivePath ;
55import de .variantsync .evolution .variability .pc .ArtefactTree ;
66import de .variantsync .evolution .variability .pc .LineBasedAnnotation ;
77import de .variantsync .evolution .variability .pc .SourceCodeFile ;
1414import java .io .FileNotFoundException ;
1515
1616public class LinePCQuery implements ArtefactVisitor {
17- private final CaseSensitivePath path ;
17+ private final CaseSensitivePath relativePath ;
1818 private final int lineNumber ;
1919
2020 private SourceCodeFile foundFile = null ;
2121 private boolean lineFound = false ;
2222 private Node result = null ;
2323
24- public LinePCQuery (final CaseSensitivePath path , final int lineNumber ) {
25- this .path = path ;
24+ public LinePCQuery (final CaseSensitivePath relativePath , final int lineNumber ) {
25+ this .relativePath = relativePath ;
2626 this .lineNumber = lineNumber ;
2727 }
2828
@@ -36,7 +36,7 @@ public Result<Node, Exception> getResult() {
3636 "Given line number "
3737 + lineNumber
3838 + " is not within bounds of file "
39- + path
39+ + relativePath
4040 + " that ranges from "
4141 + foundFile .getRootAnnotation ().getLineFrom ()
4242 + " to "
@@ -45,7 +45,7 @@ public Result<Node, Exception> getResult() {
4545 ));
4646 }
4747
48- return Result .Failure (new FileNotFoundException ("Could not find file " + path .toString () + "!" ));
48+ return Result .Failure (new FileNotFoundException ("Could not find file " + relativePath .toString () + "!" ));
4949 }
5050
5151 @ Override
@@ -59,7 +59,7 @@ public <C extends ArtefactTree<?>> void visitGenericArtefactTreeNode(final Synth
5959 @ Override
6060 public void visitSourceCodeFile (final SourceCodeFileVisitorFocus focus ) {
6161// Logger.info("visitSourceCodeFile(" + focus.getValue() + ")");
62- if (foundFile == null && focus .getValue ().getFile ().equals (path )) {
62+ if (foundFile == null && focus .getValue ().getFile ().equals (relativePath )) {
6363 foundFile = focus .getValue ();
6464 focus .skipRootAnnotationButVisitItsSubtrees (this );
6565 }
0 commit comments