Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 354392 - Xtend: Support for inheritance of (non-static) extensions
Summary: Xtend: Support for inheritance of (non-static) extensions
Status: CLOSED DUPLICATE of bug 341955
Alias: None
Product: TMF
Classification: Modeling
Component: Xtext (show other bugs)
Version: 2.0.0   Edit
Hardware: PC Windows XP
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-08-10 11:18 EDT by Stefan Ocke CLA
Modified: 2011-08-15 04:49 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Stefan Ocke CLA 2011-08-10 11:18:41 EDT
Build Identifier: 

It would be nice to have a way to inherit a (non-static) extension.

That is, if I declare some field with the "extension" keyword, I would like to use the introduced extension methods in all subclasses.
Currently, one has to define the extension again and again in the subclasses.

A possible solution could be to allow to add "extension" keyword to "getter"-Methods, that is, to methods with no parameters, that return some object.
since the method is visible to all subclasses, they could access the extension.

(otherwise, one would need to support protected fields, which seems not to be wanted...)

Reproducible: Always
Comment 1 Sven Efftinge CLA 2011-08-15 04:49:11 EDT
This should be solved by introducing visibility.

*** This bug has been marked as a duplicate of bug 341955 ***