I’ve written a few posts on this subject…
- Intro to Extensions
- Adding Synonym Support with Extensions
- Adding an Error page for Views with an Extension
Also, there’s two VERY nice resources for you that I recommend:
- My predecessor Sue Harper talks extensions in Oracle Magazine
- 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 ->
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>
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.
14 Comments
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
It depends on the HTML. What were you looking to do?
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…)
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.
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?
possible to tweak – no
creating a new tab, yes
creating a new tab with child pages, yes
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.
I listed all the ones I could find…
Hi Jeff.
thanks for your research
best regards.
ill ask the dev tomorrow, we’ll figure it out
Thanks 🙂
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.
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
the same way, no
but you can enhance it
it just requires a Java extension