@@ -3,26 +3,41 @@ Extension { #name : #MolComponentImpl }
33{ #category : #' *Molecule-IDE' }
44MolComponentImpl >> asRSMoleculeShape [
55
6- | classNameLabel componentNameLabel contracts composite |
7- classNameLabel := RSLabel new
8- text: self className;
9- color: Color black lighter lighter;
10- italic;
11- fontSize: 14 ;
6+ | implementationLabel componentNameLabel contracts composite componentTypeLabel componentNameText |
7+
8+ componentTypeLabel := RSLabel new
9+ text: (self class componentType asString);
10+ color: Color black;
11+ bold;
12+ fontSize: 18 ;
1213 yourself .
14+
15+ " don't display the default name to have better visual identification of named components"
16+ componentNameText := self componentName = (MolUtils defaultComponentName)
17+ ifTrue: [ ' ' ]
18+ ifFalse: [ ' #' , self componentName ].
19+
1320 componentNameLabel := RSLabel new
14- text: self componentName ;
15- color: Color black;
16- fontSize: 18 ;
21+ text: componentNameText ;
22+ color: Color black lighter ;
23+ fontSize: 16 ;
1724 yourself .
1825
26+ implementationLabel := RSLabel new
27+ text: (self className);
28+ color: Color black lighter lighter;
29+ italic;
30+ fontSize: 12 ;
31+ yourself .
32+
1933 contracts := MolComponentToRoassal makeContractShapesFor: self .
2034
2135 RSVerticalLineLayout new
2236 alignCenter;
2337 on: {
38+ componentTypeLabel.
39+ implementationLabel.
2440 componentNameLabel.
25- classNameLabel.
2641 contracts }.
2742
2843 composite := RSComposite new
@@ -32,8 +47,9 @@ MolComponentImpl >> asRSMoleculeShape [
3247 withBorder;
3348 color: Color gray muchLighter;
3449 shapes: {
35- componentNameLabel.
36- classNameLabel.
50+ componentTypeLabel.
51+ implementationLabel.
52+ componentNameLabel.
3753 contracts };
3854 yourself .
3955 composite adjustToChildren.
0 commit comments