Bug 10979

Summary: JDOM/add superinterface format problem
Product: [Eclipse Project] JDT Reporter: Stefan Matthias Aust <sma>
Component: CoreAssignee: Philipe Mulet <philippe_mulet>
Status: RESOLVED FIXED QA Contact:
Severity: minor    
Priority: P3    
Version: 2.0   
Target Milestone: 2.0 M4   
Hardware: PC   
OS: Windows XP   
Whiteboard:

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.