Reputation: 2952
Is there some tag or command that would collapse a region of my code in plsqldeveloper; in netBeans for java, I use:
<editor-fold desc="description" default-state="collapsed">
and if my memory is right in c#:
#region;
Upvotes: 9
Views: 9902
Reputation: 51
begin -- this will mark the beginning of collapsible region
insert into state_cd values ('DC', 'District of Columbia');
insert into state_cd values ('AL', 'Alabama');
insert into state_cd values ('MT', 'Montana');
insert into state_cd values ('AK', 'Alaska');
insert into state_cd values ('NE', 'Nebraska');
end; -- the end of collapsible region
Upvotes: 4
Reputation: 21851
Unfortunately, there's no way to make you code collapsible by virtue of #region
or the like.
If you really want to collapse a region, you'll probably want to surround it using an anonymous block, with an added label as a reminder for the anon. block usage.
Example:
create or replace procedure testing_code_folding is
v_number number;
v_date date;
begin
begin <<fold>>
v_number := 0;
v_date := sysdate;
end;
if v_number = 0 then
dbms_output.put_line('end');
end if;
end testing_code_folding;
Now you should be able to fold the region around the inner anon block
Upvotes: 6