| Summary: | [Serializer] Serializer class should be extendible | ||
|---|---|---|---|
| Product: | [Modeling] TMF | Reporter: | Johan Wannheden <johan.wannheden> |
| Component: | Xtext | Assignee: | Project Inbox <tmf.xtext-inbox> |
| Status: | CLOSED FIXED | QA Contact: | |
| Severity: | enhancement | ||
| Priority: | P3 | CC: | moritz.eysholdt, sebastian.zarnekow, stephane, sven.efftinge |
| Version: | 1.0.0 | Flags: | sebastian.zarnekow:
helios+
|
| Target Milestone: | RC1 | ||
| Hardware: | PC | ||
| OS: | Mac OS X - Carbon (unsup.) | ||
| Whiteboard: | |||
|
Description
Johan Wannheden
The values are injected. You have to override the constructor anyway. This is right. However, if you want to use these private fields in your own subclass of Serializer, you must declare them again in it (and you see them twice in the debugger.) And as you mention, they must appear in the constructor signature anyway. I agree that the fields should be protected instead of private or that there should be protected getter-methods to access these fields. But there are many more classes affected by this issue. Fixed in HEAD. We should do this for other places as well if we stumble accross fields / functionality that is not accessible / customizable in subclasses if we do not do any harm to existing consumers. Johan, would you please be so kind and outline in a few words why you have the need to customize the serializer? We use our own routine to determine the initial indentation when creating the formatter stream (see SerializerUtil.java line 98 where null is used). (In reply to comment #4) > We should do this for other places as well if we stumble accross fields / > functionality that is not accessible / customizable in subclasses if we do not > do any harm to existing consumers. This is particularly true of implementations (like the Serializer in this case) that get bound by default. Closing bug which were set to RESOLVED before Eclipse Neon.0. |