-
-
Notifications
You must be signed in to change notification settings - Fork 357
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 13825. Create a new sorter for the completion engine . #17473
base: Pharo13
Are you sure you want to change the base?
Changes from 2 commits
1491600
67a907d
b542097
532184a
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
" | ||
I'm a class that do nothing in the suggestion list. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. that does nothing |
||
|
||
I return the list created from the compltion engine. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. completion engine |
||
|
||
This class is created to pass the test. | ||
" | ||
Class { | ||
#name : 'NoSorter', | ||
#superclass : 'CompletionSorter', | ||
#category : 'NECompletion-Sorting', | ||
#package : 'NECompletion', | ||
#tag : 'Sorting' | ||
} | ||
|
||
{ #category : 'sorting' } | ||
NoSorter >> sortCompletionList: anOrderedCollection [ | ||
|
||
^ anOrderedCollection | ||
] |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
" | ||
I'm a class that do sorting based on the size of the context itself. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. does sorting |
||
|
||
I return a list sorted by size. | ||
|
||
|
||
" | ||
Class { | ||
#name : 'SizeSorter', | ||
#superclass : 'CompletionSorter', | ||
#category : 'NECompletion-Sorting', | ||
#package : 'NECompletion', | ||
#tag : 'Sorting' | ||
} | ||
|
||
{ #category : 'sorting' } | ||
SizeSorter >> sortCompletionList: anOrderedCollection [ | ||
|
||
^ anOrderedCollection sort: [ :a :b | a contents size < b contents size ] | ||
] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please tab!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it's already tabed in my image ... , i don't know why it's like this here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@omarabedelkader Because you used 4 spaces instead of 1 tab
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
right !
i think now it's fixed.