Bug 426906

Summary: [Dialogs] Support filename:linenumber in Open Resource to open file and go to number
Product: [Eclipse Project] Platform Reporter: Robin Stocker <robin>
Component: IDEAssignee: Platform UI Triaged <platform-ui-triaged>
Status: NEW --- QA Contact:
Severity: enhancement    
Priority: P3 CC: kis36205
Version: 4.4Keywords: usability
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard:
Attachments:
Description Flags
IntelliJ IDEA "go to line number" none

Description Robin Stocker CLA 2014-01-29 10:38:01 EST
Created attachment 239432 [details]
IntelliJ IDEA "go to line number"

For Java files, there is a command called "Open from Clipboard", which is useful for opening e.g. Foo.java:20, which opens the file and directly jumps to line 20.

It would be useful if "Open Resource" would also support a format like that so that it could be used for all file types. It already supports "/" for matching parts of parent directories.

In case of ".+:\d+", it would list the file(s) matching the pattern left of the ":", and when a selection is opened, jump directly to the line number specified right of the ":".

On some platforms it's possible that a file name contains ":", so a literal search for that file should probably be done in addition for the results to be complete.


Note that IntelliJ IDEA supports this syntax already (see attachment): http://www.jetbrains.com/idea/webhelp/navigating-to-class-file-or-symbol-by-name.html