CustomContext.st
author Jakub Nesveda <jakubnesveda@seznam.cz>
Wed, 19 Nov 2014 19:39:02 +0100
changeset 755 37d50424e347
parent 747 008860f4cbd4
child 761 afbac76f54d3
permissions -rw-r--r--
tests fixes - global instance of RBNamespace for creating RBClass holds old data when the global system namespace changes its state - in this case it is old real class instance Now is RBNamespace initialized for each instace of CustomContext
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
535
9eb00f310701 CustomContext a comment for selected classes
Jakub Nesveda <jakubnesveda@seznam.cz>
parents:
diff changeset
     1
"{ Package: 'jn:refactoring_custom' }"
9eb00f310701 CustomContext a comment for selected classes
Jakub Nesveda <jakubnesveda@seznam.cz>
parents:
diff changeset
     2
9eb00f310701 CustomContext a comment for selected classes
Jakub Nesveda <jakubnesveda@seznam.cz>
parents:
diff changeset
     3
Object subclass:#CustomContext
755
37d50424e347 tests fixes - global instance of RBNamespace for creating RBClass holds old data when the global system namespace changes its state - in this case it is old real class instance
Jakub Nesveda <jakubnesveda@seznam.cz>
parents: 747
diff changeset
     4
	instanceVariableNames:'model'
37d50424e347 tests fixes - global instance of RBNamespace for creating RBClass holds old data when the global system namespace changes its state - in this case it is old real class instance
Jakub Nesveda <jakubnesveda@seznam.cz>
parents: 747
diff changeset
     5
	classVariableNames:''
535
9eb00f310701 CustomContext a comment for selected classes
Jakub Nesveda <jakubnesveda@seznam.cz>
parents:
diff changeset
     6
	poolDictionaries:''
9eb00f310701 CustomContext a comment for selected classes
Jakub Nesveda <jakubnesveda@seznam.cz>
parents:
diff changeset
     7
	category:'Interface-Refactoring-Custom'
9eb00f310701 CustomContext a comment for selected classes
Jakub Nesveda <jakubnesveda@seznam.cz>
parents:
diff changeset
     8
!
9eb00f310701 CustomContext a comment for selected classes
Jakub Nesveda <jakubnesveda@seznam.cz>
parents:
diff changeset
     9
582
8788d388f801 fix broken tests due to another default code formatting
Jakub Nesveda <jakubnesveda@seznam.cz>
parents: 541
diff changeset
    10
755
37d50424e347 tests fixes - global instance of RBNamespace for creating RBClass holds old data when the global system namespace changes its state - in this case it is old real class instance
Jakub Nesveda <jakubnesveda@seznam.cz>
parents: 747
diff changeset
    11
!CustomContext class methodsFor:'instance creation'!
746
a25dc307d4e8 Make CustomContext>>selectedClasses always return a collection of RBClass...
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 718
diff changeset
    12
755
37d50424e347 tests fixes - global instance of RBNamespace for creating RBClass holds old data when the global system namespace changes its state - in this case it is old real class instance
Jakub Nesveda <jakubnesveda@seznam.cz>
parents: 747
diff changeset
    13
new
37d50424e347 tests fixes - global instance of RBNamespace for creating RBClass holds old data when the global system namespace changes its state - in this case it is old real class instance
Jakub Nesveda <jakubnesveda@seznam.cz>
parents: 747
diff changeset
    14
    "Returns an initialized instance"
746
a25dc307d4e8 Make CustomContext>>selectedClasses always return a collection of RBClass...
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 718
diff changeset
    15
755
37d50424e347 tests fixes - global instance of RBNamespace for creating RBClass holds old data when the global system namespace changes its state - in this case it is old real class instance
Jakub Nesveda <jakubnesveda@seznam.cz>
parents: 747
diff changeset
    16
    ^ self basicNew initialize.
746
a25dc307d4e8 Make CustomContext>>selectedClasses always return a collection of RBClass...
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 718
diff changeset
    17
755
37d50424e347 tests fixes - global instance of RBNamespace for creating RBClass holds old data when the global system namespace changes its state - in this case it is old real class instance
Jakub Nesveda <jakubnesveda@seznam.cz>
parents: 747
diff changeset
    18
    "Modified: / 19-11-2014 / 09:36:37 / Jakub Nesveda <nesvejak@fit.cvut.cz>"
746
a25dc307d4e8 Make CustomContext>>selectedClasses always return a collection of RBClass...
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 718
diff changeset
    19
! !
a25dc307d4e8 Make CustomContext>>selectedClasses always return a collection of RBClass...
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 718
diff changeset
    20
535
9eb00f310701 CustomContext a comment for selected classes
Jakub Nesveda <jakubnesveda@seznam.cz>
parents:
diff changeset
    21
!CustomContext class methodsFor:'queries'!
9eb00f310701 CustomContext a comment for selected classes
Jakub Nesveda <jakubnesveda@seznam.cz>
parents:
diff changeset
    22
9eb00f310701 CustomContext a comment for selected classes
Jakub Nesveda <jakubnesveda@seznam.cz>
parents:
diff changeset
    23
isAbstract
9eb00f310701 CustomContext a comment for selected classes
Jakub Nesveda <jakubnesveda@seznam.cz>
parents:
diff changeset
    24
    "Return if this class is an abstract class.
9eb00f310701 CustomContext a comment for selected classes
Jakub Nesveda <jakubnesveda@seznam.cz>
parents:
diff changeset
    25
     True is returned here for myself only; false for subclasses.
9eb00f310701 CustomContext a comment for selected classes
Jakub Nesveda <jakubnesveda@seznam.cz>
parents:
diff changeset
    26
     Abstract subclasses must redefine again."
9eb00f310701 CustomContext a comment for selected classes
Jakub Nesveda <jakubnesveda@seznam.cz>
parents:
diff changeset
    27
9eb00f310701 CustomContext a comment for selected classes
Jakub Nesveda <jakubnesveda@seznam.cz>
parents:
diff changeset
    28
    ^ self == CustomContext.
9eb00f310701 CustomContext a comment for selected classes
Jakub Nesveda <jakubnesveda@seznam.cz>
parents:
diff changeset
    29
! !
9eb00f310701 CustomContext a comment for selected classes
Jakub Nesveda <jakubnesveda@seznam.cz>
parents:
diff changeset
    30
755
37d50424e347 tests fixes - global instance of RBNamespace for creating RBClass holds old data when the global system namespace changes its state - in this case it is old real class instance
Jakub Nesveda <jakubnesveda@seznam.cz>
parents: 747
diff changeset
    31
!CustomContext methodsFor:'accessing'!
37d50424e347 tests fixes - global instance of RBNamespace for creating RBClass holds old data when the global system namespace changes its state - in this case it is old real class instance
Jakub Nesveda <jakubnesveda@seznam.cz>
parents: 747
diff changeset
    32
37d50424e347 tests fixes - global instance of RBNamespace for creating RBClass holds old data when the global system namespace changes its state - in this case it is old real class instance
Jakub Nesveda <jakubnesveda@seznam.cz>
parents: 747
diff changeset
    33
model
37d50424e347 tests fixes - global instance of RBNamespace for creating RBClass holds old data when the global system namespace changes its state - in this case it is old real class instance
Jakub Nesveda <jakubnesveda@seznam.cz>
parents: 747
diff changeset
    34
    "Returns a class model on we operate e.g. RBNamespace, CustomNamespace"
37d50424e347 tests fixes - global instance of RBNamespace for creating RBClass holds old data when the global system namespace changes its state - in this case it is old real class instance
Jakub Nesveda <jakubnesveda@seznam.cz>
parents: 747
diff changeset
    35
37d50424e347 tests fixes - global instance of RBNamespace for creating RBClass holds old data when the global system namespace changes its state - in this case it is old real class instance
Jakub Nesveda <jakubnesveda@seznam.cz>
parents: 747
diff changeset
    36
    ^ model
37d50424e347 tests fixes - global instance of RBNamespace for creating RBClass holds old data when the global system namespace changes its state - in this case it is old real class instance
Jakub Nesveda <jakubnesveda@seznam.cz>
parents: 747
diff changeset
    37
37d50424e347 tests fixes - global instance of RBNamespace for creating RBClass holds old data when the global system namespace changes its state - in this case it is old real class instance
Jakub Nesveda <jakubnesveda@seznam.cz>
parents: 747
diff changeset
    38
    "Modified (comment): / 19-11-2014 / 10:00:29 / Jakub Nesveda <nesvejak@fit.cvut.cz>"
37d50424e347 tests fixes - global instance of RBNamespace for creating RBClass holds old data when the global system namespace changes its state - in this case it is old real class instance
Jakub Nesveda <jakubnesveda@seznam.cz>
parents: 747
diff changeset
    39
!
37d50424e347 tests fixes - global instance of RBNamespace for creating RBClass holds old data when the global system namespace changes its state - in this case it is old real class instance
Jakub Nesveda <jakubnesveda@seznam.cz>
parents: 747
diff changeset
    40
37d50424e347 tests fixes - global instance of RBNamespace for creating RBClass holds old data when the global system namespace changes its state - in this case it is old real class instance
Jakub Nesveda <jakubnesveda@seznam.cz>
parents: 747
diff changeset
    41
model: anRBNamespace
37d50424e347 tests fixes - global instance of RBNamespace for creating RBClass holds old data when the global system namespace changes its state - in this case it is old real class instance
Jakub Nesveda <jakubnesveda@seznam.cz>
parents: 747
diff changeset
    42
    "see model"
37d50424e347 tests fixes - global instance of RBNamespace for creating RBClass holds old data when the global system namespace changes its state - in this case it is old real class instance
Jakub Nesveda <jakubnesveda@seznam.cz>
parents: 747
diff changeset
    43
37d50424e347 tests fixes - global instance of RBNamespace for creating RBClass holds old data when the global system namespace changes its state - in this case it is old real class instance
Jakub Nesveda <jakubnesveda@seznam.cz>
parents: 747
diff changeset
    44
    model := anRBNamespace
37d50424e347 tests fixes - global instance of RBNamespace for creating RBClass holds old data when the global system namespace changes its state - in this case it is old real class instance
Jakub Nesveda <jakubnesveda@seznam.cz>
parents: 747
diff changeset
    45
37d50424e347 tests fixes - global instance of RBNamespace for creating RBClass holds old data when the global system namespace changes its state - in this case it is old real class instance
Jakub Nesveda <jakubnesveda@seznam.cz>
parents: 747
diff changeset
    46
    "Modified (format): / 19-11-2014 / 10:01:10 / Jakub Nesveda <nesvejak@fit.cvut.cz>"
37d50424e347 tests fixes - global instance of RBNamespace for creating RBClass holds old data when the global system namespace changes its state - in this case it is old real class instance
Jakub Nesveda <jakubnesveda@seznam.cz>
parents: 747
diff changeset
    47
! !
37d50424e347 tests fixes - global instance of RBNamespace for creating RBClass holds old data when the global system namespace changes its state - in this case it is old real class instance
Jakub Nesveda <jakubnesveda@seznam.cz>
parents: 747
diff changeset
    48
535
9eb00f310701 CustomContext a comment for selected classes
Jakub Nesveda <jakubnesveda@seznam.cz>
parents:
diff changeset
    49
!CustomContext methodsFor:'accessing-selection'!
9eb00f310701 CustomContext a comment for selected classes
Jakub Nesveda <jakubnesveda@seznam.cz>
parents:
diff changeset
    50
541
fb9cae8a5221 Add methods below to CustomContext, implement them in CustomSubContext
Jakub Nesveda <jakubnesveda@seznam.cz>
parents: 535
diff changeset
    51
selectedClassCategories
fb9cae8a5221 Add methods below to CustomContext, implement them in CustomSubContext
Jakub Nesveda <jakubnesveda@seznam.cz>
parents: 535
diff changeset
    52
    "a collection with selected class categories"
fb9cae8a5221 Add methods below to CustomContext, implement them in CustomSubContext
Jakub Nesveda <jakubnesveda@seznam.cz>
parents: 535
diff changeset
    53
fb9cae8a5221 Add methods below to CustomContext, implement them in CustomSubContext
Jakub Nesveda <jakubnesveda@seznam.cz>
parents: 535
diff changeset
    54
    self subclassResponsibility
fb9cae8a5221 Add methods below to CustomContext, implement them in CustomSubContext
Jakub Nesveda <jakubnesveda@seznam.cz>
parents: 535
diff changeset
    55
fb9cae8a5221 Add methods below to CustomContext, implement them in CustomSubContext
Jakub Nesveda <jakubnesveda@seznam.cz>
parents: 535
diff changeset
    56
    "Created: / 05-05-2014 / 00:13:34 / Jakub Nesveda <nesvejak@fit.cvut.cz>"
fb9cae8a5221 Add methods below to CustomContext, implement them in CustomSubContext
Jakub Nesveda <jakubnesveda@seznam.cz>
parents: 535
diff changeset
    57
!
fb9cae8a5221 Add methods below to CustomContext, implement them in CustomSubContext
Jakub Nesveda <jakubnesveda@seznam.cz>
parents: 535
diff changeset
    58
535
9eb00f310701 CustomContext a comment for selected classes
Jakub Nesveda <jakubnesveda@seznam.cz>
parents:
diff changeset
    59
selectedClasses
9eb00f310701 CustomContext a comment for selected classes
Jakub Nesveda <jakubnesveda@seznam.cz>
parents:
diff changeset
    60
    "a collection with selected classes"
9eb00f310701 CustomContext a comment for selected classes
Jakub Nesveda <jakubnesveda@seznam.cz>
parents:
diff changeset
    61
9eb00f310701 CustomContext a comment for selected classes
Jakub Nesveda <jakubnesveda@seznam.cz>
parents:
diff changeset
    62
    self subclassResponsibility
9eb00f310701 CustomContext a comment for selected classes
Jakub Nesveda <jakubnesveda@seznam.cz>
parents:
diff changeset
    63
9eb00f310701 CustomContext a comment for selected classes
Jakub Nesveda <jakubnesveda@seznam.cz>
parents:
diff changeset
    64
    "Created: / 26-04-2014 / 13:13:59 / Jakub Nesveda <nesvejak@fit.cvut.cz>"
9eb00f310701 CustomContext a comment for selected classes
Jakub Nesveda <jakubnesveda@seznam.cz>
parents:
diff changeset
    65
    "Modified (comment): / 26-04-2014 / 22:38:18 / Jakub Nesveda <nesvejak@fit.cvut.cz>"
541
fb9cae8a5221 Add methods below to CustomContext, implement them in CustomSubContext
Jakub Nesveda <jakubnesveda@seznam.cz>
parents: 535
diff changeset
    66
!
fb9cae8a5221 Add methods below to CustomContext, implement them in CustomSubContext
Jakub Nesveda <jakubnesveda@seznam.cz>
parents: 535
diff changeset
    67
629
e85070e8c11b add code selection object (CustomSourceCodeSelection) with code, method, class... to CustomContext
Jakub Nesveda <jakubnesveda@seznam.cz>
parents: 626
diff changeset
    68
selectedCodes
e85070e8c11b add code selection object (CustomSourceCodeSelection) with code, method, class... to CustomContext
Jakub Nesveda <jakubnesveda@seznam.cz>
parents: 626
diff changeset
    69
    "a collection with source codes (CustomSourceCodeSelection) 
e85070e8c11b add code selection object (CustomSourceCodeSelection) with code, method, class... to CustomContext
Jakub Nesveda <jakubnesveda@seznam.cz>
parents: 626
diff changeset
    70
    with selected interval (exact position in source code) and
e85070e8c11b add code selection object (CustomSourceCodeSelection) with code, method, class... to CustomContext
Jakub Nesveda <jakubnesveda@seznam.cz>
parents: 626
diff changeset
    71
    corresponding class, method, selector."
626
a32e9bcc436e work in progress on first refactoring
Jakub Nesveda <jakubnesveda@seznam.cz>
parents: 582
diff changeset
    72
a32e9bcc436e work in progress on first refactoring
Jakub Nesveda <jakubnesveda@seznam.cz>
parents: 582
diff changeset
    73
    self subclassResponsibility
a32e9bcc436e work in progress on first refactoring
Jakub Nesveda <jakubnesveda@seznam.cz>
parents: 582
diff changeset
    74
629
e85070e8c11b add code selection object (CustomSourceCodeSelection) with code, method, class... to CustomContext
Jakub Nesveda <jakubnesveda@seznam.cz>
parents: 626
diff changeset
    75
    "Created: / 18-08-2014 / 21:28:10 / Jakub Nesveda <nesvejak@fit.cvut.cz>"
626
a32e9bcc436e work in progress on first refactoring
Jakub Nesveda <jakubnesveda@seznam.cz>
parents: 582
diff changeset
    76
!
a32e9bcc436e work in progress on first refactoring
Jakub Nesveda <jakubnesveda@seznam.cz>
parents: 582
diff changeset
    77
541
fb9cae8a5221 Add methods below to CustomContext, implement them in CustomSubContext
Jakub Nesveda <jakubnesveda@seznam.cz>
parents: 535
diff changeset
    78
selectedMethods
fb9cae8a5221 Add methods below to CustomContext, implement them in CustomSubContext
Jakub Nesveda <jakubnesveda@seznam.cz>
parents: 535
diff changeset
    79
    "a collection with selected methods"
fb9cae8a5221 Add methods below to CustomContext, implement them in CustomSubContext
Jakub Nesveda <jakubnesveda@seznam.cz>
parents: 535
diff changeset
    80
fb9cae8a5221 Add methods below to CustomContext, implement them in CustomSubContext
Jakub Nesveda <jakubnesveda@seznam.cz>
parents: 535
diff changeset
    81
    self subclassResponsibility
fb9cae8a5221 Add methods below to CustomContext, implement them in CustomSubContext
Jakub Nesveda <jakubnesveda@seznam.cz>
parents: 535
diff changeset
    82
fb9cae8a5221 Add methods below to CustomContext, implement them in CustomSubContext
Jakub Nesveda <jakubnesveda@seznam.cz>
parents: 535
diff changeset
    83
    "Created: / 05-05-2014 / 00:12:35 / Jakub Nesveda <nesvejak@fit.cvut.cz>"
fb9cae8a5221 Add methods below to CustomContext, implement them in CustomSubContext
Jakub Nesveda <jakubnesveda@seznam.cz>
parents: 535
diff changeset
    84
!
fb9cae8a5221 Add methods below to CustomContext, implement them in CustomSubContext
Jakub Nesveda <jakubnesveda@seznam.cz>
parents: 535
diff changeset
    85
fb9cae8a5221 Add methods below to CustomContext, implement them in CustomSubContext
Jakub Nesveda <jakubnesveda@seznam.cz>
parents: 535
diff changeset
    86
selectedPackages
fb9cae8a5221 Add methods below to CustomContext, implement them in CustomSubContext
Jakub Nesveda <jakubnesveda@seznam.cz>
parents: 535
diff changeset
    87
    "a collection with selected packages"
fb9cae8a5221 Add methods below to CustomContext, implement them in CustomSubContext
Jakub Nesveda <jakubnesveda@seznam.cz>
parents: 535
diff changeset
    88
fb9cae8a5221 Add methods below to CustomContext, implement them in CustomSubContext
Jakub Nesveda <jakubnesveda@seznam.cz>
parents: 535
diff changeset
    89
    self subclassResponsibility
fb9cae8a5221 Add methods below to CustomContext, implement them in CustomSubContext
Jakub Nesveda <jakubnesveda@seznam.cz>
parents: 535
diff changeset
    90
fb9cae8a5221 Add methods below to CustomContext, implement them in CustomSubContext
Jakub Nesveda <jakubnesveda@seznam.cz>
parents: 535
diff changeset
    91
    "Created: / 05-05-2014 / 00:12:59 / Jakub Nesveda <nesvejak@fit.cvut.cz>"
fb9cae8a5221 Add methods below to CustomContext, implement them in CustomSubContext
Jakub Nesveda <jakubnesveda@seznam.cz>
parents: 535
diff changeset
    92
!
fb9cae8a5221 Add methods below to CustomContext, implement them in CustomSubContext
Jakub Nesveda <jakubnesveda@seznam.cz>
parents: 535
diff changeset
    93
718
ed7514e9d76c rename selectedMethodProtocols to selecteProtocols in CustomContext
Jakub Nesveda <jakubnesveda@seznam.cz>
parents: 685
diff changeset
    94
selectedProtocols
ed7514e9d76c rename selectedMethodProtocols to selecteProtocols in CustomContext
Jakub Nesveda <jakubnesveda@seznam.cz>
parents: 685
diff changeset
    95
    "a collection with selected method protocols"
ed7514e9d76c rename selectedMethodProtocols to selecteProtocols in CustomContext
Jakub Nesveda <jakubnesveda@seznam.cz>
parents: 685
diff changeset
    96
    
ed7514e9d76c rename selectedMethodProtocols to selecteProtocols in CustomContext
Jakub Nesveda <jakubnesveda@seznam.cz>
parents: 685
diff changeset
    97
    self subclassResponsibility
ed7514e9d76c rename selectedMethodProtocols to selecteProtocols in CustomContext
Jakub Nesveda <jakubnesveda@seznam.cz>
parents: 685
diff changeset
    98
ed7514e9d76c rename selectedMethodProtocols to selecteProtocols in CustomContext
Jakub Nesveda <jakubnesveda@seznam.cz>
parents: 685
diff changeset
    99
    "Created: / 05-05-2014 / 00:14:23 / Jakub Nesveda <nesvejak@fit.cvut.cz>"
ed7514e9d76c rename selectedMethodProtocols to selecteProtocols in CustomContext
Jakub Nesveda <jakubnesveda@seznam.cz>
parents: 685
diff changeset
   100
!
ed7514e9d76c rename selectedMethodProtocols to selecteProtocols in CustomContext
Jakub Nesveda <jakubnesveda@seznam.cz>
parents: 685
diff changeset
   101
541
fb9cae8a5221 Add methods below to CustomContext, implement them in CustomSubContext
Jakub Nesveda <jakubnesveda@seznam.cz>
parents: 535
diff changeset
   102
selectedVariables
fb9cae8a5221 Add methods below to CustomContext, implement them in CustomSubContext
Jakub Nesveda <jakubnesveda@seznam.cz>
parents: 535
diff changeset
   103
    "a collection with selected variables"
fb9cae8a5221 Add methods below to CustomContext, implement them in CustomSubContext
Jakub Nesveda <jakubnesveda@seznam.cz>
parents: 535
diff changeset
   104
fb9cae8a5221 Add methods below to CustomContext, implement them in CustomSubContext
Jakub Nesveda <jakubnesveda@seznam.cz>
parents: 535
diff changeset
   105
    self subclassResponsibility
fb9cae8a5221 Add methods below to CustomContext, implement them in CustomSubContext
Jakub Nesveda <jakubnesveda@seznam.cz>
parents: 535
diff changeset
   106
fb9cae8a5221 Add methods below to CustomContext, implement them in CustomSubContext
Jakub Nesveda <jakubnesveda@seznam.cz>
parents: 535
diff changeset
   107
    "Created: / 05-05-2014 / 00:14:59 / Jakub Nesveda <nesvejak@fit.cvut.cz>"
535
9eb00f310701 CustomContext a comment for selected classes
Jakub Nesveda <jakubnesveda@seznam.cz>
parents:
diff changeset
   108
! !
9eb00f310701 CustomContext a comment for selected classes
Jakub Nesveda <jakubnesveda@seznam.cz>
parents:
diff changeset
   109
755
37d50424e347 tests fixes - global instance of RBNamespace for creating RBClass holds old data when the global system namespace changes its state - in this case it is old real class instance
Jakub Nesveda <jakubnesveda@seznam.cz>
parents: 747
diff changeset
   110
!CustomContext methodsFor:'initialization'!
37d50424e347 tests fixes - global instance of RBNamespace for creating RBClass holds old data when the global system namespace changes its state - in this case it is old real class instance
Jakub Nesveda <jakubnesveda@seznam.cz>
parents: 747
diff changeset
   111
37d50424e347 tests fixes - global instance of RBNamespace for creating RBClass holds old data when the global system namespace changes its state - in this case it is old real class instance
Jakub Nesveda <jakubnesveda@seznam.cz>
parents: 747
diff changeset
   112
initialize
37d50424e347 tests fixes - global instance of RBNamespace for creating RBClass holds old data when the global system namespace changes its state - in this case it is old real class instance
Jakub Nesveda <jakubnesveda@seznam.cz>
parents: 747
diff changeset
   113
37d50424e347 tests fixes - global instance of RBNamespace for creating RBClass holds old data when the global system namespace changes its state - in this case it is old real class instance
Jakub Nesveda <jakubnesveda@seznam.cz>
parents: 747
diff changeset
   114
    model := CustomNamespace onEnvironment: BrowserEnvironment new.
37d50424e347 tests fixes - global instance of RBNamespace for creating RBClass holds old data when the global system namespace changes its state - in this case it is old real class instance
Jakub Nesveda <jakubnesveda@seznam.cz>
parents: 747
diff changeset
   115
37d50424e347 tests fixes - global instance of RBNamespace for creating RBClass holds old data when the global system namespace changes its state - in this case it is old real class instance
Jakub Nesveda <jakubnesveda@seznam.cz>
parents: 747
diff changeset
   116
    "Modified: / 14-11-2014 / 19:28:33 / Jan Vrany <jan.vrany@fit.cvut.cz>"
37d50424e347 tests fixes - global instance of RBNamespace for creating RBClass holds old data when the global system namespace changes its state - in this case it is old real class instance
Jakub Nesveda <jakubnesveda@seznam.cz>
parents: 747
diff changeset
   117
    "Modified: / 19-11-2014 / 09:35:26 / Jakub Nesveda <nesvejak@fit.cvut.cz>"
37d50424e347 tests fixes - global instance of RBNamespace for creating RBClass holds old data when the global system namespace changes its state - in this case it is old real class instance
Jakub Nesveda <jakubnesveda@seznam.cz>
parents: 747
diff changeset
   118
! !
37d50424e347 tests fixes - global instance of RBNamespace for creating RBClass holds old data when the global system namespace changes its state - in this case it is old real class instance
Jakub Nesveda <jakubnesveda@seznam.cz>
parents: 747
diff changeset
   119
746
a25dc307d4e8 Make CustomContext>>selectedClasses always return a collection of RBClass...
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 718
diff changeset
   120
!CustomContext methodsFor:'private'!
a25dc307d4e8 Make CustomContext>>selectedClasses always return a collection of RBClass...
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 718
diff changeset
   121
a25dc307d4e8 Make CustomContext>>selectedClasses always return a collection of RBClass...
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 718
diff changeset
   122
asRBClass: cls 
755
37d50424e347 tests fixes - global instance of RBNamespace for creating RBClass holds old data when the global system namespace changes its state - in this case it is old real class instance
Jakub Nesveda <jakubnesveda@seznam.cz>
parents: 747
diff changeset
   123
    "For given real class, return a corresponding RBClass"
746
a25dc307d4e8 Make CustomContext>>selectedClasses always return a collection of RBClass...
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 718
diff changeset
   124
a25dc307d4e8 Make CustomContext>>selectedClasses always return a collection of RBClass...
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 718
diff changeset
   125
    ^ Object isMetaclass 
755
37d50424e347 tests fixes - global instance of RBNamespace for creating RBClass holds old data when the global system namespace changes its state - in this case it is old real class instance
Jakub Nesveda <jakubnesveda@seznam.cz>
parents: 747
diff changeset
   126
        ifTrue:[ model metaclassNamed: cls theNonMetaclass name ]
37d50424e347 tests fixes - global instance of RBNamespace for creating RBClass holds old data when the global system namespace changes its state - in this case it is old real class instance
Jakub Nesveda <jakubnesveda@seznam.cz>
parents: 747
diff changeset
   127
        ifFalse:[ model classNamed: cls name ]
746
a25dc307d4e8 Make CustomContext>>selectedClasses always return a collection of RBClass...
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 718
diff changeset
   128
a25dc307d4e8 Make CustomContext>>selectedClasses always return a collection of RBClass...
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 718
diff changeset
   129
    "Created: / 14-11-2014 / 19:26:22 / Jan Vrany <jan.vrany@fit.cvut.cz>"
755
37d50424e347 tests fixes - global instance of RBNamespace for creating RBClass holds old data when the global system namespace changes its state - in this case it is old real class instance
Jakub Nesveda <jakubnesveda@seznam.cz>
parents: 747
diff changeset
   130
    "Modified (comment): / 19-11-2014 / 09:39:15 / Jakub Nesveda <nesvejak@fit.cvut.cz>"
747
008860f4cbd4 Make CustomContext>>selectedMethods always return a collection of RBMethod...
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 746
diff changeset
   131
!
008860f4cbd4 Make CustomContext>>selectedMethods always return a collection of RBMethod...
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 746
diff changeset
   132
008860f4cbd4 Make CustomContext>>selectedMethods always return a collection of RBMethod...
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 746
diff changeset
   133
asRBMethod: aMethod
008860f4cbd4 Make CustomContext>>selectedMethods always return a collection of RBMethod...
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 746
diff changeset
   134
    | rbClass |
008860f4cbd4 Make CustomContext>>selectedMethods always return a collection of RBMethod...
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 746
diff changeset
   135
008860f4cbd4 Make CustomContext>>selectedMethods always return a collection of RBMethod...
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 746
diff changeset
   136
    rbClass := self asRBClass: aMethod mclass.
008860f4cbd4 Make CustomContext>>selectedMethods always return a collection of RBMethod...
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 746
diff changeset
   137
    ^ rbClass methodFor: aMethod selector
008860f4cbd4 Make CustomContext>>selectedMethods always return a collection of RBMethod...
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 746
diff changeset
   138
008860f4cbd4 Make CustomContext>>selectedMethods always return a collection of RBMethod...
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 746
diff changeset
   139
    "Created: / 14-11-2014 / 20:17:16 / Jan Vrany <jan.vrany@fit.cvut.cz>"
746
a25dc307d4e8 Make CustomContext>>selectedClasses always return a collection of RBClass...
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 718
diff changeset
   140
! !
a25dc307d4e8 Make CustomContext>>selectedClasses always return a collection of RBClass...
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 718
diff changeset
   141
668
7f8cddf23efa Separated generator/refactoring initialization from actuall execution.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 629
diff changeset
   142
!CustomContext methodsFor:'testing'!
7f8cddf23efa Separated generator/refactoring initialization from actuall execution.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 629
diff changeset
   143
7f8cddf23efa Separated generator/refactoring initialization from actuall execution.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 629
diff changeset
   144
isInteractiveContext
7f8cddf23efa Separated generator/refactoring initialization from actuall execution.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 629
diff changeset
   145
    "Return true, if this generator/refactoring context is interactive,
7f8cddf23efa Separated generator/refactoring initialization from actuall execution.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 629
diff changeset
   146
     i.e., if it may interact with user (like asking for class name or
7f8cddf23efa Separated generator/refactoring initialization from actuall execution.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 629
diff changeset
   147
     similar) or not. 
7f8cddf23efa Separated generator/refactoring initialization from actuall execution.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 629
diff changeset
   148
7f8cddf23efa Separated generator/refactoring initialization from actuall execution.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 629
diff changeset
   149
     Generally speaking, only top-level context is interactive an only
7f8cddf23efa Separated generator/refactoring initialization from actuall execution.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 629
diff changeset
   150
     if generator/refactoring was triggerred from menu.
7f8cddf23efa Separated generator/refactoring initialization from actuall execution.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 629
diff changeset
   151
    "
7f8cddf23efa Separated generator/refactoring initialization from actuall execution.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 629
diff changeset
   152
    ^ false
7f8cddf23efa Separated generator/refactoring initialization from actuall execution.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 629
diff changeset
   153
7f8cddf23efa Separated generator/refactoring initialization from actuall execution.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 629
diff changeset
   154
    "Created: / 16-09-2014 / 09:22:55 / Jan Vrany <jan.vrany@fit.cvut.cz>"
7f8cddf23efa Separated generator/refactoring initialization from actuall execution.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 629
diff changeset
   155
! !
7f8cddf23efa Separated generator/refactoring initialization from actuall execution.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 629
diff changeset
   156
582
8788d388f801 fix broken tests due to another default code formatting
Jakub Nesveda <jakubnesveda@seznam.cz>
parents: 541
diff changeset
   157
!CustomContext class methodsFor:'documentation'!
8788d388f801 fix broken tests due to another default code formatting
Jakub Nesveda <jakubnesveda@seznam.cz>
parents: 541
diff changeset
   158
8788d388f801 fix broken tests due to another default code formatting
Jakub Nesveda <jakubnesveda@seznam.cz>
parents: 541
diff changeset
   159
version_HG
8788d388f801 fix broken tests due to another default code formatting
Jakub Nesveda <jakubnesveda@seznam.cz>
parents: 541
diff changeset
   160
8788d388f801 fix broken tests due to another default code formatting
Jakub Nesveda <jakubnesveda@seznam.cz>
parents: 541
diff changeset
   161
    ^ '$Changeset: <not expanded> $'
8788d388f801 fix broken tests due to another default code formatting
Jakub Nesveda <jakubnesveda@seznam.cz>
parents: 541
diff changeset
   162
! !
8788d388f801 fix broken tests due to another default code formatting
Jakub Nesveda <jakubnesveda@seznam.cz>
parents: 541
diff changeset
   163