I might be the last person in the universe to have discovered this, but in the last week I've been really diggin' a JDeveloper code editor feature I stumbled on so I wanted to share the tip in case there's at least one more person who might benefit from it.
How many times have you stared at a piece of code like this and wondered, "Why can't JDeveloper figure out what I want to do here?!?!? I need to cast the right hand side to a JUCtrlActionBinding to make the compiler happy!"
Well, it turns out that JDeveloper does know this information, but it's a little bashful about telling you about it. It unobtrusively shows the little "lightbulb" icon in the margin, indicating that it has some "Quick Fix" code assistance that it's prepared to offer you. Only thing is, that lightbulb is sometimes a bit too subtle (especially if it didn't dawn on your that helping you out with a cast was one of the quick fixes that it recgonized). So, I've gone a year now without realizing this feature was there. What's better, if you press [Ctrl]-[Alt]-[Enter] then the list of "quick fixes" appears right at the insertion point in your code, as shown below, so you don't need to lift your fingers from the keyboard. Simply pressing one more [Enter] to confirm you want the "Cast" code assistance gets the job done!
The result is that you can end up saving yourself a whole lot of typing...
1:16:11 PM
|