You're using the synonym instead of schema.pkg.procedure?
I tried schema.pkg.procedure, still did not help. The cursor was on the middle of the procedure name and I right click and choose these :
- Popup Describe - provides details about the Schema ( I guess details from DBA_USER)
select * from sys.Dba_users where username = :OBJECT_OWNER
- Open Declaration - Does not do anything. Below are seen in the logs:
select 'SCHEMA' object_type , :OWNER owner , :OWNER object_name from all_users where username = :OWNER
select object_type,owner,object_name,rank from ( select object_type,owner,object_name,0 rank from all_objects where object_name = :NAME and UPPER(owner) = nvl(:OWNER,:SCHEMA_CONTEXT) and object_type not in ( 'SYNONYM' ) union all select ao.object_type,ao.owner,ao.object_name,decode(UPPER(syn.owner), nvl(:OWNER,:SCHEMA_CONTEXT),10,20) from all_objects ao,all_synonyms syn where ao.owner = syn.table_owner and ao.object_name = syn.table_name and syn.synonym_name = :NAME and ( UPPER(syn.owner) = nvl(:OWNER,:SCHEMA_CONTEXT) OR UPPER(syn.owner) = nvl(:OWNER,'PUBLIC') ) ) where ((:BODY_WHERE='Y') OR (object_type not in ('PACKAGE BODY'))) AND rownum < 100 order by rank, CASE object_type WHEN 'TABLE' THEN 0 WHEN 'VIEW' THEN 1 WHEN 'INDEX' THEN 2 WHEN 'PACKAGE' THEN 3 WHEN 'PACKAGE BODY' THEN 4 ELSE 5 END
select UPPER(sys_context('USERENV', 'CURRENT_SCHEMA')) from dual
My understanding is the queries that SQL Developer executes uses USER_ or ALL_ views when attempting to open the target package.procedure (which is present in another schema). This possibly is the cause of the behaviour that I am seeing - "Definition not found. PL/SQL xxx unit does not exist".
Other tools such as SQL Navigator / and Toad provided the ability for the user to choose a setting in Features/Preferences to inform the tool to use DBA_ Views , and this would enable the queries to see the source code and "open" the package.procedure.
Would the developers of Oracle SQL Developer please consider implementing a similar feature ?