fx-log icon indicating copy to clipboard operation
fx-log copied to clipboard

Open files in IntelliJ

Open joffrey-bion opened this issue 8 years ago • 1 comments

It would be nice to make fully-qualified class names clickable, so that they open the corresponding source file in IntelliJ. These links could be easily created in the "class" column, and maybe also integrated in stacktraces.

joffrey-bion avatar Oct 31 '16 19:10 joffrey-bion

Good news! Directly from the docs, the following command line allows to start IntelliJ or make a currently open instance point to the right file at the right line:

path/to/idea.exe <path-to-project> --line <num> <path-to-file>

For instance in Git Bash on windows:

"/d/Development/IntelliJ IDEA Ultimate Edition 163.5644.15/bin/idea64.exe" /c/Development/Github/fx-log --line 1 /c/Development/Github/fx-log/src/main/java/org/hildan/fxlog/controllers/MainController.java

Note that all parameters are mandatory here. If we don't want a specific line, we have to specify line 1. A smarter thing to do could be to parse the file and look for the class declaration line, more appropriate than the first line, especially if there are a lot of imports, but we're not there yet.

joffrey-bion avatar Oct 31 '16 19:10 joffrey-bion