From 4337342588e4185a08d1c9e339171538c1f68a65 Mon Sep 17 00:00:00 2001 From: badetitou Date: Mon, 6 Apr 2020 10:57:52 +0200 Subject: [PATCH] add orderedChildren ^ self children asOrderedCollection sort: #startPos ascending --- src/FAST-Core-Model-Extension/FASTEntity.extension.st | 5 +---- .../FASTEntitySourceAnchor.extension.st | 5 +++++ 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/FAST-Core-Model-Extension/FASTEntity.extension.st b/src/FAST-Core-Model-Extension/FASTEntity.extension.st index 81d45d1..230c1bd 100644 --- a/src/FAST-Core-Model-Extension/FASTEntity.extension.st +++ b/src/FAST-Core-Model-Extension/FASTEntity.extension.st @@ -16,10 +16,7 @@ FASTEntity >> containers [ { #category : #'*FAST-Core-Model-Extension' } FASTEntity >> currentParentSelector [ - | res | - res := Set new. - self parentSelectors do: [ :accessor | - (self perform: accessor) ifNotNil: [ :r | ^ accessor ] ]. + self parentSelectors do: [ :accessor | (self perform: accessor) ifNotNil: [ :r | ^ accessor ] ]. ^ nil ] diff --git a/src/FAST-Core-Model-Extension/FASTEntitySourceAnchor.extension.st b/src/FAST-Core-Model-Extension/FASTEntitySourceAnchor.extension.st index 9444e5a..bfbbf5b 100644 --- a/src/FAST-Core-Model-Extension/FASTEntitySourceAnchor.extension.st +++ b/src/FAST-Core-Model-Extension/FASTEntitySourceAnchor.extension.st @@ -1,5 +1,10 @@ Extension { #name : #FASTEntitySourceAnchor } +{ #category : #'*FAST-Core-Model-Extension' } +FASTEntitySourceAnchor >> orderedChildren [ + ^ self children asOrderedCollection sort: #startPos ascending +] + { #category : #'*FAST-Core-Model-Extension' } FASTEntitySourceAnchor >> sourceCode [