Skip to content

Commit

Permalink
MiAnalysis: rename to browser.
Browse files Browse the repository at this point in the history
Arrange the package.
Add a menu item.
  • Loading branch information
ClotildeToullec committed Nov 21, 2024
1 parent b47b0a4 commit d52e015
Show file tree
Hide file tree
Showing 6 changed files with 47 additions and 27 deletions.
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
Class {
#name : #MiAnalysisPresenter,
#name : #MiAnalysisBrowser,
#superclass : #MiAbstractBrowser,
#instVars : [
'currentBrowser',
'browserLayout',
'browsers',
'browsersListPresenter'
],
#category : #'MooseIDE-Analysis'
#category : #'MooseIDE-Analysis-Browser'
}

{ #category : #keymaps }
MiAnalysisPresenter class >> browserKey [
MiAnalysisBrowser class >> browserKey [

^ $a
]

{ #category : #'as yet unclassified' }
MiAnalysisPresenter class >> duplicationAnalysis [
MiAnalysisBrowser class >> duplicationAnalysis [

| duplicationTag queryBrowser duplicationBrowser |
duplicationTag := FamixTag named: 'Duplication'.
Expand All @@ -39,15 +39,35 @@ MiAnalysisPresenter class >> duplicationAnalysis [
duplicationBrowser }
]

{ #category : #'world menu' }
MiAnalysisBrowser class >> menuCommandOn: aBuilder [

<worldMenu>
<miBrowsersMenu>
^ self buildMenuItemIn: aBuilder
]

{ #category : #'world menu' }
MiAnalysisBrowser class >> menuItem [

^ #AnalysisBrowser
]

{ #category : #'world menu' }
MiAnalysisBrowser class >> menuPriority [

^ self menuMainToolsPriority + 6
]

{ #category : #'instance creation' }
MiAnalysisPresenter class >> open [
MiAnalysisBrowser class >> open [

<script>
^ super open
]

{ #category : #'instance creation' }
MiAnalysisPresenter class >> openDuplicationAnalysis [
MiAnalysisBrowser class >> openDuplicationAnalysis [

<script>
^ super open
Expand All @@ -56,19 +76,19 @@ MiAnalysisPresenter class >> openDuplicationAnalysis [
]

{ #category : #specs }
MiAnalysisPresenter class >> title [
MiAnalysisBrowser class >> title [

^ 'Moose Analysis'
]

{ #category : #specs }
MiAnalysisPresenter class >> windowSize [
MiAnalysisBrowser class >> windowSize [

^ 700 @ 500
]

{ #category : #initialization }
MiAnalysisPresenter >> addBrowserMenu [
MiAnalysisBrowser >> addBrowserMenu [

| menu |
menu := self newMenu.
Expand All @@ -81,25 +101,25 @@ MiAnalysisPresenter >> addBrowserMenu [
]

{ #category : #adding }
MiAnalysisPresenter >> addBrowsers: aCollectionOfBrowsers [
MiAnalysisBrowser >> addBrowsers: aCollectionOfBrowsers [

aCollectionOfBrowsers do: [ :browser | self newBrowser: browser ]
]

{ #category : #accessing }
MiAnalysisPresenter >> browsers [
MiAnalysisBrowser >> browsers [

^ browsers ifNil: [ browsers := self initialBrowsers ]
]

{ #category : #testing }
MiAnalysisPresenter >> canFollowEntity: anObject [
MiAnalysisBrowser >> canFollowEntity: anObject [

^ currentBrowser canFollowEntity: anObject
]

{ #category : #layout }
MiAnalysisPresenter >> defaultLayout [
MiAnalysisBrowser >> defaultLayout [

^ SpPanedLayout newLeftToRight
positionOfSlider: 0.3;
Expand All @@ -109,7 +129,7 @@ MiAnalysisPresenter >> defaultLayout [
]

{ #category : #accessing }
MiAnalysisPresenter >> initialBrowsers [
MiAnalysisBrowser >> initialBrowsers [

| modelsBrowser tagBrowser |
modelsBrowser := MiModelsBrowser new.
Expand All @@ -122,15 +142,15 @@ MiAnalysisPresenter >> initialBrowsers [
]

{ #category : #initialization }
MiAnalysisPresenter >> initialize [
MiAnalysisBrowser >> initialize [

super initialize.

self whenDisplayDo: [ browsersListPresenter selectFirst ]
]

{ #category : #initialization }
MiAnalysisPresenter >> initializePresenters [
MiAnalysisBrowser >> initializePresenters [

super initializePresenters.

Expand All @@ -146,19 +166,19 @@ MiAnalysisPresenter >> initializePresenters [
]

{ #category : #accessing }
MiAnalysisPresenter >> miSelectedItem [
MiAnalysisBrowser >> miSelectedItem [

^ currentBrowser ifNotNil: [ currentBrowser miSelectedItem ]
]

{ #category : #accessing }
MiAnalysisPresenter >> miSelectedItemToPropagate [
MiAnalysisBrowser >> miSelectedItemToPropagate [

^ currentBrowser miSelectedItemToPropagate
]

{ #category : #initialization }
MiAnalysisPresenter >> newBrowser: aBrowser [
MiAnalysisBrowser >> newBrowser: aBrowser [

browsers ifNotEmpty: [
aBrowser receiveEntity:
Expand All @@ -170,7 +190,7 @@ MiAnalysisPresenter >> newBrowser: aBrowser [
]

{ #category : #action }
MiAnalysisPresenter >> propagateLocallyFrom: aBrowser [
MiAnalysisBrowser >> propagateLocallyFrom: aBrowser [

| target |
target := browsers after: aBrowser ifAbsent: [ ^ self ].
Expand All @@ -179,15 +199,15 @@ MiAnalysisPresenter >> propagateLocallyFrom: aBrowser [
]

{ #category : #removing }
MiAnalysisPresenter >> remove: aBrowser [
MiAnalysisBrowser >> remove: aBrowser [

browsers remove: aBrowser.
browsersListPresenter items:
(browsers collect: [ :browser | MiBrowserCardPresenter on: browser ])
]

{ #category : #initialization }
MiAnalysisPresenter >> selectedBrowserChanged: aBrowser [
MiAnalysisBrowser >> selectedBrowserChanged: aBrowser [

currentBrowser := aBrowser.

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Class {
#name : #MiAnalysisCloseBrowserCommand,
#superclass : #MiCommand,
#category : #'MooseIDE-Analysis'
#category : #'MooseIDE-Analysis-Commands'
}

{ #category : #default }
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Class {
#name : #MiAnalysisPropagateLocallyCommand,
#superclass : #MiCommand,
#category : #'MooseIDE-Analysis'
#category : #'MooseIDE-Analysis-Commands'
}

{ #category : #default }
Expand Down
2 changes: 1 addition & 1 deletion src/MooseIDE-Analysis/MiBrowserCardPresenter.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Class {
'titleLabel',
'buttons'
],
#category : #'MooseIDE-Analysis'
#category : #'MooseIDE-Analysis-Widgets'
}

{ #category : #commands }
Expand Down
2 changes: 1 addition & 1 deletion src/MooseIDE-Analysis/MiNullBrowser.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Class {
#instVars : [
'mainPresenter'
],
#category : #'MooseIDE-Analysis'
#category : #'MooseIDE-Analysis-Widgets'
}

{ #category : #testing }
Expand Down
2 changes: 1 addition & 1 deletion src/MooseIDE-Tagging/MiShortcutsCategory.extension.st
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Extension { #name : #MiShortcutsCategory }
MiShortcutsCategory >> openAnalysisBrowser [

<shortcut>
^ MiAnalysisPresenter openKeyMap
^ MiAnalysisBrowser openKeyMap
]

{ #category : #'*MooseIDE-Tagging' }
Expand Down

0 comments on commit d52e015

Please sign in to comment.