User-Defined Context Menus in SQLDeveloper

“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.
Continue reading

SQLDeveloper XML Extensions and auto-navigation

It’s official, England are now the second best cricket team in the British Isles !
After all, Scotland were dispatched with ease and as for Wales…they didn’t even make it to the Cricket World Cup.
OK, technically they did because they’re part of England for the purposes of cricket…although you’d be hard pressed to get them to admit it.
Ireland are, of course, some way in front having actually managed to actually win the odd game against Test Playing Nations.
Whilst it takes quite some effort to find silver lining in the cloud of English Cricket’s latest debacle, the same cannot be said if SQLDeveloper is your Oracle Database IDE of choice … Continue reading

Installing SQLDeveloper 4 on Mint and Ubuntu – Minus the Alien

Deb recently bought a new kettle.
Now, a kettle used to simply boil water and turn itself off when it was done.
Not this thing.
It lights up as it boils and announces the fact that it’s finished with a melodious ping.
It’s got gauges and lights and switches.
I’ve decided that it’s probably a Dalek in disguise.
Like Daleks (or at least, the original Daleks), it can’t go up stairs – or if it can, it’s not advertising the fact.
Every morning, descending to the kitchen is filled with trepidation.
When will the Dalek tire of vaporizing innocent water molecules and move on to World Domination…

Doc-tor ! Doc-tor ! I feel like a ket-tle !

Doc-tor ! Doc-tor ! I feel like a ket-tle !

I wouldn’t be entirely surprised to find that, like most whizzy modern appliances, it runs on Java.
Which brings us, by a fairly circuitous route, to the topic at hand – SQLDeveloper.

Oracle’s latest incarnation of it’s IDE does indeed run on Java – the version 7 JDK to be precise.
In this post, I’ll go through the steps required on Mint to :

  • Install the Java 7 JDK
  • Install SQLDeveloper 4
  • Persuade SQLDeveloper 4 to play nicely with Java
  • Add SQLDeveloper to the Cinnamon Menu

The good news is that we can do all of this without the messy alien conversion of an rpm package to .deb format.

NOTE – I’ve followed these steps on Mint13, but they should be pretty much the same for any Debian Distro.
Anyway, without further ado…

Continue reading

Turning off Code Completion in SQLDeveloper – a Grumpy Old Man Fights Back

“You’re problem is you’re BBC”, a colleague remarked recently.
On further investigation, I found this not to be some reference to the British Broadcasting Corporation but rather that I had been “Born Before Computers”. Yes, I grew up – in computing terms at least – on the Command Line.
A number of things have changed since those dim and distant days.
Recently, I had a comment from Darryl claiming that chocolate bars had also been gradually reducing in size.
Damning photographic evidence of this scandal has recently come into my possession…

A Bounty Bar from 1980 together with it's modern counterpart

There’s more. My phone keeps insisting that I can’t spell and arbitrarily replacing words when I’m writing an SMS.
“You’re just the breast” took a bit of explaining to a rather skeptical Deb.
Having finally persuaded my phone that I really don’t require it’s assistance when composing a short missive, I have now turned my attention to SQLDeveloper. Continue reading

SQLDeveloper 3.0 and the Missing Imported Connections in Ubuntu

SQLDeveloper 3.0 production has finally been released.

Like a kid on Christmas morning, I ripped off the wrapping paper and plunged straight into the installation on my Ubuntu laptop.
All was going according to plan…until I fired it up and found that it hadn’t imported my connections from SQLDeveloper 3.0 EA4 (
It seems that the production version has got a bit sniffy about it’s Early Adopter sibling although, oddly, it does still import any extensions you have installed.
Anyway, to save you the trouble of setting up all your connections again… Continue reading

Reverse Engineering a Crud Matrix complete with SQLDeveloper Extension – Version 2

A couple of years ago, I wrote an application to reverse-engineer a CRUD matrix for tables in an Oracle database.
I’ve since used it quite a lot for impact analysis and have refined it a fair amount. I’m now happy enough with the new version to let it take it’s first steps into the wider world….where doubtless people will be able to find some of the bugs that I’ve missed.

UPDATE October 2015 – the latest ( and let’s face it, least buggy) version of this application is now avaiable on GitHub.

At this point, if you’re wondering what a CRUD matrix is, you can have a look at the original post here. Continue reading