Bug 7224 - Formatting splits package names in ugly ways
Summary: Formatting splits package names in ugly ways
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 2.0   Edit
Hardware: PC Windows 2000
: P2 normal (vote)
Target Milestone: 3.0 M4   Edit
Assignee: Olivier Thomann CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 20908 25875 25896 33000 (view as bug list)
Depends on:
Blocks:
 
Reported: 2002-01-02 15:28 EST by Michael Fraenkel CLA
Modified: 2003-10-13 09:13 EDT (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Fraenkel CLA 2002-01-02 15:28:56 EST
I have noticed 2 situations where "long" package names are split across 
multiple lines producing unreadable code.

Case 1:
import a.very.long.package.name.which.exceeds.the.format.length;

Case 2:
a.very.long.package.name.which.exceeds.the.format.length aVar;
aVar =  = (a.very.long.package.name.which.exceeds.the.format.length) 
invokeMethod(a.very.long.package.name.which.exceeds.the.format.length2.class);

Both of them format to the following:

import a.
       very.
       long.
       package.
       name.
       ....

And I think you get the picture for the other case.  I don't know about you 
but splitting package names like that doesn't make for very readable code.  My 
only solution has been the lengthen my formatting line which has some other 
undesirable side effects.
Comment 1 Dirk Baeumer CLA 2002-01-08 08:03:23 EST
Moved to JDT Core.
Comment 2 Philipe Mulet CLA 2002-05-31 05:11:09 EDT
Post 2.0
Comment 3 Andreas Krüger CLA 2002-06-19 06:45:20 EDT
This is related to bug 20672.
Comment 4 Andreas Krüger CLA 2002-06-19 06:48:05 EDT
Ooops - sorry, typo, this is related to bug 20627.
Forget 20672 (does not exist while I write this).
Comment 5 Philipe Mulet CLA 2002-07-25 06:30:36 EDT
Resurrecting formatter issues in 2.1 stream.
Comment 6 Philipe Mulet CLA 2002-07-25 06:32:31 EDT
Clearing resolution
Comment 7 Olivier Thomann CLA 2002-07-30 14:11:52 EDT
*** Bug 20908 has been marked as a duplicate of this bug. ***
Comment 8 Olivier Thomann CLA 2002-11-12 09:39:29 EST
*** Bug 25896 has been marked as a duplicate of this bug. ***
Comment 9 Olivier Thomann CLA 2002-11-12 09:39:57 EST
*** Bug 25875 has been marked as a duplicate of this bug. ***
Comment 10 Olivier Thomann CLA 2003-01-15 13:23:01 EST
We need to clear 2.1 bug reports that won't be addressed before 2.1. The new 
implementation is still in the works. Therefore we cannot include it for 2.1. 
Not enough testing and we need to polish the preferences. This will be address 
for 2.2 as stated in the JDT/Core plan.
Comment 11 Olivier Thomann CLA 2003-02-25 14:43:31 EST
*** Bug 33000 has been marked as a duplicate of this bug. ***
Comment 12 Philipe Mulet CLA 2003-06-12 06:35:42 EDT
Resurrecting for 3.0
Comment 13 Philipe Mulet CLA 2003-06-13 04:36:54 EDT
Reopening
Comment 14 Olivier Thomann CLA 2003-10-03 09:44:02 EDT
This is addressed in the new formatter.
Fixed and released in HEAD.
Regression test added.
Comment 15 David Audel CLA 2003-10-13 09:13:41 EDT
Verified.