Extend Oracle SQL DEVELOPER : show only invalid packages
I started to look into the user defined extensions when somebody was telling me about some useful stuff that exists in Toad and which was missing in Sql Developer.
One of those things is the ability in TOAD to only show packages which are invalid. In Sqldeveloper, you can only filter packages on name, creation date and last modification date.
Adding extra filter criteria can easily be done by adding a user defined extension. As information about the xsd's used in Sqldeveloper can't be found anywhere, I think it is worth describing my user defined extension here.
via Tools->Preferences->Database->user defined extensions : Add an extension of type Navigator and fill it with P:sqlSqlDeveloperextensionsplsql.xml
You can find the code below, it adds 2 extra filters
Show only invalid : shows only db objects which are invalid
Exclude Tapi : excludes packages of which the name starts with CG$
If you want to add your own filters, just look at the code and I'm sure you'll be able to figure out how to do this
Here is an extraction of the modification I made.
<column filterable="true" sortable="false" id="Show only Invalid" defaultFilter="true">
<type>
<![CDATA[COMPLEX_PREDICATE]]>
</type>
<colName>
<![CDATA[/**/INVALID = 'TRUE' or OBJECT_NAME IN (SELECT OBJECT_NAME FROM SYS.ALL_OBJECTS WHERE OWNER =:SCHEMA and STATUS = 'INVALID' and OBJECT_TYPE='PACKAGE BODY')]]>