Hi,
I am wondering what is the proper level at which should be addressed
composition of elements.
Imagine I want to create a diagram of UML class but I want to be able to
dynamically add and remove new lines and sections, including various
formatting (underline, italics, bold, ...) of each line separately. The
RTUMLClassBuilder (or any other builder for that matter) is not an option
since it's a one time build.
The option I see is to subclass RTShape (let's name it MyRTUmlClass) and
implement method trachelShapeFor: .
Now the issue is, that I cannot use other RTShape (Roassal) elements,
because they would have to be inserted into RTView which may not be
available at the time - is there a way around it?
So the other option is to use TRShape (Trachel) elements instead which
would be fine except I feel like I am duplicating code of roassal elements
(so for TRLabelShape I would copy RTLabel trachelShapeFor: and bend it for
my needs), and the second issue is that in updateFor:trachelShape: I would
need to access internal structure of the element and change it (because for
example a new method was added) - does that break encapsulation?
And finally, from conceptual standpoint what should be the content of
RTView elements? Because if I have diagram full of UML classes I probably
don't care about the content of them when doing layouting - so I would
prefer to have only MyRTUmlClass elements there and not every single label
inside it (as is the case of RTUmlClassBuilder), because otherwise having
access to RTView elements is useless and I must keep reference to correct
objects myself.
Thanks!
Peter
p.s.: Is it currently possible to format text? I saw only color, font and
size... what about underline/italics/bold?
Hi,
I was playing with Roassal2 in latest Moose5 and discovered Trachel, which
looks nice and compact.
Playing with the examples in the package, I found a couple of failing sends
to #scale: that worked when I replaced them by sends to #scaleBy:. If you
are interested, I attach the changes.
Bests,
Martín
Hi,
Imagine I have a package Super with a class Super and a package Sub
with a class Sub that inherits from Super.
If I create a moose model of the package Super, I get the class Sub as
a stub. I find that very surprising: why are all subclasses of the
system included in the model. The semantics of the inheritance
relation is one-way: a class knows its super class, not the opposite.
Can somebody explain why subclasses are included in the analyses?
--
Damien Cassou
http://damiencassou.seasidehosting.st
"Success is the ability to go from one failure to another without
losing enthusiasm."
Winston Churchill
Hi!
Here is a post that describe how to have dates on the X-axis.
This has been a recurrent problem, which is why I would like to share it with you.
Dates are particular values that requires an adequate control over what is being displayed on X-axis. The julianDayNumber converts a date into a number.
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
methods := RTObject withAllSubclasses flatCollect: #methods.
methods := methods reject: [ :m | m numberOfLinesOfCode > 150 ].
oldestMethod := methods minFor: #date.
b := RTCharterBuilder new.
b extent: 800 @ 200.
b shape circle size: 5; color: (Color blue alpha: 0.1).
b interaction popup.
b points: methods.
b allY: #numberOfLinesOfCode.
b allX: [ :m | m date julianDayNumber - oldestMethod date julianDayNumber ].
b axisConfiguration
noDecimals;
title: 'LOC'.
b axisY.
b axisConfiguration
title: '';
labelRotation: -30;
numberOfTicks: 10;
numberOfLabels: 10;
labelConvertion: [ :v | (Date julianDayNumber: v + oldestMethod date julianDayNumber) ].
b axisX.
b build
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Cheers,
Alexandre
--
_,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
Alexandre Bergel http://www.bergel.eu
^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
Hello,
When we print a string in Moose, we cannot select it because it is printed
"like a label", which can be then inspected.
For me it is bit strange because I used to frequently print some string and
then do something else such as browser a class, or copy a substring (which
is not possible anymore).
So, what is goal of this feature? Maybe I just didn't see it.
thanks!
--
Andre Hora
Hello,
Any problem if I change the implementation of
---
FAMIXFileAnchor>>rootFolder
^ self mooseModel rootFolder
---
to
---
FAMIXFileAnchor>>rootFolder
self mooseModel ifNil: [ ^ '' ].
^ self mooseModel rootFolder
---
The problem is that when mooseModel is nil (ie, when working with
FAMIX-only), there will be an exception.
FAMIXFileAnchor is depending on moose.
What do you think?
best regards,
--
Andre Hora
Hi,
Using the latest improvements from Alex, I could reimplement the
Distribution Map on top of RTView.
Cheers,
Doru
--
www.tudorgirba.com
"Every thing has its own flow"