How to get Eclipse Console to hyperlink text to source code files?

前端 未结 7 1817
生来不讨喜
生来不讨喜 2020-12-09 10:37

In Code: System.out.println(\"myPackage.MyClass\");

In Eclipse Console: myPackage.MyClass.myMethod

I want to click on the output (myPackage.MyClass.myM

7条回答
  •  离开以前
    2020-12-09 11:36

    A much easier method is to trick the console into creating a link for you. The format is simple:

    System.out.println("(" + new TestBed().getClass().getSimpleName() + ".java:" + 18 + ")");
    

    Obviously you can provide the class type and line number in code as you wish.

提交回复
热议问题