Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 342775 - Support EL in IMasterDetailsTreeNodeDef.ImagePath
Summary: Support EL in IMasterDetailsTreeNodeDef.ImagePath
Status: CLOSED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: Sapphire (show other bugs)
Version: unspecified   Edit
Hardware: All All
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: Konstantin Komissarchik CLA
QA Contact:
URL:
Whiteboard:
Keywords: plan
Depends on:
Blocks:
 
Reported: 2011-04-13 18:17 EDT by Greg Amerson CLA
Modified: 2021-11-19 09:22 EST (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 Greg Amerson CLA 2011-04-13 18:17:13 EDT
It would be nice if there were a way to specify a Image path for a default case for a list of objects by using EL.  The idea is that for a list of objects where there may be some special condition where the image should change, like imagine you have a list of columns in a Entity element and one of those columns is the Primary key.  It would be nice to use EL to change the image path for some elements that have a particular boolean property.  ${isPrimary() ? "icons/column_primary.gif" : "icons/column.gif"}
Comment 1 Konstantin Komissarchik CLA 2011-04-20 01:46:30 EDT
Enhancement implemented. You can now use expressions pretty much any place where image specification is done in sdef. 

Added a few examples of this in the gallery and architecture samples. Added a blurb to the 0.3 what's new document.

Here is a sample expression:

<image>${ Dependencies.Size == 0 ? "images/component-leaf.png" : "images/component.png" }</image>

The most common usage is expected to be as above with image specified with a string literal path within an expression, but you can also now define custom functions via Sapphire extension system that directly return ImageDescriptor objects.
Comment 2 Greg Amerson CLA 2011-04-20 09:11:07 EDT
Just verified after installing latest hudson build.  What is nice is this also works dynamically when properies changes (very nice!).  So for me this satifies bug342777 for me since I am going to use the EL instead of an ImageProvider but I understand if you want to leave that bug open for future enhancement.
Comment 3 Konstantin Komissarchik CLA 2011-04-20 12:15:24 EDT
Closing as verified based on Comment #2.