Skip to content

Commit

Permalink
Fix the link.
Browse files Browse the repository at this point in the history
The link where only checking if the component had the same interfaces, now it also check for the component name
  • Loading branch information
Nyan11 committed Dec 5, 2024
1 parent 6dfca54 commit ad5cb16
Showing 1 changed file with 18 additions and 11 deletions.
29 changes: 18 additions & 11 deletions src/Molecule-IDE/MolComponentToRoassal.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,13 @@ MolComponentToRoassal class >> canvasFromMultipleComponents: aCollectionOfCompon

dictionaryEvents := Dictionary new.
aCollectionOfComponents collect: [ :comp |
comp servicesProviders keys , comp parametersProviders keys
, comp eventsSubscribers keys do: [ :event |
comp servicesProviders associations
, comp parametersProviders associations
, comp eventsSubscribers associations do: [ :eventAndName |
dictionaryEvents
at: event
ifPresent: [ :l | l add: comp ]
ifAbsentPut: [ OrderedCollection with: comp ] ] ].
at: eventAndName key
ifPresent: [ :l | l add: eventAndName value -> comp ]
ifAbsentPut: [ OrderedCollection with: eventAndName value -> comp ] ] ].

lineBuilder := RSLineBuilder arrowedLine
canvas: canvas;
Expand All @@ -37,16 +38,22 @@ MolComponentToRoassal class >> canvasFromMultipleComponents: aCollectionOfCompon
dictionaryEvents
at: event
ifPresent: [ :allComponentsForEvent |
lineBuilder useAssociations:
(allComponentsForEvent collect: [ :compTarget |
compSource -> compTarget ]) ]
| matchingComponents |
matchingComponents := allComponentsForEvent select: [ :compTarget |
compSource componentName = compTarget key ].
matchingComponents
ifNotEmpty: [ :val |
lineBuilder useAssociations:
(val collect: [ :each | compSource -> each value ]) ]
ifEmpty: [
self flag: #TODO "No components habs the correct componentName for this contract ..." ] ]
ifAbsent: [
self flag: #TODO "No components has been found for this contract ..." ] ] ].
self flag: #TODO "No components has the event for this contract ..." ] ] ].

RSForceBasedLayout new
doNotUseProgressBar;
length: 400;
charge: -2000;
length: 3000;
charge: 1;
on: canvas nodes.

canvas @ RSCanvasController.
Expand Down

0 comments on commit ad5cb16

Please sign in to comment.