-
Notifications
You must be signed in to change notification settings - Fork 73
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
134 additions
and
0 deletions.
There are no files selected for viewing
14 changes: 14 additions & 0 deletions
14
CoreUpdates/6856-Typo-MarkVolkmann-2024Nov25-14h09m-RMV.001.cs.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
'From Cuis7.1 [latest update: #6770] on 25 November 2024 at 2:14:34 pm'! | ||
Smalltalk renameClassNamed: #AddAsSubclassResponsabilityApplier as: #AddAsSubclassResponsibilityApplier! | ||
|
||
!Browser methodsFor: 'refactorings' stamp: 'RMV 11/25/2024 14:11:05'! | ||
addAsSubclassResponsibilitySelector | ||
|
||
self selectedMessageName ifNotNil: [ :selectedSelector | | ||
(AddAsSubclassResponsibilityApplier | ||
on: self for: self selectedClassOrMetaClass>>selectedSelector) | ||
value ].! ! | ||
|
||
!methodRemoval: Browser #addAsSubclassResponsabilitySelector stamp: 'RMV 11/25/2024 14:12:14'! | ||
Browser removeSelector: #addAsSubclassResponsabilitySelector! | ||
|
120 changes: 120 additions & 0 deletions
120
CoreUpdates/6857-Typo-JuanVuletich-2024Nov26-11h47m-jmv.001.cs.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,120 @@ | ||
'From Cuis7.1 [latest update: #6857] on 26 November 2024 at 11:54:50 am'! | ||
Smalltalk renameClassNamed: #AddAsSubclassResponsability as: #AddAsSubclassResponsibility! | ||
|
||
!BrowserWindow methodsFor: 'menu & kbd shortcuts' stamp: 'jmv 11/26/2024 11:51:21'! | ||
messageListMenuSpec | ||
"Spec for the menu and shortcut keys for the messages list. | ||
See coment at Morph >> #getMenu | ||
" | ||
^#( | ||
#(0 'Message List' false) | ||
#(10 'Browse Full (b)' $b window browseMethodFull editFindReplaceIcon) | ||
#(20 'Browse Hierarchy (h)' $h window browseHierarchy goTopIcon) | ||
#(30 'Browse Method (O)' $O window openSingleMessageBrowser scriptIcon) | ||
#(35 'Browse Package (p)' $p window browsePackage packageIcon) | ||
#(40 '-----') | ||
#(50 'File Out' nil model fileOutMessage fileOutIcon) | ||
#(60 'Run Test (t)' $t model runMethodTest weatherFewCloudsIcon) | ||
#(70 'Debug Test (r)' $r model debugMethodTest weatherFewCloudsIcon) | ||
#(80 'Inspect CompiledMethod' nil model inspectCompiledMethod exploreIcon) | ||
#(90 '-----') | ||
#(100 'Refactorings' nil nil 1000 listAddIcon) | ||
#(110 'Senders of... (n)' nil window browseSendersOfMessages mailForwardIcon) | ||
#(120 'Implementors of... (m)' nil window browseImplementorsOfMessages developmentIcon) | ||
#(130 'Inheritance (i)' $i window methodInheritance goDownIcon) | ||
#(140 'Versions (v)' $v window browseVersions clockIcon) | ||
#(150 '-----') | ||
#(160 'Remove Method (x)' $x model removeMessage deleteIcon) | ||
#(170 'Remove Method in Hierarchy' nil model removeMessageInHierarchy deleteIcon) | ||
#(180 'more...' nil nil 2000 listAddIcon) | ||
"Shortcut only. No menu entry." | ||
#(991 nil $m window browseImplementors) | ||
#(992 nil $n window browseSenders) | ||
#(993 nil $c model copySelector) | ||
" 'refactorings' SubMenu" | ||
#(1010 'Rename... (R)' $R model renameSelector saveAsIcon) | ||
#(1020 'Change keyword Order...' nil model changeKeywordOrder sendReceiveIcon) | ||
#(1030 'Add Parameter... (A)' $A model addParameter listAddIcon) | ||
#(1040 'Remove Parameter... (S)' $S model removeParameter listRemoveIcon) | ||
#(1050 '-----') | ||
#(1060 'Inline Method... (F)' $F model inlineMethod saveAsIcon) | ||
#(1070 'Move to instance/class Method' nil model moveToInstanceOrClassMethod changesIcon) | ||
#(1080 'Push Up' nil model pushUpSelector goTopIcon) | ||
#(1090 'Add in Superclass as subclassResponsibility' nil model addAsSubclassResponsibilitySelector goTopIcon) | ||
#(1100 'Push down to subclasses' nil model pushDownSelectorToSubclasses goBottomIcon) | ||
#(1110 'Push down to one subclass' nil model pushDownSelectorToOneSubclass goBottomIcon) | ||
" 'more' SubMenu" | ||
#(2010 'Local Senders of...' nil window browseLocalSendersOfMessages mailForwardIcon) | ||
#(2020 'Local Implementors of...' nil window browseLocalImplementorsOfMessages classIcon) | ||
#(2030 '-----') | ||
#(2040 'Sample Instance' nil window makeSampleInstance instanceIcon) | ||
#(2050 'Inspect Instances' nil window inspectInstances inspectIcon) | ||
#(2060 'Inspect Subinstances' nil window inspectSubInstances inspectIcon) | ||
#(2070 '-----') | ||
#(2080 'Change Category...' nil model changeCategory saveAsIcon) | ||
#(2090 'Select method Category (C)' $C model showHomeCategory editFindReplaceIcon) | ||
#(2100 'Change sets with this Method' nil window findMethodInChangeSets changesIcon) | ||
#(2110 'Revert to previous Version' nil model revertToPreviousVersion undoIcon) | ||
)! ! | ||
!Editor methodsFor: 'typing/selecting keys' stamp: 'jmv 11/26/2024 11:54:17'! | ||
normalCharacter: aKeyboardEvent | ||
"A nonspecial character is to be added to the stream of characters." | ||
| character i replacement | | ||
"Ignore keystrokes that could be keyboard shortcuts, even if not defined as such." | ||
((aKeyboardEvent keyValue between: 32 and: 126) and: [ aKeyboardEvent commandAltKeyPressed ]) | ||
ifTrue: [ ^true ]. | ||
"Convert strings like '\+161 ' (š) to unicode" | ||
aKeyboardEvent isSpace ifTrue: [ | string | | ||
string := self privateCurrentString. | ||
self pointIndex - 1 to: (self pointIndex - 7 max: 1) by: -1 do: [ :index | | ||
(string at: index) = $\ ifTrue: [ | key | | ||
key := string copyFrom: index + 1 to: self pointIndex - 1. | ||
(key size > 2 and: [ (key at: 1) = $+ ]) | ||
ifTrue: [ | stream number value | | ||
stream := ReadStream on: key asUppercase from: 2 to: key size. | ||
[ number := Integer readFrom: stream base: 16 ] on: Error do: [ ^ false ]. | ||
value := Character codePoint: number. | ||
self | ||
selectFrom: index to: self pointIndex - 1; | ||
replaceSelectionWith: (UnicodeString with: value). | ||
^ false ] ] ] ]. | ||
character := aKeyboardEvent keyCharacter. | ||
"Linux VMs don't automatically replace combining marks + space with ASCII, | ||
as Windows and Mac VMs do. It seems it is an app responsibility to do that in Linux." | ||
character isDiacriticalMark ifTrue: [ | ||
i := self pointIndex-1. | ||
(i > 0 and: [ (self privateCurrentString at: i) = $ ]) ifTrue: [ | ||
replacement := character caseOf: { | ||
[ `Character codePoint: 16r300` ] -> [ '`' ]. | ||
[ `Character codePoint: 16r301` ] -> [ '''' ]. | ||
[ `Character codePoint: 16r302` ] -> [ '^' ]. | ||
[ `Character codePoint: 16r303` ] -> [ '~' ]. | ||
[ `Character codePoint: 16r308` ] -> [ '"' ]. | ||
} otherwise: []. | ||
replacement notNil ifTrue: [ | ||
self selectFrom: i to: i; replaceSelectionWith: replacement. | ||
^ false ] | ||
] | ||
]. | ||
self addString: (UnicodeString with: character). | ||
^false! ! | ||
!AddAsSubclassResponsibilityApplier methodsFor: 'refactoring - creation' stamp: 'jmv 11/26/2024 11:53:48'! | ||
refactoringClass | ||
^AddAsSubclassResponsibility ! ! | ||
!AddAsSubclassResponsibilityApplier reorganize! | ||
('refactoring - creation' refactoringClass) | ||
! | ||