Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Speed up a few browsers #983

Merged
merged 2 commits into from
Jan 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/MooseIDE-Core/MiAbstractVisualizationBrowser.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ MiAbstractVisualizationBrowser >> miSelectedItem [

^ mainPresenter miSelectedItem ifEmpty: [
specModel ifNil: [ ^ #( ) ].
specModel entities mooseInterestingEntity ]
specModel entities ]
]

{ #category : #actions }
Expand Down
2 changes: 1 addition & 1 deletion src/MooseIDE-Famix/MiUMLBrowser.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ MiUMLBrowser >> initializePresenters [
{ #category : #accessing }
MiUMLBrowser >> miSelectedItem [

^ (specModel selected ifNil: [ specModel entities ]) mooseInterestingEntity
^ specModel selected ifNil: [ specModel entities ]
]

{ #category : #accessing }
Expand Down
3 changes: 2 additions & 1 deletion src/MooseIDE-NewTools/MiAbstractBrowser.extension.st
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ Extension { #name : #MiAbstractBrowser }

{ #category : #'*MooseIDE-NewTools' }
MiAbstractBrowser >> miInspect [
"For the inspector we try to have a specialized moose entity to provide the most useful information."

self inspector inspect: self miSelectedItem forBuses: buses
self inspector inspect: self miSelectedItem mooseInterestingEntity forBuses: buses
]
7 changes: 1 addition & 6 deletions src/MooseIDE-QueriesBrowser/MiQueriesBrowser.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -195,12 +195,7 @@ MiQueriesBrowser >> itemsFor: aClass [
{ #category : #accessing }
MiQueriesBrowser >> miSelectedItem [

| selected |
selected := queryResultTreePresenter miSelectedItem
ifEmpty: [ selectedQuery result ]
ifNotEmpty: [ :items | items ].

^ selected mooseInterestingEntity
^ queryResultTreePresenter miSelectedItem ifEmpty: [ selectedQuery result ] ifNotEmpty: [ :items | items ]
]

{ #category : #accessing }
Expand Down
3 changes: 2 additions & 1 deletion src/MooseIDE-Tests/MiUMLBrowserTest.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -33,5 +33,6 @@ MiUMLBrowserTest >> testMiSelectedItem [
entityToSelect := FamixStClass named: 'TestClass'.
browser followEntity: entityToSelect.

self assert: browser miSelectedItem equals: entityToSelect
self assert: browser miSelectedItem size equals: 1.
self assert: browser miSelectedItem anyOne equals: entityToSelect
]
3 changes: 1 addition & 2 deletions src/MooseIDE-Visualization/MiAbstractVisualization.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,7 @@ MiAbstractVisualization >> initialize [
{ #category : #accessing }
MiAbstractVisualization >> miSelectedItem [

^ (self canvas selectedShapes collect: [ :shape |
self modelForShape: shape ]) mooseInterestingEntity
^ self canvas selectedShapes collect: [ :shape | self modelForShape: shape ]
]

{ #category : #'as yet unclassified' }
Expand Down