better rubric-glamour integration

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

better rubric-glamour integration

Tudor Girba-2
Hi,

Alain took some time and provided an enhanced integration of Rubric into Glamour. This means that now you can use all the power of Rubric from Glamour.

For example, select a class from a system parsed with VerveineJ, then open it in a Glamour Editor, and then use this code:

composer rubricText with: [ :r |
r display: [ :c | class sourceAnchor completeText ].
class methods do: [ :m | | seg | 
m sourceAnchor notNil ifTrue: [ 
seg := RubTextSegmentMorph 
from: m sourceAnchor interval first 
to: m sourceAnchor interval last + 1.
seg color: Color paleYellow.
seg icon: MooseIcons famixMethod.
seg label: 'Explore'.
seg iconBlock: [ :segment :event | m explore ].
r addTextSegment: seg ] ] ].
composer startOn: class

You get all methods in the class highlighted and you can interact with them (see the attached screenshot).

This is highly promising. For more examples, look at GLMRubricExample and its subclasses.

The next step will be to replace altogether the default text presentation with the new Rubric rendering.

Cheers,
Doru

Inline image 1


--

"Every thing has its own flow"

_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Reply | Threaded
Open this post in threaded view
|

Re: better rubric-glamour integration

Andrei Chis
Very nice :)



Cheers,
Andrei


On Sun, Aug 4, 2013 at 11:16 PM, Tudor Girba <[hidden email]> wrote:
Hi,

Alain took some time and provided an enhanced integration of Rubric into Glamour. This means that now you can use all the power of Rubric from Glamour.

For example, select a class from a system parsed with VerveineJ, then open it in a Glamour Editor, and then use this code:

composer rubricText with: [ :r |
r display: [ :c | class sourceAnchor completeText ].
class methods do: [ :m | | seg | 
m sourceAnchor notNil ifTrue: [ 
seg := RubTextSegmentMorph 
from: m sourceAnchor interval first 
to: m sourceAnchor interval last + 1.
seg color: Color paleYellow.
seg icon: MooseIcons famixMethod.
seg label: 'Explore'.
seg iconBlock: [ :segment :event | m explore ].
r addTextSegment: seg ] ] ].
composer startOn: class

You get all methods in the class highlighted and you can interact with them (see the attached screenshot).

This is highly promising. For more examples, look at GLMRubricExample and its subclasses.

The next step will be to replace altogether the default text presentation with the new Rubric rendering.

Cheers,
Doru

Inline image 1


--

"Every thing has its own flow"

_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev



_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev