Skip to content

Commit bd969c3

Browse files
Merge branch 'Pharo14' into Refactoring/newdriver
2 parents 7b516e7 + 15add4d commit bd969c3

File tree

5 files changed

+40
-16
lines changed

5 files changed

+40
-16
lines changed

src/BeautifulComments/ClyRichTextClassCommentEditorToolMorph.class.st

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,12 @@ ClyRichTextClassCommentEditorToolMorph >> printContext [
9494
^super printContext , ' / ', editingClass name
9595
]
9696

97+
{ #category : 'event handling' }
98+
ClyRichTextClassCommentEditorToolMorph >> reactToRubTextAreaDoubleClick: anEvent [
99+
100+
self toggleMode
101+
]
102+
97103
{ #category : 'initialization' }
98104
ClyRichTextClassCommentEditorToolMorph >> setBackgroundColor: aColor [
99105

src/Morphic-Core/BorderedMorph.class.st

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -220,6 +220,10 @@ BorderedMorph >> isTranslucentButNotTransparent [
220220
^ false
221221
]
222222

223+
{ #category : 'event handling' }
224+
BorderedMorph >> reactToRubTextAreaDoubleClick: anEvent [
225+
]
226+
223227
{ #category : 'accessing' }
224228
BorderedMorph >> useSquareCorners [
225229
self cornerStyle: #square

src/Refactoring-UI/ReGenerateAccessorsDriver.class.st

Lines changed: 23 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@ It uses the `RBGenerateEqualHashTransformation`.
77
Class {
88
#name : 'ReGenerateAccessorsDriver',
99
#superclass : 'ReGenerateMethodDriver',
10+
#instVars : [
11+
'scopeInstanceSide'
12+
],
1013
#category : 'Refactoring-UI-Drivers',
1114
#package : 'Refactoring-UI',
1215
#tag : 'Drivers'
@@ -19,16 +22,20 @@ ReGenerateAccessorsDriver class >> refactoringClass [
1922
]
2023

2124
{ #category : 'configuration' }
22-
ReGenerateAccessorsDriver >> instantiateRefactoring [
23-
24-
^ ReUpFrontPreconditionCheckingCompositeRefactoring new
25-
model: model;
26-
refactorings: (selectedVariables collect: [:each |
27-
self refactoringClass
28-
model: model
29-
instanceVariable: each
30-
class: self targetClass name ]);
31-
yourself.
25+
ReGenerateAccessorsDriver >> configureRefactoring [
26+
27+
refactoring := ReUpFrontPreconditionCheckingCompositeRefactoring new
28+
model: model;
29+
refactorings: (selectedVariables collect: [ :eachSlot | self refactoringForSlot: eachSlot ]);
30+
yourself
31+
]
32+
33+
{ #category : 'initialization' }
34+
ReGenerateAccessorsDriver >> refactoringForSlot: aSlot [
35+
36+
^ scopeInstanceSide
37+
ifFalse: [ self refactoringClass model: model classVariable: aSlot class: self targetClass name ]
38+
ifTrue: [ self refactoringClass model: model instanceVariable: aSlot class: self targetClass name ]
3239
]
3340

3441
{ #category : 'configuration' }
@@ -38,6 +45,12 @@ ReGenerateAccessorsDriver >> runRefactoring [
3845
self applyChanges
3946
]
4047

48+
{ #category : 'accessing' }
49+
ReGenerateAccessorsDriver >> scopeInstanceSide: aBoolean [
50+
51+
scopeInstanceSide := aBoolean
52+
]
53+
4154
{ #category : 'configuration' }
4255
ReGenerateAccessorsDriver >> selectedVariables: aCollection [
4356

src/Rubric/RubAbstractTextArea.class.st

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -746,6 +746,8 @@ RubAbstractTextArea >> deselect [
746746

747747
{ #category : 'event handling' }
748748
RubAbstractTextArea >> doubleClick: anEvent [
749+
750+
model interactionModel reactToRubTextAreaDoubleClick: anEvent.
749751
^ self handleEdit: [ self editor doubleClick: anEvent ]
750752
]
751753

src/SystemCommands-VariableCommands/SycGenerateVariableAccessorCommand.class.st

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,12 @@ SycGenerateVariableAccessorCommand >> defaultMenuItemName [
2222

2323
{ #category : 'execution' }
2424
SycGenerateVariableAccessorCommand >> execute [
25-
26-
(ReGenerateAccessorsDriver new
27-
targetClass: variables first definingClass;
28-
scopes: toolContext refactoringScopes;
29-
selectedVariables: (variables collect: [:each | each name ]) ) runRefactoring
30-
3125

26+
(ReGenerateAccessorsDriver new
27+
targetClass: variables first definingClass;
28+
scopes: toolContext refactoringScopes;
29+
scopeInstanceSide: variables first definingClass isInstanceSide;
30+
selectedVariables: (variables collect: [ :each | each name ])) runRefactoring
3231
]
3332

3433
{ #category : 'factory method' }

0 commit comments

Comments
 (0)