I’ve written a few posts on this subject…

Also, there’s two VERY nice resources for you that I recommend:

  1. My predecessor Sue Harper talks extensions in Oracle Magazine
  2. Mike Smithers has an exhaustive blog post on adding context menus

But.

None of these resources detail the object node names for the different types of editors you might want to extend.

So if you want to add a page to the Table editor, you have to say
<item type=”editor” node=”TableNode“…

This would add a new page over here ->

Maybe you want to see a list of OTHER tables in the  database of the same or similar name...with object navigator links?
Maybe you want to see a list of OTHER tables in the database of the same or similar name…with object navigator links?

The bolded bit from above is key. You have to know how we refer (via the node value) to the different object editors to extend them with an XML extension. Now, you can probably guess most of them. A few though are hard to guess.

Here’s an exhaustive list, or as exhaustive as I could come up with – thanks to Brian Jeffries for the huge assist here!!

  • TableNode – TABLE
  • ViewNode – VIEW
  • MViewNode – MATERIALIZED_VIEW
  • PlSqlBaseNode – PROCEDURE FUNCTION PACKAGE PACKAGE BODY TYPE TYPE BODY
  • DatabaseLinkNode – DATABASE LINK
  • MViewLogNode – MATERIALIZED VIEW LOG
  • TriggerNode – TRIGGER
  • IndexNode – INDEX
  • RecycledObjectNode – RECYCLEBIN
  • DirectoryNode – DIRECTORY
  • QueueNode – QUEUE
  • QueueTableNode – QUEUE TABLE
  • JavaNode – JAVA
  • XmlSchemaNode – XML SCHEMA

Doing it for PL/SQL

Someone on the forums wanted to know how to build an editor page for the PL/SQL editor.

They couldn’t guess the node name, and it’s PlSqlBaseNode. Kinda hard to guess there…

Here’s an example:

<items>
<item type="editor" node="PlSqlBaseNode" vertical="true">
<title><![CDATA[LinesofCode]]></title>
<query>
<sql><![CDATA[SELECT count(*) Num from dba_source where type = 'PROCEDURE'
AND owner = :OBJECT_OWNER
AND name = :OBJECT_NAME
]]></sql>
</query>
</item>
</items>
Stupid example, but you get the idea?
Stupid example, but you get the idea?

Making this easier…

We want to publish an SDK or cookbook filled with examples and How-To’s on GitHub. We have permission to do so. Now we just need the time to build it out and share stuff. So stay tuned.

Author

I'm a Distinguished Product Manager at Oracle. My mission is to help you and your company be more efficient with our database tools.

14 Comments

  1. Hi Jeff,
    I want to add a page to the Table editor with a a lot of HTML (insted of display a query result) – how can I do that?

    Best regards,
    Carlos

    • Something like a text report or table of content with (anchor) links to some chapters above the toc. And of course the data/text/structur will come from a query. Imagine something like a summary or small documentation about the content of a object (most interesting package…)

  2. David Grimberg Reply

    I currently have an extension that I’ve added to both Tables and Views that shows security policies attached to the Table and View, but I’d like to extend this to public and private synonyms.

    The XML code for tables is like this:

    But I can’t find the node name for either Synonym node documented anywhere.

  3. Couple of questions that probably deserve a RTFM response…which I will when I have a little more free time.

    Is is possible to tweak the SQL under existing pages, or is it safer to just create a new tab? Example would be adding an PARTITION_KEY_INDICATOR to the Columns page of the Table Nodes.

    Is it possible to selectively hide built in Pages and order custom ones to take their place?

    Can you define custom pages with a child page/pages? Ala the Constraints, Statistics, Triggers, Dependencies, Partitions, and Indexes
    tables under Table Nodes?

  4. Michel Ramirez Reply

    Hi Jeff,

    I tried to do extension for Jobs.

    Do you know what is the node Name for it?

    <item type=”editor” node=”JobNode“…
    node=”JobsNode“…
    node=”SchedulerJobNode“…

    Thanks and best regards.

  5. Jeff,

    Great news about the cookbook.
    I know many SQLDeveloper users who are either not conversant with Java or are at sites where software installation is heavily restricted, so getting a Java IDE is a bit of a mission.
    For these users, being able to extend SQLDeveloper functionality without recourse to additional tooling would be a major plus point.

  6. Ingo Olbrich Reply

    Hi Jeff, excellent idea!

    Is there any chance to enhance the sql-worksheet the same way as the pl/sql editor? And if this is the case what would be the name of the Node?

    Any chance to get it as an appetizer?

    Best regards,
    Ingo

Write A Comment