Urgent request: navigation in program window possible, even on errors in source code

Claus Pedersen

Member³
I have an urgent request.

When changing code in the program window, PLD says "Unable to perform operation due to errors in source code", if PLD can not parse the code, for instance due to missing semicolon, if without end if etc.

I got the feeling that PLS has become much more sensitive to this kind of errors. I do not recall that version 6 was this sensitive regarding syntax errors when navigating, but maybe I am wrong.

Anyway, I have the following improvement suggestion:

When PLD publishes the code contents window, the line number of the corresponding source code is saved internally for each node or leaf in the hierarchy. When PLD is unable to navigate properly due to syntax errors, the message from before is still displayed (maybe in a modified form) but now the cursor is moved to the line number that is saved for the node/leaf that was clicked.

So if I have to methods OneMethod and AnotherMethod with nodes for Parameter list, Declaration and Code section, the line number for where the corresponding code starts, would be saved internally for each node/leaf. When the user then clicks on an item in the code hierarchy, if PLD can not navigate to that specific code, an error message is shown at the bottom of the screen and PLD still navigates to the saved line number well knowing that the line number may not be valid anymore (if lines lines were added or deleted when editing) but in most cases the cursor would at least be in the proximity of the piece of code in question.

Today, when there are syntax errors, you can not navigate to anything in the code using the code hierarchy. You have to scroll back or forth or searching for a method name and then you must use breakpoints to come back to the original location in the code.

Another idea for later releases:
You could disable or user colouring/icons for those parts in the hierarchy thay becomes invalid due to syntax errors. Today, when you have 40 methods in a package, when you make a syntax error in method no. 2, only the two first methods are visible in the code hierarchy, the rest are not displayed. If they stayed displayed, but were visualy changed to indicate that something was wrong, this could be a very nice feature.

Does this make sense? :confused:
 
Update:
I have the following code in a program window:
Code:
CREATE OR REPLACE PACKAGE BODY test IS

  PROCEDURE test1 IS
  BEGIN
    NULL;
  END; /* <- Delete this semicolon ... */

  /* <- or begin typing here ...  */

  PROCEDURE test2 IS
    dummy INT;
  BEGIN
    NULL;
  END;

  PROCEDURE test3 IS
  BEGIN
    NULL;
  END;

  PROCEDURE test4 IS
  BEGIN
    NULL;
  END;
END;

In the code content pane, I can see the four methods test1..test4, navigate to them etc.
If I delete the semicolon in line 6 (END;), all the methods after test1 disappear and I can not navigate to them anymore. Also, if you begin typing PROC in line 8, (beginning of a new procedure), the rest of the package content disappears from the code content pane.

One single syntax error should not be enough to make the entire content of the code content pane disappear.

Please improve this behaviour (before the post's 8 year anniversary).
 
Back
Top