Question

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;
Was it helpful?

Solution

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

OTHER TIPS

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
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top