Bug 10979 - JDOM/add superinterface format problem
Summary: JDOM/add superinterface format problem
Status: RESOLVED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 2.0   Edit
Hardware: PC Windows XP
: P3 minor (vote)
Target Milestone: 2.0 M4   Edit
Assignee: Philipe Mulet CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-03-07 12:59 EST by Stefan Matthias Aust CLA
Modified: 2002-03-07 18:48 EST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Stefan Matthias Aust CLA 2002-03-07 12:59:28 EST
This code

 DOMFactory df = new DOMFactory();
 IDOMType t = df.createType("class A implements I1 {\n}");
 df.addSuperInterface("I2");
 System.out.println(t.getContents());

lacks a space as it prints

 class A implements I1, I2{
 }

instead of "I1, I2 {".
Comment 1 Olivier Thomann CLA 2002-03-07 18:45:17 EST
This is due to a bug in the DOMBuilder for settings the source end for interfaces names.
Fixed and 
released in HEAD. Regression tests added.
Comment 2 Olivier Thomann CLA 2002-03-07 18:48:01 EST
Note that if you write:
 DOMFactory df = new DOMFactory();
 IDOMType t = df.createType("class A implements I1{\n}");
 df.addSuperInterface("I2");
 System.out.println(t.getContents());

Then you will get:
class A implements I1, I2{
}

The right behavior is to preserve the original space between interface names and 
the beginning of the class body.