Bug 197153

Summary: Code formatter control by annotations in comments.
Product: [Eclipse Project] JDT Reporter: Nils Hammar <nils.hammar>
Component: CoreAssignee: Mateusz Matela <mateusz.matela>
Status: CLOSED DUPLICATE QA Contact:
Severity: enhancement    
Priority: P3 CC: Konstantin.Scheglov, mateusz.matela
Version: 3.3   
Target Milestone: 4.18 M3   
Hardware: All   
OS: All   
Whiteboard: To be verified for 4.18 M3

Description Nils Hammar CLA 2007-07-19 11:02:33 EDT
Build ID: I20070625-1500

Steps To Reproduce:
When coding and code formatting is used different parts of the code is sometimes better off with different formatting styles.

It would be very useful if the formatter could be given directives in comments preceding the block to format. An example is initialization of arrays where a byte array is best formatted by several items per row while a string array may be better formatted by one item per row.

Another example is the declaration of variables where a section may be better off formatted with a specific structure like String.format("%-20s %-10s %1s %-20s", "final int", "alpha", "=", "42;")


More information:
Comment 1 Mateusz Matela CLA 2020-10-12 16:12:44 EDT

*** This bug has been marked as a duplicate of bug 311582 ***