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

Fix #1018 #1081

Merged
merged 1 commit into from
May 31, 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
11 changes: 9 additions & 2 deletions src/MooseIDE-Dependency/MiArchitecturalMapBuilder.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -346,15 +346,22 @@ MiArchitecturalMapBuilder >> nodeAnnouncer [
baseNode ifNotNil: [ ^ baseNode announcer ].
baseNode := RSComposite new
@ self popup;
@ (HGhostDraggable new color: Smalltalk ui theme caretColor);
@
(HGhostDraggable new color:
Smalltalk ui theme caretColor);
@ self menuInteraction;
@ self highlightable;
@ self highlightableLinkedShapes;
@ RSNodeOnTopWhenPositionChanged new;
@ HResizeParentWhenChildMoves new;
yourself.

baseNode when: RSMouseDoubleLeftClick do: [ :event | event shape model expandCollapse ] for: self.
baseNode
when: RSMouseDoubleLeftClick
do: [ :event |
mapModel perform: mapModel doubleClickSetting with: event shape ]
for: self.

^ baseNode announcer
]

Expand Down
44 changes: 44 additions & 0 deletions src/MooseIDE-Dependency/MiArchitecturalMapModel.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,13 @@ MiArchitecturalMapModel >> associationTypes [
^ settings getItemValue: #associationTypes
]

{ #category : #settings }
MiArchitecturalMapModel >> availableDoubleClickActions [

^ #( doubleClickExpandeCollapse: doubleClickInspect:
doubleClickPropagate: )
]

{ #category : #accessing }
MiArchitecturalMapModel >> availableLayouts [
"all available layouts:
Expand Down Expand Up @@ -192,6 +199,31 @@ MiArchitecturalMapModel >> directoriesVirtualNodes [
^ settings getItemValue: #directoriesVirtualNodes
]

{ #category : #accessing }
MiArchitecturalMapModel >> doubleClickExpandeCollapse: aShape [

aShape model expandCollapse
]

{ #category : #accessing }
MiArchitecturalMapModel >> doubleClickInspect: aShape [

MiInspectorBrowser inspect: aShape model rawModel
]

{ #category : #accessing }
MiArchitecturalMapModel >> doubleClickPropagate: aShape [

self browser buses do: [ :bus |
bus globallySelect: aShape model rawModel mooseInterestingEntity ]
]

{ #category : #'as yet unclassified' }
MiArchitecturalMapModel >> doubleClickSetting [

^ settings getItemValue: #doubleClickAction
]

{ #category : #accessing }
MiArchitecturalMapModel >> entities [

Expand Down Expand Up @@ -227,6 +259,7 @@ MiArchitecturalMapModel >> initializeSettings [
addItem: self itemMegaMorphicSize named: #megaMorphicSize;
addItem: self itemTimeoutDuration named: #timeoutDuration;
addItem: self itemDirectoriesVirtualNodes named: #directoriesVirtualNodes;
addItem: self itemDoubleClickAction named: #doubleClickAction;
yourself
]

Expand Down Expand Up @@ -263,6 +296,17 @@ They are root nodes in the map';
yourself
]

{ #category : #settings }
MiArchitecturalMapModel >> itemDoubleClickAction [

^ MiAbstractSettingItem droplistSetting
possibleValues: self availableDoubleClickActions;
setValue: #doubleClickExpandeCollapse:;
label: 'Action on double click';
help: 'You can define an action for double click on a node.';
yourself
]

{ #category : #settings }
MiArchitecturalMapModel >> itemLayout [

Expand Down