how to edit PL/SQL Beautifier

666666

Member
hello:
i have a question about PL/SQL Developer Version 7.1.1.1341
i what to format my plsql FUNCTION like this :
keywords are uppercase.
identifiers are lowercase except the name of function.
then how to edit the *.br file to achieve my aim?

for example :
before beautifier :
FUNCTION mgrname(p_empno IN emp.empno%TYPE) RETURN emp.ename%TYPE IS
RESULT emp.ename%TYPE;
i INTEGER;
BEGIN
RESULT := NULL;
i := 1;
IF p_empno IS NULL THEN
-- If empno is null, return an empty name
RESULT := NULL;
ELSE
-- Fetch the name of the manager
SELECT m.ename
INTO RESULT
FROM emp e, emp m
WHERE e.empno = p_empno
AND m.empno = e.mgr
AND d.deptno IN (10, 20, 30, 40);
END IF;
RETURN(RESULT);
EXCEPTION
WHEN no_data_found THEN
RETURN(NULL);
END;

after beautifier:

FUNCTION MGRNAME(p_empno IN emp.empno%TYPE) RETURN emp.ename%TYPE IS
RESULT emp.ename%TYPE;
i INTEGER;
BEGIN
RESULT := NULL;
i := 1;
IF p_empno IS NULL THEN
-- If empno is null, return an empty name
RESULT := NULL;
ELSE
-- Fetch the name of the manager
SELECT m.ename
INTO RESULT
FROM emp e, emp m
WHERE e.empno = p_empno
AND m.empno = e.mgr
AND d.deptno IN (10, 20, 30, 40);
END IF;
RETURN(RESULT);
EXCEPTION
WHEN no_data_found THEN
RETURN(NULL);
END;

thank you very much.
 
keywords are uppercase.
You can set the keyword case to uppercase in the beautifier rules.
identifiers are lowercase except the name of function.
You can set the identifier case to lowercase in the beautifier rules, but this will affect the function name as well. So you cannot achieve this 100%.
 
Back
Top