Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 352542 - Feasibility check and/or rework of styles
Summary: Feasibility check and/or rework of styles
Status: CLOSED FIXED
Alias: None
Product: Graphiti
Classification: Modeling
Component: Core (show other bugs)
Version: 0.8.0   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: 0.9.0   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard: Juno M2 Theme_round_offs
Keywords:
Depends on:
Blocks: 357922
  Show dependency tree
 
Reported: 2011-07-20 04:09 EDT by Michael Wenz CLA
Modified: 2012-06-28 10:40 EDT (History)
3 users (show)

See Also:
michael.wenz: juno+


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Wenz CLA 2011-07-20 04:09:47 EDT
We should check if the way styles work today is really good or if there is room for improvement. Especially the need for setting a specific value to null before the stly value is used by the framework is questionable
Comment 1 Michael Wenz CLA 2011-07-20 04:10:52 EDT
Would like to target for Juno.

Requested by AiE (SH) and others in the community (see related Bugzillas)
Comment 2 Michael Wenz CLA 2011-07-20 04:18:51 EDT
An alternative implementation I could imagine would be not to set any default values at metamodel level (leaving null there) and defining the default in the framework. That would ease the use of themes and probably would make it clearer for the user of themes what he needs to do.
Comment 3 Michael Keppler CLA 2011-07-21 03:50:48 EDT
Your last suggestion sounds most reasonable for me. That way the "visual appearance" for objects created by the factory methods would be the same as of today, but the users won't be confused by style attributes set during creation which may collide with their own styles.
Comment 4 Filippo Rossoni CLA 2011-07-27 07:28:44 EDT
you can create a fallback style to use if style is null
and not set any valaue in metamodel as in comment 2

or use a framework style and set only that style in metamodel
Comment 5 Michael Wenz CLA 2011-07-27 10:47:41 EDT
(In reply to comment #4)
> you can create a fallback style to use if style is null
> and not set any valaue in metamodel as in comment 2
> or use a framework style and set only that style in metamodel

That would be another idea. Thanks for the input!
But that would mean that every GA needs a style, wouldn't it?
Comment 6 Filippo Rossoni CLA 2011-07-27 10:58:59 EDT
(In reply to comment #5) 
> That would be another idea. Thanks for the input!
> But that would mean that every GA needs a style, wouldn't it?
I suppose every GA has already a style.
style is a property of GA
Comment 7 Michael Wenz CLA 2011-07-27 11:02:47 EDT
(In reply to comment #6)
> (In reply to comment #5) 
> I suppose every GA has already a style.
> style is a property of GA

It can have one. As of today for most GAs the property is simply null.
Comment 8 Filippo Rossoni CLA 2011-07-27 11:08:21 EDT
(In reply to comment #5) 
> That would be another idea. Thanks for the input!
> But that would mean that every GA needs a style, wouldn't it?
I suppose every GA has already a style.
style is a property of GA
(In reply to comment #7)
> (In reply to comment #6)
> > (In reply to comment #5) 
> > I suppose every GA has already a style.
> > style is a property of GA
> 
> It can have one. As of today for most GAs the property is simply null.

I propose to set a default style in place of multiple default value for other property
Comment 9 Filippo Rossoni CLA 2011-07-28 12:54:30 EDT
another solution is to get style from container if style is missing and set a style for diagram if possible
Comment 10 Juergen Pasch CLA 2011-09-16 07:59:07 EDT
We have had an intensive discussion about this problem.

We would not reset the default values from the metamodel, because diagrams from existing tools would have another appearance.

We decided not to implement a default style, because we found no solution how to persist it without having the necessity to build a migration tool for existing diagrams, and we found a better, more coherent solution.

Besides the old create-methods there are now corresponding createPlain-methods, which are creating "naked" graphics algorithms without style attributes, and a createPlainStyle method without default values.

Using these new methods, makes it more transparent when working with styles, and very explicit in coding, which style attributes are set.

The chapter about styles in the tutorial will be adjusted accordingly. See https://bugs.eclipse.org/bugs/show_bug.cgi?id=357922.
Comment 11 Michael Wenz CLA 2012-04-11 10:32:28 EDT
Bookkeeping: Set target release
Comment 12 Michael Wenz CLA 2012-06-28 10:40:24 EDT
Part of Graphiti 0.9.0 (Eclipse Juno)