This is what I used to end up doing very frequently
- copy something like String#getBytes from a bug comment
- press Ctrl+Shift+T in Eclipse
- paste the copied text Open Type dialog
- argh... no matches
- delete the method name
- open the type in an editor
- press Ctrl+O
- argh.. what was that method again?
- go back to bugzilla and read/copy the method name
- come back to Quick Outline and filter the method
- and finally reach the method
The new command opens a Java element or a Java stack trace from clipboard. If the clipboard content spans multiple lines then the it is pasted to the Java Stack Trace Console. If the clipboard content is a single line the command tries to open the matching Java element in an editor. Some examples
- java.lang.String
- String#getBytes
- java.lang.String.getBytes(String, int[], int)
- String.java:123
- at java.lang.String.matches(String.java:1550)
- java.lang.String.valueOf(char) line: 1456
I use this command with a key binding of
Ctrl+Shift+V. After doing a Ctrl+C the most natural thing to do is Ctrl+V so the key binding for this command should be similar. Plus Ctrl+Shift+V is also similar to Ctrl+Shift+T and Ctrl+Shift+R, making it a bit easier for me to remember it.
This command (
Bug 48880) is already in nightly builds and will be in the today's I-build.
As a final note I should also mention 2 'nasty' Platform bugs that I faced while implementing this command
- Bug 324160: [Commands] Platform should support to use the action IDs from the action set contribution in menuContribution
- Bug 324161: menu contributions added using 'endof' should appear before contributions added using 'after'
I say nasty because in its current form the whole menu contribution, command, actionSet, action story can be very confusing...