This discussion is archived
5 Replies Latest reply: Mar 10, 2011 1:03 PM by nudo RSS

30EA2 - Bugs?

nudo Newbie
Currently Being Moderated
Expand and collapse shortcut key binding do not work when editing a package.

Related - Sorting keyboard shortcuts by column, does not retain sort key and order when the preferences are closed and re-opened.

Collapsed regions expand when editing outside collapsible regions in source. This is extremely annoying in a large packages or large scripts, and especially when adding a new function or procedure.

To reproduce:
Edit a package body.
Collapse procedure declarations/bodies.
Type anywhere before the last collapsed statement and everything after the cursor will expand.

I think that the expected behavior would be to retain the state of collapsed procedures unless editing a collapsed block line itself and when a line is added or removed, blocks should move up or down accordingly..

Select statements collapse when editing a procedure, but not when editing a worksheet. This seems to only work when there is a comma at the end of the first line or if there is a begin statement.

Here are some test case examples:
-- Does not work
select 1
from dual;

-- Does not work
select 1, 2
from dual;

-- Does not work
select
1
from dual;

-- Works
select 1
from
dual x,
dual y;


-- Does not work
select 1,
2
from dual;

-- Works
select 1,
2

from dual;

-- Does not work
select 1
from dual x,
dual y;

-- Works
select 1
from
dual x,
dual y;

Edited by: user3910740 on Jan 3, 2011 12:34 PM
  • 1. Re: 30EA2 - Bugs?
    nudo Newbie
    Currently Being Moderated
    Also happens in previous versions.
  • 2. Re: 30EA2 - Bugs?
    Vadim Tropashko Pro
    Currently Being Moderated
    Would collapsing a 3-line block or query achieve anything other than cluttering code editor gutter? If most users agree with you, we can certainly change that. Can the others express their opinion here, or you can submit a feature request for voting on OTN.

    I agree that collapsed PL/SQL blocks expanding when edited outside them this is a bug (11658397).
  • 3. Re: 30EA2 - Bugs?
    -K- Guru
    Currently Being Moderated
    I'd say no, no more clutter. I only collapse to get to a piece of code without scrolling, and a few lines don't stand in the way for that.

    Thanks,
    K.
  • 4. Re: 30EA2 - Bugs?
    nudo Newbie
    Currently Being Moderated
    I am more concerned with the keyboard shortcut not working and the auto expanding when editing outside of a block (which looks like it may be fixed in EA4, thank you).

    I see that the editor seems to start collapsing after reaching 4 lines of code, I didn't recognize the pattern at first.

    I do not often need to collapse 3 lines of code, however when editing scripts with thousands of lines of smaller code blocks , it becomes tedious. Often I need to focus on a small set of code blocks in a large script and with thousands of lines between, it becomes difficult moving between them. I can use bookmarks for this, but I prefer to drill into my code.

    Triggers for instance do not collapse to a single line in the code editor. The highest level that is collapsible is the begin -> end blocks. So if I have a 100 triggers in a script and I collapse all statements, instead of 100 lines (plus whitespace) I get hundreds.

    i.e.
    Instead of:
    CREATE OR REPLACE TRIGGER "TRIGGER_NAME"...

    CREATE OR REPLACE TRIGGER "TRIGGER_NAME"...

    I see:
    CREATE OR REPLACE TRIGGER "TRIGGER_NAME"
    BEFORE INSERT
    ON "TABLE_NAME"
    REFERENCING OLD AS OLD NEW AS NEW
    FOR EACH ROW
    DECLARE
    VARIABLE_NAME VARIABLE_TYPE;
    VARIABLE_NAME VARIABLE_TYPE;
    VARIABLE_NAME VARIABLE_TYPE;
    VARIABLE_NAME VARIABLE_TYPE;
    BEGIN...;

    CREATE OR REPLACE TRIGGER "TRIGGER_NAME"
    BEFORE INSERT
    ON "TABLE_NAME"
    REFERENCING OLD AS OLD NEW AS NEW
    FOR EACH ROW
    DECLARE
    VARIABLE_NAME VARIABLE_TYPE;
    VARIABLE_NAME VARIABLE_TYPE;
    VARIABLE_NAME VARIABLE_TYPE;
    VARIABLE_NAME VARIABLE_TYPE;
    BEGIN...;


    Create table blocks collapse to:
    CREATE TABLE "TABLE_NAME" ...

    CREATE TABLE "TABLE_NAME" ...

    Edited by: user3910740 on Feb 28, 2011 10:54 AM
  • 5. Re: 30EA2 - Bugs?
    nudo Newbie
    Currently Being Moderated
    I was wrong, 11658397 is not fixed in EA4

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points