Community
Participate
Working Groups
combine "open resource" and "goto line", I am looking for a built-in feature or plugin for Eclipse to do the following: Open Resource + Jump to Line (in one step) Ideal would be to do this: Open Resource (Ctrl+Shift+R) Type: FileName:LineNumber (eg. test.html:50) I know i can do it in 2 steps, but when copying "File:Line" from somewhere i need to paste it in "Open Resource", copy or memorize and delete the line-number, open the file and then invoke "Go to line" (Ctrl+L) and paste or type the line number and confirm. This is very complicated. It would be great if the "Open resource" dialog could combine these steps. Is there a built-in feature or plugin for Eclipse that can do this? If not could anybody write such a plugin?
This future will be very useful when open tracing stack like this: at sun.reflect.GeneratedConstructorAccessor105.newInstance(Unknown Source) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) at java.lang.reflect.Constructor.newInstance(Constructor.java:526) at com.mysql.jdbc.Util.handleNewInstance(Util.java:404) at com.mysql.jdbc.SQLError.createCommunicationsException(SQLError.java:981) at com.mysql.jdbc.MysqlIO.reuseAndReadPacket(MysqlIO.java:3465) at com.mysql.jdbc.MysqlIO.reuseAndReadPacket(MysqlIO.java:3365) at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3805) at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2478) at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2625) at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2551) .... I can just paste the thing in the parenthesis and it is done!
(In reply to Woody Yu from comment #1) > This future will be very useful when open tracing stack like this: > > at java.lang.reflect.Constructor.newInstance(Constructor.java:526) > at com.mysql.jdbc.Util.handleNewInstance(Util.java:404) > at > .... > > I can just paste the thing in the parenthesis and it is done! Are you aware that there is a Stack Trace Console, specifically to open types from stack traces?
For your reference, there is an SO question [1] that this feature request originates from. The original poster asked for an Open Resource extension to go to lines by entering file name and line number like so: "file.txt:123" [1] http://stackoverflow.com/questions/35129704/how-to-open-a-resource-at-specified-line-in-eclipse-in-one-step
As long as this is not in the platform, I also highly recommend AnyEdit plugin [1], which can do that by right clicking the line and "Open File under Cursor". Beside this, it should be possible to implement it in the resources dialog, be changing the filter condition to ignore :<line> part of the search string. So typing <file_path>:<line_nr> should filter to <file_path> and after OK and opening the editor it will try to jump to <line_nr>. [1] http://marketplace.eclipse.org/content/anyedit-tools
Jonas, please have a look.