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

Bug 261029

Summary: [formatter] "package" or "import" declaration are not wrapped
Product: [Eclipse Project] JDT Reporter: Jean-Pierre Matsumoto <jpmat296>
Component: CoreAssignee: JDT Core Triaged <jdt-core-triaged>
Status: CLOSED WONTFIX QA Contact:
Severity: normal    
Priority: P3 CC: frederic_fusier
Version: 3.4.1   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard: stalebug

Description Jean-Pierre Matsumoto CLA 2009-01-14 10:36:01 EST
Build ID: M20080911-1700

Steps To Reproduce:
1. Create a class with a path longer than 80 chars.
2. Use it in another class using an automatic import (using CRTL-Space)

Result:
The import statement in only on one line and exceeds 80 chars

Expected:
The import statement should be on two lines with a carriage return just before a dot '.'

More information:
When a package name is longer than 80 chars, the JDT formatter doesn't wrap "package" or "import" declarations using it.

And if I format it myself by adding a carriage return before char 80, this change is lost after a use of "Organize Imports".
Comment 1 Eclipse Genie CLA 2020-03-03 18:48:27 EST
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet. As such, we're closing this bug.

If you have further information on the current state of the bug, please add it and reopen this bug. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

--
The automated Eclipse Genie.