Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 424508 - [formatting] boolean expression with comparison and parenthesis won't wrap
Summary: [formatting] boolean expression with comparison and parenthesis won't wrap
Status: CLOSED DUPLICATE of bug 303519
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 4.3   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: 4.8 M5   Edit
Assignee: Mateusz Matela CLA
QA Contact:
URL:
Whiteboard: To be verified for 4.8 M5
Keywords:
Depends on:
Blocks:
 
Reported: 2013-12-19 20:19 EST by Palmer Eldritch CLA
Modified: 2018-01-20 17:12 EST (History)
1 user (show)

See Also:


Attachments
formatter profile (30.45 KB, text/xml)
2013-12-19 20:19 EST, Palmer Eldritch CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
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 ***