Cool.
It just looks like the test for the Mondrian examples brakes now for some reason.
Cheers,
Doru
On 4 Oct 2011, at 13:58, Alexandre Bergel wrote:
I just committed a new version of Mondrian.
Comment: "Added if:color: if:width: on MOLineShape"
You can now write:
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
view shape rectangle size: 10.
view nodes: (1 to: 10).
view shape line
if: [:v | v > 2 ] color: Color blue;
if: [:v | v > 2 ] width: 10.
view edgesTo: [ :v | v * 2 ]
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
By the way, would it be better to have [ :node1 :node2 | ... ] for events and if:*
selectors for lines?
where node1 and node2 are the two extremities? If only a one arg block is provided, then
only node2 is provided.
This is a wished feature for long already.
Cheers,
Alexandre
On 4 Oct 2011, at 06:43, Tudor Girba wrote:
Of course it is possible. Only if:color: is not
implemented in LineShape.
So, at the moment, you can simply use:
color: [:each | ... ifTrue: [Color blue] ifFalse: [Color lightGray ] ]
Doru
On Tue, Oct 4, 2011 at 11:34 AM, Usman Bhatti <usman.bhatti(a)gmail.com> wrote:
Hello,
We are working on the visualization of plugins in Mondrian and we are trying to create
some custom visu. Question: Is there anyway we can color a few edges in Mondrian according
to some condition? That is, we are trying to describe a condition for coloring edges
according to the plugin they target as illustrated by the bold line in the script below:
view shape rectangle
width: [:p | p outgoingFAMIXEclipsePluginImport size] ;
height: [:p | p incomingFAMIXEclipsePluginImport size] ;
if: [ p | p name includesSubString: 'uml'] fillColor: Color blue.
view nodes: (eclipsePluginGroup select: [:p | p name includesSubString:
'papyrus']).
view shape arrowedLine
if: [ :i | i target name = 'org.eclipse.papyrus.core'] fillColor: Color
red.
view edges: (MooseModel root allModels first allWithType: FAMIXEclipsePluginImport) from:
#source to: #target.
view dominanceTreeLayout .
thanx in advance,
Usman & Nicolas
_______________________________________________
Moose-dev mailing list
Moose-dev(a)iam.unibe.ch
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
--
--
www.tudorgirba.com
"Every thing has its own flow"
_______________________________________________
Moose-dev mailing list
Moose-dev(a)iam.unibe.ch
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
--
_,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
Alexandre Bergel
http://www.bergel.eu
^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
_______________________________________________
Moose-dev mailing list
Moose-dev(a)iam.unibe.ch
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
"To utilize feedback, you first have to acquire it."
_______________________________________________
Moose-dev mailing list
Moose-dev(a)iam.unibe.ch