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

Bug 322889

Summary: Need new "description" model attribute
Product: [Eclipse Project] e4 Reporter: Remy Suen <remy.suen>
Component: UIAssignee: Thomas Schindl <tom.schindl>
Status: RESOLVED WONTFIX QA Contact:
Severity: normal    
Priority: P3 CC: emoffatt, susan, tom.schindl
Version: 1.0   
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard:
Bug Depends on:    
Bug Blocks: 320252, 324957    

Description Remy Suen CLA 2010-08-17 07:18:16 EDT
See bug 320252.
Comment 1 Thomas Schindl CLA 2010-09-11 18:04:55 EDT
Is this a PartDescriptor or Part-Attribute - I'm not sure yet what 320252 talks about 100%. Where in the UI can i see the attribute in action?
Comment 2 Remy Suen CLA 2010-09-11 18:13:50 EDT
(In reply to comment #1)
> Is this a PartDescriptor or Part-Attribute

I don't think it'd make sense as an attribute in MPartDescriptor personally.

> Where in the UI can i see the attribute in action?

You can't because it's not implemented yet. It's basically the "description" label you see in the top part of the 'Problems' view or the 'Search' view in 3.x.
Comment 3 Eric Moffatt CLA 2010-09-13 14:35:41 EDT
The value of this label is supplied *by* the part through some API (not sure which but we can find out). This leans away from making it an attribute in the model because its value cannot be meaningfully persisted.

We should see how it's currently done and see if there's an e4 appropriate equivalent...
Comment 4 Remy Suen CLA 2010-09-13 14:39:23 EDT
(In reply to comment #3)
> The value of this label is supplied *by* the part through some API (not sure
> which but we can find out).

Subclasses of WorkbenchPart do this by invoking the protected setContentDescription(String) method.
Comment 5 Eric Moffatt CLA 2010-09-20 13:30:20 EDT
See bug 325646 for a screencap...

Perhaps this is best handled with a transient property on MPart? We do need some place to cache the last known value because the call to 'setContentDescriptor' will be called once but needs to show up whenever that part is activated.

Note that we'll also need to have the CTF be capable of handling this field (this is the 2nd part of the ui that is covered by ViewForm in the 3.x implementation...
Comment 6 Eric Moffatt CLA 2010-09-20 13:58:21 EDT
Oops, that's a dup of bug 320252, which has more info on the rendering side of this. The comments about the model impact still seem valid though...
Comment 7 Thomas Schindl CLA 2010-09-21 09:41:53 EDT
I'm not very happy with the attribute name "description". The reason is that we might want to add a MPartDescriptor#description (e.g. to show more info about the Part to be opened in "Show View ...").

Haveing:
* MPart#description
* MPartDescriptor#description

who have a different meaning is not good. Is the value in MPart not better named summary?
Comment 8 Thomas Schindl CLA 2010-09-21 09:47:01 EDT
I've filed bug 325852 for a description attribute on MPart/MPartDescriptor with at least me the correct meaning of the a description attribute.

To implement the required feature here are my suggestions for the MPart-Attribute name:
* contentDescriptor
* summary
Comment 9 Thomas Schindl CLA 2010-10-08 10:12:12 EDT
Anyone has some feedback on this, I'm currently thinking about naming summary but native speakers might have better names
Comment 10 Remy Suen CLA 2010-10-08 10:14:22 EDT
Technically speaking, this is no longer a "hard" requirement for the compatibility layer as Eric has implemented something purely on the renderer side.
Comment 11 Thomas Schindl CLA 2010-12-18 04:01:11 EST
I'm closing this as won't fix as it looks like it is not needed anymore