Community
Participate
Working Groups
Build ID: I20080617-2000 Steps To Reproduce: Set maximum line width to 80 characters. Set indentation size to 2 spaces. Set all braces to 'same line'. Try to format the files below: --- Sandbox.java ------------------------ import java.util.ArrayList; import java.util.HashMap; import java.util.Map; import javax.swing.JButton; import sun.text.normalizer.UnicodeMatcher; public class Sandbox { private Map<String, ArrayList<UnicodeMatcher>> m_Matchers = new HashMap<String, ArrayList<UnicodeMatcher>>(); private Map<String, ArrayList<JButton>> m_BlockButtons = new HashMap<String, ArrayList<JButton>>(); } ----------------------------------------- --- SelectionModuleWithTwoInputs.java --- abstract class AbstractSelectionModule { } public final class SelectionModuleWithTwoInputs extends AbstractSelectionModule { } ----------------------------------------- More information: The first file maybe shows a problem with formatting generics. The problem in the second file disappears, when the line is made one character longer (e.g. by substituting 'public' by 'abstract'). Possibly the attached brace is not counted when the line length is calculated.
I surely will not have enough time to fix your bug during the 3.5 development process, hence set its priority to P5. Please provide a patch if you definitely need this issue to be fixed in this version and I'll have a look at it... TIA
This problem no longer occurs after the formatter redesign. *** This bug has been marked as a duplicate of bug 303519 ***
(In reply to Mateusz Matela from comment #2) > This problem no longer occurs after the formatter redesign. > > *** This bug has been marked as a duplicate of bug 303519 *** Mateusz: Though the line wraps for SelectionModuleWithTwoInputs it does not wrap for Sandbox.java - Can you recheck this Sandbox.java?
(In reply to Manoj Palat from comment #3) > (In reply to Mateusz Matela from comment #2) > > This problem no longer occurs after the formatter redesign. > > > > *** This bug has been marked as a duplicate of bug 303519 *** > > Mateusz: Though the line wraps for SelectionModuleWithTwoInputs it does not > wrap for Sandbox.java - Can you recheck this Sandbox.java? Reopening and moving to M2 for re-checking
(In reply to Manoj Palat from comment #3) > Mateusz: Though the line wraps for SelectionModuleWithTwoInputs it does not > wrap for Sandbox.java - Can you recheck this Sandbox.java? In Sandbox.java there is nowhere to wrap with default profile, as both assignments and parameterized types have "Do not wrap" policy. Change either of those policies and lines will get wrapped.
I tried the suggestion given in comment #5 and with those options corrected, wrapping works like a charm.
Verified for 4.7 M2 with build I20160912-2000