Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Collapsible region for PL/SQL Developer

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;
like image 440
Roger Avatar asked Feb 27 '12 14:02

Roger


People also ask

How do I change the decimal separator in SQL Developer?

In SQL Developer, Preferences->Database-> NLS , if you change the Decimal Separator setting, you also need to make sure that your new setting doesn't conflict with the existing Group Separator setting.

How do I increase screen size in SQL Developer?

Go to the Display Settings; Go to scaling and "reset it": change to another scale, for example, 100% and then to your preferred scale; This should force the SQL-Developer Window to your preferred scale, unfortunately you have to repeat this procedure after every new SQL-Developer launch.

How do I enable word wrap in SQL Developer?

Configure > Preferences > User Interface - Editor > Tabs & Wrapping - Wrap lines.

How do I reduce the size of SQL Developer?

Click on Tools, select the Preferences. Click on the Code Editor. Click on Fonts. Set the size in the Font Size drop-down.


2 Answers

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

like image 111
Sathyajith Bhat Avatar answered Sep 30 '22 09:09

Sathyajith Bhat


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
like image 37
qcg Avatar answered Sep 30 '22 07:09

qcg