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

Integration of 2 new visualization options #172

Merged
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
15 changes: 13 additions & 2 deletions src/Molecule-IDE/MolInterfaces.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,7 @@ Class {
'eventsProduced',
'parametersProvided',
'servicesProvided',
'implemList',
'menuList'
'implemList'
],
#category : #'Molecule-IDE-Tools'
}
Expand Down Expand Up @@ -123,6 +122,16 @@ MolInterfaces >> applyFilter [
offeredList applyFilter: offeredListFilter ]
]

{ #category : #initialization }
MolInterfaces >> browseLastSelectedElement [
"the Browse button always browses the last selected Trait, no matter in which list it is. However, selecting an element in a list, selecting another element in the other list then selecting again the first element opens the one in the other list since the selection of the first list isn't emptied. This method is here to remedy to this problem"

"see https://github.com/OpenSmock/Molecule/pull/168#issuecomment-2020688480"

requiredList whenSelectionChangedDo: [ offeredList selectItem: nil ].
offeredList whenSelectionChangedDo: [ requiredList selectItem: nil ]
]

{ #category : #initialization }
MolInterfaces >> buttonBrowseAction [
"an implementation needs to be selected in order to browse it. The last selected one (for both lists) being the one browsed"
Expand All @@ -137,6 +146,8 @@ MolInterfaces >> connectPresenters [
"enables the Browse button if a Type is selected, disables it if another mode is chosen since the lists are reset and the selection could point to nothing in particular"

dropList whenSelectionChangedDo: [ buttonBrowse disable ].

self browseLastSelectedElement.

self enableBrowseButton: requiredList.
self enableBrowseButton: offeredList
Expand Down
Loading