【问题标题】:Collapsible region for PL/SQL DeveloperPL/SQL Developer 的可折叠区域
【发布时间】:2012-02-27 14:56:39
【问题描述】:

是否有一些标签或命令会折叠我在 plsqldeveloper 中的代码区域;在 java 的 netBeans 中,我使用:

<editor-fold desc="description" default-state="collapsed">

如果我在 c# 中没有记错的话:

#region;

【问题讨论】:

    标签: oracle plsqldeveloper


    【解决方案1】:

    不幸的是,没有办法让您的代码通过#region 或类似的方式可折叠。

    如果您真的想要折叠一个区域,您可能希望使用匿名块将其包围,并添加一个标签作为 anon 的提醒。阻止使用。

    例子:

       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;
    

    现在您应该能够折叠内部匿名块周围的区域

    【讨论】:

    • @Roger 不,应该没有
    【解决方案2】:
    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
    

    【讨论】:

      猜你喜欢
      • 2012-12-01
      • 2013-06-02
      • 1970-01-01
      • 2010-12-15
      • 1970-01-01
      • 2017-08-08
      • 1970-01-01
      • 1970-01-01
      • 2011-10-27
      相关资源
      最近更新 更多