While you are writing and editing SQL statements in Java files in the Java editor, you can format one or all of the
SQL statements to improve their readability.
Before you begin
Ensure your project meets the following requirements:
- The Java project that contains
the Java file that you are editing
must have pureQuery support enabled.
- The SQL statements that you want to format must have pureQuery
annotation.
About this task
If a file that contains SQL statements is not open in
the Java editor, you can format
the .java file from the Package Explorer.
Procedure
To format SQL statements
in the Java editor:
- To format an individual SQL statement, right-click the
statement, and then select .
- To format all of the SQL statements, perform one of the
following actions:
- Right-click anywhere in the editor outside of an SQL statement,
and then select .
- With the Java editor
in focus, select .
Results
The individual SQL statement or all of the SQL statements
in the Java editor are formatted.