Skip to content

Commit

Permalink
Renaming presenter
Browse files Browse the repository at this point in the history
  • Loading branch information
StevenCostiou committed Jan 7, 2020
1 parent 2c1fa99 commit 883eb2b
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 18 deletions.
Expand Up @@ -15,12 +15,12 @@ Class {

{ #category : #running }
ClyInstallMetaLinkPresenterTest >> presenterForMetalinkInstallation [
^ClyInstallMetaLinkPresenter onNode: node forInstallation: true
^ClyMetaLinkInstallationPresenter onNode: node forInstallation: true
]

{ #category : #running }
ClyInstallMetaLinkPresenterTest >> presenterForMetalinkUninstallation [
^ ClyInstallMetaLinkPresenter onNode: node forInstallation: false
^ ClyMetaLinkInstallationPresenter onNode: node forInstallation: false
]

{ #category : #running }
Expand Down
Expand Up @@ -25,5 +25,5 @@ ClyInstallMetaLinkCommand >> defaultMenuItemName [

{ #category : #execution }
ClyInstallMetaLinkCommand >> execute [
ClyInstallMetaLinkPresenter openInstallOnNode: sourceNode
ClyMetaLinkInstallationPresenter openInstallOnNode: sourceNode
]
@@ -1,5 +1,5 @@
Class {
#name : #ClyInstallMetaLinkPresenter,
#name : #ClyMetaLinkInstallationPresenter,
#superclass : #SpPresenter,
#instVars : [
'sourceNode',
Expand All @@ -11,7 +11,7 @@ Class {
}

{ #category : #specs }
ClyInstallMetaLinkPresenter class >> defaultSpec [
ClyMetaLinkInstallationPresenter class >> defaultSpec [
^ SpBoxLayout newVertical
add: #toolBar
expand: false
Expand All @@ -22,25 +22,25 @@ ClyInstallMetaLinkPresenter class >> defaultSpec [
]

{ #category : #'instance creation' }
ClyInstallMetaLinkPresenter class >> onNode: aSourceNode forInstallation: forInstallation [
ClyMetaLinkInstallationPresenter class >> onNode: aSourceNode forInstallation: forInstallation [
^ self basicNew
sourceNode: aSourceNode;
isForMetaLinkInstallation: forInstallation;
initialize
]

{ #category : #opening }
ClyInstallMetaLinkPresenter class >> openInstallOnNode: aSourceNode [
ClyMetaLinkInstallationPresenter class >> openInstallOnNode: aSourceNode [
(self onNode: aSourceNode forInstallation: true) openWithSpec
]

{ #category : #opening }
ClyInstallMetaLinkPresenter class >> openUninstallOnNode: aSourceNode [
ClyMetaLinkInstallationPresenter class >> openUninstallOnNode: aSourceNode [
(self onNode: aSourceNode forInstallation: false) openWithSpec
]

{ #category : #accessing }
ClyInstallMetaLinkPresenter >> allRelevantMetaLinks [
ClyMetaLinkInstallationPresenter >> allRelevantMetaLinks [
| baseLinks |
baseLinks := self isForMetaLinkInstallation
ifTrue: [ MetaLink allInstances ]
Expand All @@ -53,42 +53,42 @@ ClyInstallMetaLinkPresenter >> allRelevantMetaLinks [
]

{ #category : #initialization }
ClyInstallMetaLinkPresenter >> close [
ClyMetaLinkInstallationPresenter >> close [
self withWindowDo: #close
]

{ #category : #initialization }
ClyInstallMetaLinkPresenter >> initializePresenter [
ClyMetaLinkInstallationPresenter >> initializePresenter [
list := self newList.
list items: MetaLink allInstances.
toolBar := self newToolBar.
self toolbarButtons do: [ :button | toolBar addItem: button ]
]

{ #category : #installation }
ClyInstallMetaLinkPresenter >> installSelectedMetalink [
ClyMetaLinkInstallationPresenter >> installSelectedMetalink [
list selection selectedItem ifNotNil: [ :metalink |
sourceNode link: metalink ].
self close
]

{ #category : #testing }
ClyInstallMetaLinkPresenter >> isForMetaLinkInstallation [
ClyMetaLinkInstallationPresenter >> isForMetaLinkInstallation [
^isForMetaLinkInstallation ifNil:[isForMetaLinkInstallation := true]
]

{ #category : #accessing }
ClyInstallMetaLinkPresenter >> isForMetaLinkInstallation: anObject [
ClyMetaLinkInstallationPresenter >> isForMetaLinkInstallation: anObject [
isForMetaLinkInstallation := anObject
]

{ #category : #accessing }
ClyInstallMetaLinkPresenter >> sourceNode: anObject [
ClyMetaLinkInstallationPresenter >> sourceNode: anObject [
sourceNode := anObject
]

{ #category : #accessing }
ClyInstallMetaLinkPresenter >> toolbarButtons [
ClyMetaLinkInstallationPresenter >> toolbarButtons [
| buttons |
buttons := OrderedCollection new.
buttons add: (self isForMetaLinkInstallation
Expand Down Expand Up @@ -116,7 +116,7 @@ ClyInstallMetaLinkPresenter >> toolbarButtons [
]

{ #category : #installation }
ClyInstallMetaLinkPresenter >> uninstallSelectedMetalink [
ClyMetaLinkInstallationPresenter >> uninstallSelectedMetalink [
list selection selectedItem ifNotNil: [ :metalink |
sourceNode removeLink: metalink ].
self close
Expand Down
Expand Up @@ -27,5 +27,5 @@ ClyUninstallMetaLinkCommand >> defaultMenuItemName [

{ #category : #execution }
ClyUninstallMetaLinkCommand >> execute [
ClyInstallMetaLinkPresenter openUninstallOnNode: sourceNode
ClyMetaLinkInstallationPresenter openUninstallOnNode: sourceNode
]

0 comments on commit 883eb2b

Please sign in to comment.