Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [sapphire-dev] IDiagramDecoratorDef.ShowDecorator is a function?

That sounds about right. There are two separator logical settings: (a) do you want this at all, and (b) when to show it. For problem decorator, ShowDecorator property servers purpose A while the state of validation serves purpose B. For a generic decorator (which are defined via a list), the presence of the definition in the list is purpose A and you need an additional property to serve purpose B.

 

The ShowDecorator property should go back to IDiagramNodeProblemDecoratorDef from the base type and should go back to being a boolean. Add VisibleWhen (xml binding to visible-when) function property to IDiagramImageDecoratorDef. The “VisibleWhen” terminology is what’s used for this purpose elsewhere in sdef language.

 

- Konstantin

 

 

From: sapphire-dev-bounces@xxxxxxxxxxx [mailto:sapphire-dev-bounces@xxxxxxxxxxx] On Behalf Of Shenxue Zhou
Sent: Tuesday, April 05, 2011 8:40 AM
To: Sapphire project
Subject: Re: [sapphire-dev] IDiagramDecoratorDef.ShowDecorator is a function?

 

This was introduced when I added image decorators to the nodes last week. There are two concepts here: problem decorator and image decorators. It's very common for image decorators to show up conditionally. Using task flow as an example, if an activity is designated as the default activty, we'd add an image decorator to the corresponding node. Another example is if an activity is a "train stop", we'd use another image decorator to represent that.

 

I created a base interface (IDiagramDecoratorDef) for both the image decorators and problem decorator. I may have been a little too aggressive in factoring out commons bewteen the two. Now I think about it, it doesn't make sense for problem decorator visibility to be a function. I'll move that out of the base interface.

 

Thanks,

 

Shenxue

 


From: Konstantin Komissarchik
Sent: Monday, April 04, 2011 10:49 PM
To: Sapphire project
Subject: [sapphire-dev] IDiagramDecoratorDef.ShowDecorator is a function?

Shenxue,

 

It looks like you recently changed IDiagramDecoratorDef.ShowDecorator to be a function (from a boolean). This strikes me as odd as I would expect this to be a static decision made at time of editor development. Could you describe the scenario that led to this change. Perhaps another approach would be more appropriate…

 

- Konstantin

 

PS: This change broke the corresponding area of the sdef editor.


Back to the top