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

Bug 364958

Summary: [Xtend] Message of quickfix to create constructors uses "wrong syntax"
Product: [Modeling] TMF Reporter: Moritz Eysholdt <moritz.eysholdt>
Component: XtextAssignee: Project Inbox <tmf.xtext-inbox>
Status: CLOSED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: sebastian.zarnekow, sven.efftinge
Version: unspecifiedFlags: sebastian.zarnekow: juno+
Target Milestone: M4   
Hardware: Macintosh   
OS: Mac OS X   
Whiteboard:

Description Moritz Eysholdt CLA 2011-11-28 09:47:41 EST
The quickfix available on the error
---
Implicit super constructor bar() is undefined for default constructor. Must define an explicit constructor
---

is named "Add constructor foo(String, String)" (for example).

It should be "Add constructor new(String, String)", since this is syntax Xtend uses.

The text that is inserted into the document is as expected.


Furthermore, "Must define an explicit constructor" is not a proper English sentence.
Comment 1 Sebastian Zarnekow CLA 2011-11-28 09:50:44 EST
(In reply to comment #0)
> Furthermore, "Must define an explicit constructor" is not a proper English
> sentence.

Since the message is the same for Java constructors, we should stick with it. What do others think about the wording?

Implicit super constructor X() is undefined for default constructor. Must define an explicit constructor
Comment 2 Sven Efftinge CLA 2011-12-01 05:41:52 EST
As we integrate that heavily with Java, we might want to find a wording which abstracts over the two different syntaxes.

How about :

"No default constructor in super type Foo. Must define an explicit constructor."
Comment 3 Sebastian Zarnekow CLA 2011-12-01 05:43:43 EST
(In reply to comment #2)
> As we integrate that heavily with Java, we might want to find a wording which
> abstracts over the two different syntaxes.

+1

> How about :
> 
> "No default constructor in super type Foo. Must define an explicit
> constructor."

We could go one step further:

class Zonk extends Foo {}

Error message:

"No default constructor in super type Foo. Zonk must define an explicit
constructor."
Comment 4 Sven Efftinge CLA 2011-12-01 12:15:35 EST
pushed to master
Comment 5 Karsten Thoms CLA 2017-09-19 18:00:47 EDT
Closing all bugs that were set to RESOLVED before Neon.0
Comment 6 Karsten Thoms CLA 2017-09-19 18:11:10 EDT
Closing all bugs that were set to RESOLVED before Neon.0