From 2e5bdbb35c7ed30bfc6ff0b403e58f59f19d7eea Mon Sep 17 00:00:00 2001 From: LeoDefossez Date: Wed, 11 Mar 2026 16:51:45 +0100 Subject: [PATCH] Add color on graph display for nods with additionnal properties --- .../FamixAbstractCallGraphNode.class.st | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/Famix-CallGraphs/FamixAbstractCallGraphNode.class.st b/src/Famix-CallGraphs/FamixAbstractCallGraphNode.class.st index 9264064..99e4db2 100644 --- a/src/Famix-CallGraphs/FamixAbstractCallGraphNode.class.st +++ b/src/Famix-CallGraphs/FamixAbstractCallGraphNode.class.st @@ -100,6 +100,11 @@ FamixAbstractCallGraphNode >> initialize [ { #category : 'inspector' } FamixAbstractCallGraphNode >> inspectGraph: aBuilder [ + "Note about node colors: + - Red: Entry point + - Green: Node with additional properties + - Purple: Node that is an entry point and has additional properties + - Grey: Other" | canvas shapes | @@ -111,8 +116,11 @@ FamixAbstractCallGraphNode >> inspectGraph: aBuilder [ draggable; model: node; yourself. - + node = self ifTrue: [ box color: #red ]. + + "We want to color nodes with additional properties if this feature is available" + (node respondsTo: #additionalProperties) ifTrue: [ node additionalProperties ifNotNil: [ box color: (node = self ifTrue: [ #purple ] ifFalse: [ #green ]) ] ]. box @ (RSLabeled new text: [ :n | n realMethod printString ]) ].