Description | 1- Create a new directory called "specific" in the sql developer directory.
2- Take the two xml file described below and name them references.xml and referencedby.xml .
<items>
<item type="editor" node="TableNode" vertical="true">
<title><![CDATA[References]]></title>
<query>
<sql><![CDATA[Select A1.TABLE_NAME, InitCap(C1.COLUMN_NAME), C1.POSITION,
b1.CONSTRAINT_NAME, A1.OWNER, a1.delete_rule, c1.owner sdev_link_owner,
a1.table_name sdev_link_name, 'TABLE' sdev_link_type FROM
sys.ALL_CONSTRAINTS A1, sys.ALL_CONSTRAINTS B1, sys.ALL_CONS_COLUMNS C1
where A1.Constraint_Name = B1.R_Constraint_name
And A1.Owner=B1.R_Owner
And a1.CONSTRAINT_TYPE IN ('P', 'U')
And C1.Table_name=B1.table_name
And C1.Constraint_Name = B1.Constraint_name
And C1.owner = B1.owner
and B1.table_name =:OBJECT_NAME
and B1.owner=:OBJECT_OWNER
order by A1.Table_name, B1.CONSTRAINT_NAME, C1.Position
]]></sql>
</query>
</item>
</items>
and :
<items>
<item type="editor" node="TableNode" vertical="true">
<title><![CDATA[Referenced by]]></title>
<query>
<sql><![CDATA[ Select B1.TABLE_NAME, InitCap(C1.COLUMN_NAME), C1.POSITION,
B1.CONSTRAINT_NAME, B1.OWNER, b1.delete_rule, c1.owner sdev_link_owner,
b1.table_name sdev_link_name, 'TABLE' sdev_link_type FROM
sys.ALL_CONSTRAINTS B1, sys.ALL_CONS_COLUMNS C1
where B1.R_Constraint_Name = C1.Constraint_name
And B1.R_Owner=C1.Owner
And B1.CONSTRAINT_TYPE = 'R'
And C1.Table_name=:OBJECT_NAME
And C1.owner = :OBJECT_OWNER
order by b1.owner, B1.Table_name, B1.CONSTRAINT_NAME, C1.Position
]]></sql>
</query>
</item>
</items>
3- In SQL Developer, open: Tools>Preferences...>Database>User Defined Extensions.
4- Click "AddRow". Select EDITOR (type) and add the full path of the xml files for location.
5- Choose "OK", restart SQL Developer. Two new tabs appears in the the TABLE worksheet

    

    
If you right-click in a line of these tabs a contextual menu appears where you can choose to go to the referenced TABLE and open a new worksheet for this table.
|