PL/SQL Developer Browser Extender Command

[MAIN]
NAME=Keep
CAPTION=#field_0
OTYPE=Function,Package,"Package body",Procedure,Sequence,Trigger,Type,"Type body"
OOWNER=%
ONAME=%
SEPARATOR_ABOVE=N
SEPARATOR_BELOW=N
LOAD_AND_EXECUTE=N
LOAD_COMMAND=N
LOAD_AFTER=REPLACE
LOAD_WIN_TYPE=1
PRIVILEGE_REQ=N
PRIVILEGE=
ORACLE_VERSION_REQ=N
ORACLE_VERSION=7.0.0
ONCLICK_CONFIRM=N
ONCLICK_CONFIRM_MSG=
ONCLICK_SPLASH=N
ONCLICK_SPLASH_MSG=
ONCLICK_SPLASH_MSG_BL=N
ONCLICK_SPLASH_MSG_AFTER=
ONCLICK_SPLASH_DELAY=0
ONCLICK_IGNORE_EXCEPTIONS=Y
ONPOPUP_IGNORE_EXCEPTIONS=Y

[ONCLICK]
--
-- you must have granted execute on sys.dbms_shared_pool package
-- to intall it run $ORACLE_HOME/rdbms/dbmspool.sql
--
 declare
   otype varchar2(20);
   pflag varchar2(2);
 begin
  otype := '#otype';
  If otype = 'SEQUENCE'           then pflag := 'Q';
  elsIf otype = 'PROCEDURE'       then pflag := 'P';
  elsIf otype = 'FUNCTION'        then pflag := 'P';
  elsIf otype = 'PACKAGE'         then pflag := 'P';
  elsIf otype = 'PACKAGE BODY'    then pflag := 'P';
  elsIf otype = 'TRIGGER'         then pflag := 'R';
  elsIf otype = 'TYPE'            then pflag := 'T';
  elsIf otype = 'TYPE BODY'       then pflag := 'T';
  elsIf otype = 'JAVA SOURCE'     then pflag := 'JS';
  elsIf otype = 'JAVA CLASS'      then pflag := 'JC';
  elsIf otype = 'JAVA RESOURCE'   then pflag := 'JR';
  end if;
  sys.dbms_shared_pool.#caption('#object',pflag);
 end;

[ONPOPUP]
--
-- you must have granted select on sys.v_$db_object_cache 
--
select decode(kept,'YES','UnKeep','Keep') caption 
  from sys.v_$db_object_cache 
 where owner like '#oowner'
   and name like '#oname'
   and type like '#otype'
union
select 'Keep' caption from dual  
 order by 1 desc
