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
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.