Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 424508

Summary: [formatting] boolean expression with comparison and parenthesis won't wrap
Product: [Eclipse Project] JDT Reporter: Palmer Eldritch <the.ubik>
Component: CoreAssignee: Mateusz Matela <mateusz.matela>
Status: CLOSED DUPLICATE QA Contact:
Severity: normal    
Priority: P3 CC: mateusz.matela
Version: 4.3   
Target Milestone: 4.8 M5   
Hardware: All   
OS: All   
Whiteboard: To be verified for 4.8 M5
Attachments:
Description Flags
formatter profile none

Description Palmer Eldritch CLA 2013-12-19 20:19:06 EST
Created attachment 238508 [details]
formatter profile

I came across :

		return (context.getResources().getConfiguration().screenLayout & Configuration.SCREENLAYOUT_SIZE_MASK) >= Configuration.SCREENLAYOUT_SIZE_XLARGE;

I have all items except assignments as "wrap where necessary" - this beast won't wrap. I guess it is because it is in a return statement - but maybe something else at work here ?
Comment 1 Palmer Eldritch CLA 2013-12-20 08:01:57 EST
Nothing to do with the return statement

Removing the parenthesis makes it the int & int wrap (does not compile)
replacing the >= with || makes Configuration.SCREENLAYOUT_SIZE_XLARGE also wrap (does not compile)

So the problem is with >= and the parenthesis
Comment 2 Mateusz Matela CLA 2018-01-20 17:12:07 EST
This problem no longer occurs after the formatter redesign.
Wrapping aroung >= operator is for another feature request.

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