Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 341955 - [Xtend] Support for visibility
Summary: [Xtend] Support for visibility
Status: CLOSED FIXED
Alias: None
Product: TMF
Classification: Modeling
Component: Xtext (show other bugs)
Version: 2.0.0   Edit
Hardware: PC Mac OS X - Carbon (unsup.)
: P3 enhancement (vote)
Target Milestone: SR2   Edit
Assignee: Jan Koehnlein CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 354392 (view as bug list)
Depends on:
Blocks:
 
Reported: 2011-04-05 14:52 EDT by Sven Efftinge CLA
Modified: 2017-09-19 17:35 EDT (History)
4 users (show)

See Also:
sven.efftinge: indigo+


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Sven Efftinge CLA 2011-04-05 14:52:18 EDT
Currently every Xtend function and class is public.
We should support protected and private (and maybe an explicit public) as well.
Comment 1 Sebastian Zarnekow CLA 2011-05-04 06:11:45 EDT
Preliminary scheduled for 2.0RC1
Comment 2 Sven Efftinge CLA 2011-05-04 09:59:10 EDT
postponed to SR1
Comment 3 Sven Efftinge CLA 2011-08-15 04:49:11 EDT
*** Bug 354392 has been marked as a duplicate of this bug. ***
Comment 4 Sven Efftinge CLA 2011-08-15 04:49:52 EDT
We should also have visibility for fields.
Comment 5 Jan Koehnlein CLA 2011-10-11 09:36:06 EDT
First shot pushed.

- As opposed to Java, there is no package private (default) visibility. 
- Top level classes in Java can only be public or package private, so they don't have a visibility in Xtend (generated JavaClass is public)
- XtendFields are private by default. Syntax is
  public extension String field
- Non-dispatch XtendFunctions are public by default. 
- Dispatch functions are by default protected. The synthetic dispatcher is usually public by default, except for the case when all dispatch cases have the same non-public visibility. The dispatcher has the same visibility then.
- For functions, the visibility is specified between def/override and the optional dispatch, e.g.
  override private dispatch foo()

Still missing:
- Icons for labels
- Docs
- Some validation
Comment 6 Jan Koehnlein CLA 2011-10-11 10:57:17 EDT
Added icons and validation rules, as well as tests.
Comment 7 Jan Koehnlein CLA 2011-10-11 11:39:04 EDT
Updated docs.
Comment 8 Karsten Thoms CLA 2017-09-19 17:23:42 EDT
Closing all bugs that were set to RESOLVED before Neon.0
Comment 9 Karsten Thoms CLA 2017-09-19 17:35:01 EDT
Closing all bugs that were set to RESOLVED before Neon.0