Skip to content

Commit

Permalink
fixed a bug in the linter output, and made last changes to tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Zyranix committed Jun 21, 2021
1 parent 6955bdf commit 7365acf
Show file tree
Hide file tree
Showing 122 changed files with 628 additions and 193 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
*MorphicAPIExplorer-Core
readFromFile
"This would benefit from a way to get a list of the plausible file extensions for image files"
| fileName |
fileName := UIManager default
chooseFileMatchingSuffixes: Form allTypicalFileExtensions
label: 'Please enter the image file name'.
fileName isNil ifTrue: [^ self].
fileName isEmpty ifTrue: [^ self].
self image: (Form fromFileNamed: fileName).
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"class" : {
},
"instance" : {
"readFromFile" : "PM 6/18/2021 13:38" } }
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
{
"name" : "ImageMorph" }
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,5 @@ newNamed: aName havingImage: anImageMorph havingDefaultMorph: aMorph withMethodL
image: anImageMorph;
defaultMorph: aMorph;
methodList: anOrderedCollection;
"updateMethodsWithDependencies;"
yourself
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
initialize-release
withView: aMEXExplorationView
newWithView: aMEXExplorationView

^ self new
explorationView: aMEXExplorationView;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"class" : {
"withView:" : "jb 7/24/2019 11:49" },
"newWithView:" : "PM 6/11/2021 14:57" },
"instance" : {
"copyToClipboard" : "jb 7/24/2019 11:56",
"evaluateExpression:" : "jb 7/24/2019 14:23",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
private icons
checkmarkIcon

^ (super checkmarkIcon scaledToSize: self defaultExtent)
^ (super checkmark scaledToSize: self defaultExtent)
mapColor: Color black to: Color green;
yourself
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
private icons
dependeeIcon
"© 2018 Icon8
Website: https://icons8.com
License: https://creativecomm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0TvA0NvvvrbEkMAN
Byl412kKq2qQ15pAHgBOTEojtZ356+7XR8YSj/uwFgC2OSSs/LYyFoXyGHiWDUPizBpMXUAv
QxNHLgDaqe0pZPcZ5SwL5wWA5VN9O9a+FZswZupbv3+lL+V2fWsAcA6KUEzxe5dc5wuA5fv4
NMNbuhY3Vri6056YycT72tYAoKS9gUHFdfwBGHNWl0GFg6IppWeY4SteYo8QyguPpG8nJFvc
8sUHwCcBhbvbDoAtgg+gddHGz1EWgJfl19TFdG5qhqHX8H+PJyQADp19MAA0T83YJApy00ID
MPz5Z58JEQDLw5RFNEo/N4EEUPOAnAKCsQGw/D77Teqr9YQD4PNG0X+fCRkAC5sb2LViO7nc
AbCWtarp+kl0ACzpvcIhjohhZxqoOzab++ADyKfD42cq/ogYth5R5dTh+c+EDyCf/tE3pjT2
joo8IiZk73nDvsSXnpqCD6AxIe5a5RwRo5/lsy3pHrpsw/b0Fj8PfvEbM7iLr8VHxNgynslL
qNOYmeQyMMawHd3kz4Jf/MYEuLhj7lnEL35jP8BBpcYHgJq9+lfTsLuW8QHkU4y3Pz4A1OyP
1WGfW4Bc/EvT5hlWJOMDAMwPU9LJT+OKf3IJWuHZ4pDl4YPJSW2PX3ylATg1OY2qxyU9l5LR
Uw3L1qf6B7eq5YsPAH9NID4AfAAKz5P0XHwAyKlPnI8PADnHJ6biA0AOmx3jAwDOKA4nc+AD
kHHYbt6G5Bx8ALiRKKfPQHwAyADYYohr07PxAaACYBng4cX1sAZ8ADIDwML28uMDAAZgRPA4
TZ7dwcgu3vgFtRQACxvIq9Pny25hJ/6bPk4AjBPDhX0G0d2ZC2UBYH5oP/xi8gRgDDv/jzWL
WMewbmIKsXcHorxAYmcNXUjIpOndQ174W/9yiGTj/Asa1DcmtAgUrgAAAABJRU5ErkJggg==' readStream)) scaledToSize: self defaultExtent
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
private icons
dependentIcon
"© 2018 Icon8
Website: https://icons8.com
License: https://creativecommons.org/licenses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7ZAvc1ZR+3
wAu75PIT6v9itbHuAjyHr4lWwWyrtADMU0nyCBy6TBFz/mflfxry7o/zHp0Vb4M+EQFGIclu
1eUfHakIB+mSRca8FBn7qZbzNSqqgjcL5/7C7MP/IyA/XAHCTyw2Y98MuapdnLdecELMHYcj
ebMvGH+w55mh9SDSb/EYNvvzXlCzEs9q+KYX9XDORqjA+PAGONmQ5fY/wIuQVYg8CPZaVpnj
fhDd9aeXFrjOpoXgT4NiY69rPvvoNAgzjokPrMbEMejSNtPcDiNDFB1fsDWSr26DVPBBFuku
HjDz6Bnq8wi9Yp44RmkwSC8vocwUcE9vEjr4t3B93QKS8HwgBrTb5xLnwdClpyizBa4Cd81M
tpGlMxsPnMOEU7M3M+TRoUqMPJ99gxufpCGO76rMZH/oq/mMDpYJso9LX0SA8JPSasrMgcYi
MrR09hn6E/yX8zZkyHO+ExLZt3SaNvuZVvAd/Hi672vg7ynPwfS/68Gc7x8w670Opvs3C54j
mGbsycWxK7cTtssOoBZUsUR9iyNEtAD2e33MRUcvUAvyBSiWgOUcVFP69fYiawG1ApDvAaR4
wCXyPYCQFkgLUE++B4i0wV3y9wDyPYAYD5CF/W7RCkBrqACaKqaw2TuqFRIP4t82dy6iijFs
LY5mSeLoWXP7EqrYw3bFUZIlBPKHTvQdRX6QH+893gKh0MmXQ69FsQAAAABJRU5ErkJggg==' readStream)) scaledToSize: self defaultExtent
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
{
"class" : {
"blankIcon" : "jb 7/24/2019 12:09",
"checkmarkIcon" : "jb 7/19/2019 14:56",
"checkmarkIcon" : "SC 5/13/2021 12:27",
"defaultDepth" : "jb 7/24/2019 12:09",
"defaultExtent" : "jb 7/24/2019 14:23" },
"defaultExtent" : "jb 7/24/2019 14:23",
"dependeeIcon" : "SH 6/10/2021 18:26",
"dependentIcon" : "SH 6/10/2021 18:26" },
"instance" : {
} }
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
As a MEXListItemWrapper I represent an item which will be displayed in the MEXPluggableMultiSelectionTreeMorph in the MEXExplorationView. So I only have information about my layout like my label and my icon as well as the parent I have in the tree.
As a MEXMethodListItemWrapper I represent an item which will be displayed in the MEXPluggableMultiSelectionTreeMorph in the MEXExplorationView. So I only have information about my layout like my label and my icon as well as the parent I have in the tree.

The most important method I provide is the constructor to set my model, my tree parent as well as the item I get my information for layout from.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
instance creation
withCategory: aMEXMethod havingModel: aModel havingParent: aMEXMethodListItemWrapper
newWithCategory: aMEXMethod havingModel: aModel havingParent: aMEXMethodListItemWrapper

^ self new
setItem: aMEXMethod
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
accessing
contents

^ self item subItems collect: [:aSubItem |
^ self item subItems collect: [:aSubMethod |
self class
withCategory: aSubItem
newWithCategory: aSubMethod
havingModel: self model
havingParent: self]
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
accessing
getDependencies

(self item isKindOf: MEXMethod)
ifTrue: [
^ self item dependencies asOrderedCollection]
ifFalse: [
^ OrderedCollection new
]
Original file line number Diff line number Diff line change
@@ -1,8 +1,16 @@
accessing
icon

^ self item subItems notEmpty
ifTrue: [nil]
ifFalse: [self item isSelected
ifTrue: [MEXIcons checkmarkIcon]
ifFalse: [MEXIcons blankIcon]]
^ (self item isKindOf: MEXMethod)
ifFalse: [nil]
ifTrue: [self item hasSubMethods
ifTrue: [nil]
ifFalse: [
self item isActiveDependee
ifTrue: [MEXIcons dependeeIcon]
ifFalse:[
self item hasDependencies
ifTrue: [MEXIcons dependentIcon]
"ifFalse: [self item isSelected
ifTrue: [MEXIcons checkmarkIcon]"
ifFalse: [MEXIcons blankIcon]]]]"]"
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
accessing
parent: aMEXMethodListItemWrapper
parent: aMEXListItemWrapper

parent := aMEXMethodListItemWrapper
parent := aMEXListItemWrapper
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
{
"class" : {
"withCategory:havingModel:havingParent:" : "FFN 7/24/2019 15:28" },
"newWithCategory:havingModel:havingParent:" : "PM 6/11/2021 14:57" },
"instance" : {
"asString" : "FFN 5/20/2019 14:40",
"contents" : "TB 6/1/2021 17:53",
"hasContents" : "TB 6/1/2021 18:01",
"icon" : "TB 6/1/2021 18:00",
"contents" : "TB 6/21/2021 17:42",
"getDependencies" : "TB 6/21/2021 17:47",
"hasContents" : "TB 6/21/2021 17:44",
"icon" : "SC 6/21/2021 23:48",
"parent" : "FFN 5/20/2019 14:01",
"parent:" : "FFN 5/20/2019 16:10",
"parent:" : "TB 6/21/2021 17:46",
"setItem:model:parent:" : "FFN 7/24/2019 15:17" } }
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
initialize-release
withName: aString
newWithName: aString

^ self new
name: aString;
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
initialize-release
newWithName: aString havingParameters: aCollection

^ (self newWithName: aString)
parameters: aCollection asOrderedCollection;
yourself
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
initialize-release
newWithName: aString havingParameters: aCollection withDependencies: anotherCollection

^ (self newWithName: aString havingParameters: aCollection)
dependencies: anotherCollection asOrderedCollection;
yourself
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
initialize-release
newWithName: aString havingSubMethods: aCollection

^ (self newWithName: aString)
subMethods: aCollection asOrderedCollection;
yourself
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
initialize-release
newWithName: aString withDependencies: aCollection

^ (self newWithName: aString)
dependencies: aCollection asOrderedCollection;
yourself

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
accessing
dependencies: anOrderedCollection

dependencies := anOrderedCollection
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
accessing
dependencies

^ dependencies
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
accessing
hasDependencies

^ self dependencies notEmpty
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,7 @@ initialize
name: 'defaultName';
subMethods: OrderedCollection new;
parameters: OrderedCollection new;
category: MEXCategory new;
isSelected: false
dependencies: OrderedCollection new;
isSelected: false;
isActiveDependee: false;
category: MEXCategory new
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
accessing
isActiveDependee: aBoolean

isActiveDependee := aBoolean
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
accessing
isActiveDependee

^ isActiveDependee
Original file line number Diff line number Diff line change
@@ -1,16 +1,23 @@
{
"class" : {
"withName:" : "FFN 5/20/2019 15:37",
"withName:havingParameters:" : "jb 7/24/2019 12:20",
"withName:havingSubMethods:" : "jb 7/24/2019 12:21" },
"newWithName:" : "SC 6/21/2021 12:20",
"newWithName:havingParameters:" : "SC 6/21/2021 12:21",
"newWithName:havingParameters:withDependencies:" : "SC 6/21/2021 12:19",
"newWithName:havingSubMethods:" : "SC 6/21/2021 12:21",
"newWithName:withDependencies:" : "SC 6/21/2021 12:21" },
"instance" : {
"asParameterizedString" : "jb 7/24/2019 12:19",
"asString" : "jb 7/24/2019 14:22",
"category" : "PC 6/10/2021 11:39",
"category:" : "PC 6/10/2021 11:39",
"dependencies" : "SC 5/13/2021 10:42",
"dependencies:" : "SC 5/13/2021 11:46",
"hasDependencies" : "SC 5/13/2021 11:42",
"hasParameters" : "lk 6/21/2019 18:19",
"hasSubMethods" : "FFN 5/20/2019 15:26",
"initialize" : "PC 6/10/2021 11:39",
"initialize" : "PM 5/19/2021 18:22",
"isActiveDependee" : "SC 6/2/2021 21:35",
"isActiveDependee:" : "SC 6/2/2021 21:34",
"isSelected" : "FFN 5/20/2019 16:09",
"isSelected:" : "FFN 6/19/2019 16:22",
"name" : "FFN 6/5/2019 22:53",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
"name",
"subMethods",
"parameters",
"dependencies",
"isActiveDependee",
"category" ],
"name" : "MEXMethod",
"pools" : [
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
I'm the actual morph that will be displayed for the tree. Also you can select multiple items instead of a single selection in my superclass which are items contained in ListItemWrappers.
I'm the actual morph that will be displayed for the tree. Also you can select multiple items instead of a single selection in my superclass which are items contained in ListItemWrappers, and I can highlight items depending which of my nodes is currently hovered on.

When the user selects a method I give a new list of selected methods to the MEXToolExplorationView by using #listSelectionFor:with:.

My most important methods are ones to draw the tree with its selection correctly. The handling of events (mouseDown, mouseUp) and the actual selection of methods are also significant.
My most important methods are ones to draw the tree with its selection correctly. The handling of events (mouseDown, mouseUp, hoveredMorph) and the actual selection of methods are also significant.

I inherit from PluggableTreeMorph but only implement the most needed functionality to display and select multiple items. Any other method will throw a MEXUnsupportedError.
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
accessing
basicRelatedMorphs: anOrderedCollection

relatedMorphs := anOrderedCollection
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
drawing
drawHoverOn: aCanvas

self relatedMorphs do: [:aMorph |
aCanvas
transformBy: self scroller transform
clippingTo: self scroller innerBounds
during: [:theCanvas | aMorph drawHoverOn: theCanvas]].

super drawHoverOn: aCanvas
Loading

0 comments on commit 7365acf

Please sign in to comment.