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

Bug 341955

Summary: [Xtend] Support for visibility
Product: [Modeling] TMF Reporter: Sven Efftinge <sven.efftinge>
Component: XtextAssignee: Jan Koehnlein <jan>
Status: CLOSED FIXED QA Contact:
Severity: enhancement    
Priority: P3 CC: jan, mail, stefan.ocke, tmf.xtext-inbox
Version: 2.0.0Flags: sven.efftinge: indigo+
Target Milestone: SR2   
Hardware: PC   
OS: Mac OS X - Carbon (unsup.)   
Whiteboard:

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