我在 Pharo 2.0 的 Glamour 浏览器中使用 Roassal 绘制了一个动态调用图。
默认情况下,不仅节点是可点击的,边缘也是可点击的。
由于我没有更多信息可显示边缘,我希望它们不可点击。如何删除“可点击性”?
这就是我从 Glamour 浏览器中绘制调用图的方式:
methodsUnderTestAsCallGraphIn: constructor
constructor roassal
painting: [ :view :testFailure |
view shape rectangle
size: 30;
fillColor: ThreeColorLinearNormalizer new.
view nodes: (tests methodsUnderTest: testFailure).
view shape arrowedLine.
view edges: (tests methodsUnderTest: testFailure) from: #yourself toAll: #outgoingCalls.
view treeLayout ];
title: 'Callgraph of methods under test'
我认为 GLMRoassalPresentation>>renderOn: 负责添加“可点击性”:
[...]
self shouldPopulateSelection ifTrue: [
aView raw allElementsDo: [:each |
each on: ROMouseClick do: [:event | self selection: each model ]] ].
[...]
我想为节点保留这种行为,而不是边缘。