“What are those birds ?”, Deb asked as we lay drowsing by the pool. “Must be seagulls”, I replied confidently.
We may have been in Tenerife rather than Southend, but they were definitely gulls, and we were right next to the sea.
“They’re not seagulls”, Deb stated emphatically, “if they were, they’d be squawking like a bunch of Welsh women fighting over the last pair of shoes in the sale!”
I forbore to comment on this. After all, I’d had recent, painful, experience of Welsh squawking the previous evening.
We’d arrived at the hotel, just in time to watch England come second in the Rugby…to Wales.
Let me tell you squawking wasn’t the half of it.
As usual my emergency backup nationality ( born in Auckland) was no defence against the joyous derision pouring forth from my better half.
Fortunately, the Spanish aren’t big on Rugby so I’ve had a week of relative quiet on that front.
As you’ve no doubt noticed by now, I’m not much of an ornithologist, so I’ve had to find something else to help while away the long hours beside the pool.
Step forward something that I’ve been puzzling over for some time, namely, just what options are available if you want to put together a User-Defined Context Menu for SQLDeveloper.
About now, someone is bound to mention Java. However, my Java is more rusty than a 1973 Ford Cortina that’s been parked in Cardiff Bay for two weeks.
Besides, it’s perfectly possible to knock up some fairly respectable SQLDeveloper extensions using just XML and some SQL and PL/SQL. However, when it comes to Context Menus there doesn’t seem to be one single place for definitive documentation.
Therefore, after much trial and error, I’m going to take this opportunity to set out the options that I have managed to get working, together with examples.
What I’m going to cover is :
- How to add a context menu to SQLDeveloper
- Where on the Navigator Tree you can add it
- How to get more than one item on a Context Menu
- The various types of input field you can code
- How to use Context Menus to execute SQL statements and PL/SQL blocks
Before we go any further, I think I should state that these examples were written and tested on SQLDeveloper 4.0.3 running against an Oracle XE 11g database.