how to use beautifier correctly?

ste

Member
hi,

I would like to have all INSERT, DELETE and UPDATE statements to be each on one line but the beautifier do the following:

DELETE FROM T10; DELETE FROM T11;

instead of:

DELETE FROM T10;
DELETE FROM T11;

I tried to fix this with the beautifier options but couldn't accomplish.
is it possibile at all?
 
I cannot reproduce this. The statements are always placed on 2 separate lines. Can you send me the complete source?
 
The original source code is:

CREATE OR REPLACE PACKAGE PCK1 AS
PROCEDURE clean_all;
END PCK1;
/

CREATE OR REPLACE PACKAGE BODY "PCK1" AS

PROCEDURE clean_all IS
BEGIN
DELETE FROM TGAS_010;
DELETE FROM TGAS_011;
END;

END; -- PCK1 BODY

the beautifier gives this:

CREATE OR REPLACE PACKAGE PCK1 AS
PROCEDURE clean_all;
END PCK1;
/

CREATE OR REPLACE PACKAGE BODY "PCK1" AS

PROCEDURE clean_all IS
BEGIN
DELETE FROM TGAS_010; DELETE FROM TGAS_011;
END;

END; -- PCK1 BODY

the rules file of the beautifier has the following values:

Version=1
RightMargin=120
Indent=3
UseTabCharacter=TRUE
TabCharacterSize=3
AlignDeclarationGroups=TRUE
AlignAssignmentGroups=TRUE
KeywordCase=1
IdentifierCase=0
UseSpecialCase=TRUE
ItemList.Format=1
ItemList.Align=TRUE
ItemList.CommaAfter=TRUE
ItemList.AtLeftMargin=FALSE
EmptyLines=1
ThenOnNewLine=TRUE
LoopOnNewLine=TRUE
DML.LeftAlignKeywords=FALSE
DML.LeftAlignItems=FALSE
DML.OnOneLineIfPossible=FALSE
DML.WhereSplitAndOr=TRUE
DML.WhereAndOrAfterExpression=FALSE
DML.WhereAndOrUnderWhere=FALSE
DML.InsertItemList.Format=2
DML.InsertItemList.Align=FALSE
DML.InsertItemList.CommaAfter=TRUE
DML.InsertItemList.AtLeftMargin=FALSE
DML.SelectItemList.Format=2
DML.SelectItemList.Align=TRUE
DML.SelectItemList.CommaAfter=TRUE
DML.SelectItemList.AtLeftMargin=FALSE
DML.UpdateItemList.Format=2
DML.UpdateItemList.Align=TRUE
DML.UpdateItemList.CommaAfter=TRUE
DML.UpdateItemList.AtLeftMargin=FALSE
ParameterDeclarationList.Format=1
ParameterDeclarationList.Align=TRUE
ParameterDeclarationList.CommaAfter=TRUE
ParameterDeclarationList.AtLeftMargin=FALSE
RecordFieldList.Format=1
RecordFieldList.Align=TRUE
RecordFieldList.CommaAfter=TRUE
RecordFieldList.AtLeftMargin=FALSE
SplitAndOr=FALSE
AndOrAfterExpression=FALSE
[SpecialCase]

The PL-SQL Developer version is 7.0.0.150.

Is this correct?
I would like a way to have the two delete on two different lines.
thanks!
 
In a Program Window, these 2 sections (the specification and body) must be on different tab pages. This is the cause of the problem. I assume you pasted the specification and body on one tab page.

If you open a file with these contents, this will already be split.

See also chapter 3 in the User's Guide.
 
Back
Top