Skip to content

Commit

Permalink
There was a missing return in a description accessor
Browse files Browse the repository at this point in the history
  • Loading branch information
StevenCostiou committed Oct 18, 2023
1 parent e8de07a commit 1baf6b6
Show file tree
Hide file tree
Showing 34 changed files with 289 additions and 223 deletions.
8 changes: 5 additions & 3 deletions src/Spec2-Commands/ManifestSpec2Commands.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@ Spec is a framework in Pharo for describing user interfaces. It allows for the c
I am a package whose responsibility is to define the commands that will be used by Spec.
"
Class {
#name : #ManifestSpec2Commands,
#superclass : #PackageManifest,
#category : #'Spec2-Commands-Manifest'
#name : 'ManifestSpec2Commands',
#superclass : 'PackageManifest',
#category : 'Spec2-Commands-Manifest',
#package : 'Spec2-Commands',
#tag : 'Manifest'
}
16 changes: 9 additions & 7 deletions src/Spec2-Commands/SpAcceptChangesCommand.class.st
Original file line number Diff line number Diff line change
@@ -1,27 +1,29 @@
Class {
#name : #SpAcceptChangesCommand,
#superclass : #SpToolCommand,
#category : #'Spec2-Commands-Code'
#name : 'SpAcceptChangesCommand',
#superclass : 'SpToolCommand',
#category : 'Spec2-Commands-Code',
#package : 'Spec2-Commands',
#tag : 'Code'
}

{ #category : #defaults }
{ #category : 'defaults' }
SpAcceptChangesCommand class >> defaultIconName [
^#smallOk
]

{ #category : #defaults }
{ #category : 'defaults' }
SpAcceptChangesCommand class >> defaultName [

^ 'Accept'
]

{ #category : #defaults }
{ #category : 'defaults' }
SpAcceptChangesCommand class >> defaultShortcutKey [

^ $s command mac | $s ctrl win | $s ctrl unix
]

{ #category : #execution }
{ #category : 'execution' }
SpAcceptChangesCommand >> execute [

self context triggerSubmitAction
Expand Down
20 changes: 11 additions & 9 deletions src/Spec2-Commands/SpBrowseClassCommand.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -3,46 +3,48 @@ I browse a class that is returned from the evaluation of my context.
My context must be a block that returns a class.
"
Class {
#name : #SpBrowseClassCommand,
#superclass : #SpSystemSelectionCommand,
#name : 'SpBrowseClassCommand',
#superclass : 'SpSystemSelectionCommand',
#instVars : [
'selector'
],
#category : #'Spec2-Commands-Navigation'
#category : 'Spec2-Commands-Navigation',
#package : 'Spec2-Commands',
#tag : 'Navigation'
}

{ #category : #default }
{ #category : 'default' }
SpBrowseClassCommand class >> defaultDescription [
^ 'Browse the selected class'
]

{ #category : #default }
{ #category : 'default' }
SpBrowseClassCommand class >> defaultShortcutKey [

^ $b command mac
| $b control win
| $b control unix
]

{ #category : #default }
{ #category : 'default' }
SpBrowseClassCommand class >> shortName [

^ 'full class'
]

{ #category : #execution }
{ #category : 'execution' }
SpBrowseClassCommand >> execute [

self context perform: self selector
]

{ #category : #accessing }
{ #category : 'accessing' }
SpBrowseClassCommand >> selector [

^ selector ifNil: [ #doBrowseClass ]
]

{ #category : #accessing }
{ #category : 'accessing' }
SpBrowseClassCommand >> selector: aSelector [

selector := aSelector
Expand Down
14 changes: 8 additions & 6 deletions src/Spec2-Commands/SpBrowseClassHierarchyCommand.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,25 @@
My context must evaluate to a Behavior. I then browse the hierarchy of that behavior.
"
Class {
#name : #SpBrowseClassHierarchyCommand,
#superclass : #SpSystemSelectionCommand,
#category : #'Spec2-Commands-Navigation'
#name : 'SpBrowseClassHierarchyCommand',
#superclass : 'SpSystemSelectionCommand',
#category : 'Spec2-Commands-Navigation',
#package : 'Spec2-Commands',
#tag : 'Navigation'
}

{ #category : #default }
{ #category : 'default' }
SpBrowseClassHierarchyCommand class >> defaultDescription [
^ 'Browse the class hierarchy of the selected class'
]

{ #category : #default }
{ #category : 'default' }
SpBrowseClassHierarchyCommand class >> shortName [

^ 'class hierarchy'
]

{ #category : #executing }
{ #category : 'executing' }
SpBrowseClassHierarchyCommand >> execute [

self context doBrowseHierarchy
Expand Down
14 changes: 8 additions & 6 deletions src/Spec2-Commands/SpBrowseClassReferencesCommand.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,25 @@
Browse all references to the class returned by the evaluation of the context.
"
Class {
#name : #SpBrowseClassReferencesCommand,
#superclass : #SpSystemSelectionCommand,
#category : #'Spec2-Commands-Navigation'
#name : 'SpBrowseClassReferencesCommand',
#superclass : 'SpSystemSelectionCommand',
#category : 'Spec2-Commands-Navigation',
#package : 'Spec2-Commands',
#tag : 'Navigation'
}

{ #category : #default }
{ #category : 'default' }
SpBrowseClassReferencesCommand class >> defaultDescription [
^ 'Browse all references to the receiver''s class'
]

{ #category : #default }
{ #category : 'default' }
SpBrowseClassReferencesCommand class >> shortName [

^ 'class references'
]

{ #category : #execution }
{ #category : 'execution' }
SpBrowseClassReferencesCommand >> execute [

self context doBrowseClassReferences
Expand Down
14 changes: 8 additions & 6 deletions src/Spec2-Commands/SpBrowseClassVarRefsCommand.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -3,23 +3,25 @@ My context is a class, I browse the class var refs of that class.
The system navigation is in charge of executing, and will ask the user to select a variable.
"
Class {
#name : #SpBrowseClassVarRefsCommand,
#superclass : #SpSystemNavigationCommand,
#category : #'Spec2-Commands-Navigation'
#name : 'SpBrowseClassVarRefsCommand',
#superclass : 'SpSystemNavigationCommand',
#category : 'Spec2-Commands-Navigation',
#package : 'Spec2-Commands',
#tag : 'Navigation'
}

{ #category : #default }
{ #category : 'default' }
SpBrowseClassVarRefsCommand class >> defaultDescription [
^ 'Browse the references to class variables'
]

{ #category : #default }
{ #category : 'default' }
SpBrowseClassVarRefsCommand class >> shortName [

^ 'class variables reference'
]

{ #category : #executing }
{ #category : 'executing' }
SpBrowseClassVarRefsCommand >> execute [

self systemNavigation browseClassVarRefs: self target
Expand Down
14 changes: 8 additions & 6 deletions src/Spec2-Commands/SpBrowseClassVariablesCommand.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,25 @@
My context is a class, I browse the class variables of that class.
"
Class {
#name : #SpBrowseClassVariablesCommand,
#superclass : #SpSystemNavigationCommand,
#category : #'Spec2-Commands-Navigation'
#name : 'SpBrowseClassVariablesCommand',
#superclass : 'SpSystemNavigationCommand',
#category : 'Spec2-Commands-Navigation',
#package : 'Spec2-Commands',
#tag : 'Navigation'
}

{ #category : #default }
{ #category : 'default' }
SpBrowseClassVariablesCommand class >> defaultDescription [
^ 'Browse the class variables'
]

{ #category : #default }
{ #category : 'default' }
SpBrowseClassVariablesCommand class >> shortName [

^ 'class variables'
]

{ #category : #executing }
{ #category : 'executing' }
SpBrowseClassVariablesCommand >> execute [

self systemNavigation browseClassVariables: self target
Expand Down
18 changes: 10 additions & 8 deletions src/Spec2-Commands/SpBrowseImplementorsCommand.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -2,37 +2,39 @@
Browse all implementors of the selector found in context.
"
Class {
#name : #SpBrowseImplementorsCommand,
#superclass : #SpSystemSelectionCommand,
#category : #'Spec2-Commands-Navigation'
#name : 'SpBrowseImplementorsCommand',
#superclass : 'SpSystemSelectionCommand',
#category : 'Spec2-Commands-Navigation',
#package : 'Spec2-Commands',
#tag : 'Navigation'
}

{ #category : #default }
{ #category : 'default' }
SpBrowseImplementorsCommand class >> defaultDescription [
^ 'Browse all implementors of the selected method or message'
]

{ #category : #accessing }
{ #category : 'accessing' }
SpBrowseImplementorsCommand class >> defaultName [

^ 'Implementors of it'
]

{ #category : #default }
{ #category : 'default' }
SpBrowseImplementorsCommand class >> defaultShortcutKey [

^ $m command mac
| $m control win
| $m control unix
]

{ #category : #default }
{ #category : 'default' }
SpBrowseImplementorsCommand class >> shortName [

^ 'implementors'
]

{ #category : #executing }
{ #category : 'executing' }
SpBrowseImplementorsCommand >> execute [

self context doBrowseImplementors
Expand Down
14 changes: 8 additions & 6 deletions src/Spec2-Commands/SpBrowseInstVarRefsCommand.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -3,23 +3,25 @@ My context is a class, I browse the inst var refs of that class.
The system navigation is in charge of executing, and will ask the user to select a variable.
"
Class {
#name : #SpBrowseInstVarRefsCommand,
#superclass : #SpSystemNavigationCommand,
#category : #'Spec2-Commands-Navigation'
#name : 'SpBrowseInstVarRefsCommand',
#superclass : 'SpSystemNavigationCommand',
#category : 'Spec2-Commands-Navigation',
#package : 'Spec2-Commands',
#tag : 'Navigation'
}

{ #category : #default }
{ #category : 'default' }
SpBrowseInstVarRefsCommand class >> defaultDescription [
^ 'Browse the references to instance variables'
]

{ #category : #default }
{ #category : 'default' }
SpBrowseInstVarRefsCommand class >> shortName [

^ 'instance variables reference'
]

{ #category : #executing }
{ #category : 'executing' }
SpBrowseInstVarRefsCommand >> execute [
self systemNavigation browseInstVarRefs: self target
]
14 changes: 8 additions & 6 deletions src/Spec2-Commands/SpBrowseInstancesCommand.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,25 @@
I browse all instances of the class returned by the evaluation of my context
"
Class {
#name : #SpBrowseInstancesCommand,
#superclass : #SpSystemDiscoveryCommand,
#category : #'Spec2-Commands-Navigation'
#name : 'SpBrowseInstancesCommand',
#superclass : 'SpSystemDiscoveryCommand',
#category : 'Spec2-Commands-Navigation',
#package : 'Spec2-Commands',
#tag : 'Navigation'
}

{ #category : #default }
{ #category : 'default' }
SpBrowseInstancesCommand class >> defaultDescription [
^ 'Browse all instances of the selected class'
]

{ #category : #accessing }
{ #category : 'accessing' }
SpBrowseInstancesCommand class >> shortName [

^ 'all instances'
]

{ #category : #executing }
{ #category : 'executing' }
SpBrowseInstancesCommand >> execute [

self target instanceSide inspectAllInstances
Expand Down
14 changes: 8 additions & 6 deletions src/Spec2-Commands/SpBrowseMethodInheritanceCommand.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,25 @@
I browse the inheritance of a method - my context must evaluate to a method.
"
Class {
#name : #SpBrowseMethodInheritanceCommand,
#superclass : #SpSystemNavigationCommand,
#category : #'Spec2-Commands-Navigation'
#name : 'SpBrowseMethodInheritanceCommand',
#superclass : 'SpSystemNavigationCommand',
#category : 'Spec2-Commands-Navigation',
#package : 'Spec2-Commands',
#tag : 'Navigation'
}

{ #category : #default }
{ #category : 'default' }
SpBrowseMethodInheritanceCommand class >> defaultDescription [
^ 'Browse the hierarchy implementors of the selected method'
]

{ #category : #default }
{ #category : 'default' }
SpBrowseMethodInheritanceCommand class >> shortName [

^ 'method inheritance'
]

{ #category : #executing }
{ #category : 'executing' }
SpBrowseMethodInheritanceCommand >> execute [
self systemNavigation
methodHierarchyBrowserForClass: self target methodClass
Expand Down
Loading

0 comments on commit 1baf6b6

Please sign in to comment.