Skip to content

Commit

Permalink
When syntax for opening to a line is unknown, just open the file
Browse files Browse the repository at this point in the history
Looks like all the IDEs have different syntaxes for opening a file to a
given line so let's not suppose it will just be file:line as it works
for none of them so chances it will work for a random one are quite
thin.
  • Loading branch information
gsmet committed Jan 19, 2022
1 parent deca0c6 commit 9a29739
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,11 @@ public List<String> createFileOpeningArgs(String fileName, String line) {
return Collections.singletonList(fileName);
}

// we don't know the syntax for opening a file at a given line
// so we just open the file
if (lineNumberArgs.isEmpty()) {
return Collections.singletonList(fileName + ":" + line);
log.debug("No syntax provided for opening the file at a given line for this IDE so we will just open the file");
return Collections.singletonList(fileName);
}

return lineNumberArgs.stream()
Expand Down

0 comments on commit 9a29739

Please sign in to comment.