Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » Java Development Tools (JDT) » Prevent lines from unwrapping in the formatter
Prevent lines from unwrapping in the formatter [message #249871] Wed, 28 November 2007 19:22
Eclipse UserFriend
Originally posted by: markr.date.com

Does anyone know of a way to use the Java code Formatter without having it
enforce a certain line-wrapping mode? For example, our code contains many
SQL strings which are made up of constants and string literals, such as:

String sql =
" SELECT * " +
" FROM "
TABLE_A + ", " +
TABLE_B + " " +
" WHERE " + FIELD_A_A + " = " + FIELD_B_A +
" AND " + FIELD_A_B + " = ? ";

The formatter always wants to mess around with this no matter what
settings I use. What I want is for it to ignore the formatting of
expressions and instead do OTHER formatting tasks, such as converting
spaces to tabs (or vice versa) and formatting brackets.

Is there a way to disable certain parts of the formatter?

Alternate question: Is there a way to invoke only certain
micro-formattings, such as converting tabs to spaces?
Previous Topic:IJavaElement from ITextSelection
Next Topic:ASTParser on a JSP page
Goto Forum:
  


Current Time: Tue Jul 16 04:03:59 GMT 2024

Powered by FUDForum. Page generated in 0.02886 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top