Tools__CodeView2.st
author Claus Gittinger <cg@exept.de>
Fri, 08 Jul 2011 13:31:36 +0200
changeset 10290 a8251e59c37b
parent 10262 39688cd73dff
child 10293 7dec857f35f6
permissions -rw-r--r--
added: #editMenu_eclipseStyle #editMenu_stxStyle changed: #editMenu configurable menu items
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
9985
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     1
"
10072
7ceb629b7d13 changed: #copyright
Claus Gittinger <cg@exept.de>
parents: 10007
diff changeset
     2
 COPYRIGHT (c) 2010 by Jan Vrany, SWING Research Group. CTU in Prague
7ceb629b7d13 changed: #copyright
Claus Gittinger <cg@exept.de>
parents: 10007
diff changeset
     3
              All Rights Reserved
7ceb629b7d13 changed: #copyright
Claus Gittinger <cg@exept.de>
parents: 10007
diff changeset
     4
7ceb629b7d13 changed: #copyright
Claus Gittinger <cg@exept.de>
parents: 10007
diff changeset
     5
Permission is hereby granted, free of charge, to any person
7ceb629b7d13 changed: #copyright
Claus Gittinger <cg@exept.de>
parents: 10007
diff changeset
     6
obtaining a copy of this software and associated documentation
7ceb629b7d13 changed: #copyright
Claus Gittinger <cg@exept.de>
parents: 10007
diff changeset
     7
files (the 'Software'), to deal in the Software without
7ceb629b7d13 changed: #copyright
Claus Gittinger <cg@exept.de>
parents: 10007
diff changeset
     8
restriction, including without limitation the rights to use,
7ceb629b7d13 changed: #copyright
Claus Gittinger <cg@exept.de>
parents: 10007
diff changeset
     9
copy, modify, merge, publish, distribute, sublicense, and/or sell
7ceb629b7d13 changed: #copyright
Claus Gittinger <cg@exept.de>
parents: 10007
diff changeset
    10
copies of the Software, and to permit persons to whom the
7ceb629b7d13 changed: #copyright
Claus Gittinger <cg@exept.de>
parents: 10007
diff changeset
    11
Software is furnished to do so, subject to the following
7ceb629b7d13 changed: #copyright
Claus Gittinger <cg@exept.de>
parents: 10007
diff changeset
    12
conditions:
7ceb629b7d13 changed: #copyright
Claus Gittinger <cg@exept.de>
parents: 10007
diff changeset
    13
7ceb629b7d13 changed: #copyright
Claus Gittinger <cg@exept.de>
parents: 10007
diff changeset
    14
The above copyright notice and this permission notice shall be
7ceb629b7d13 changed: #copyright
Claus Gittinger <cg@exept.de>
parents: 10007
diff changeset
    15
included in all copies or substantial portions of the Software.
7ceb629b7d13 changed: #copyright
Claus Gittinger <cg@exept.de>
parents: 10007
diff changeset
    16
7ceb629b7d13 changed: #copyright
Claus Gittinger <cg@exept.de>
parents: 10007
diff changeset
    17
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
7ceb629b7d13 changed: #copyright
Claus Gittinger <cg@exept.de>
parents: 10007
diff changeset
    18
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
7ceb629b7d13 changed: #copyright
Claus Gittinger <cg@exept.de>
parents: 10007
diff changeset
    19
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
7ceb629b7d13 changed: #copyright
Claus Gittinger <cg@exept.de>
parents: 10007
diff changeset
    20
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
7ceb629b7d13 changed: #copyright
Claus Gittinger <cg@exept.de>
parents: 10007
diff changeset
    21
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
7ceb629b7d13 changed: #copyright
Claus Gittinger <cg@exept.de>
parents: 10007
diff changeset
    22
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
7ceb629b7d13 changed: #copyright
Claus Gittinger <cg@exept.de>
parents: 10007
diff changeset
    23
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
7ceb629b7d13 changed: #copyright
Claus Gittinger <cg@exept.de>
parents: 10007
diff changeset
    24
OTHER DEALINGS IN THE SOFTWARE.
9985
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    25
"
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    26
"{ Package: 'stx:libtool' }"
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    27
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    28
"{ NameSpace: Tools }"
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    29
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    30
SimpleView subclass:#CodeView2
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    31
	instanceVariableNames:'gutterView textView textViewScroller methodHolder languageHolder
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    32
		classHolder browserHolder codeAspect modifiedChannel
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    33
		showGutterChannel modeHolder services syntaxElements
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    34
		syntaxElementSelection highlightEmphasis diffMode
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    35
		synchronizedCodeViews'
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    36
	classVariableNames:'TraceSelectors'
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    37
	poolDictionaries:''
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    38
	category:'Interface-CodeView'
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    39
!
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    40
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    41
SimpleView subclass:#GutterView
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    42
	instanceVariableNames:'codeView textView textViewScroller widthAnnotations widthDiffInfo'
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    43
	classVariableNames:''
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    44
	poolDictionaries:''
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    45
	privateIn:CodeView2
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    46
!
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    47
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    48
CodeView subclass:#TextView
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    49
	instanceVariableNames:'codeView gutterView diffMode deletedLines insertedLines
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    50
		lastFirstLine changedLines scrolled originDiffText emptyLines
10224
eb799692952b More improvements in BreakpointService
vrany
parents: 10072
diff changeset
    51
		changedDiffText suppressNotifications'
9985
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    52
	classVariableNames:''
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    53
	poolDictionaries:''
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    54
	privateIn:CodeView2
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    55
!
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    56
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    57
!CodeView2 class methodsFor:'documentation'!
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    58
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    59
copyright
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    60
"
10072
7ceb629b7d13 changed: #copyright
Claus Gittinger <cg@exept.de>
parents: 10007
diff changeset
    61
 COPYRIGHT (c) 2010 by Jan Vrany, SWING Research Group. CTU in Prague
7ceb629b7d13 changed: #copyright
Claus Gittinger <cg@exept.de>
parents: 10007
diff changeset
    62
              All Rights Reserved
7ceb629b7d13 changed: #copyright
Claus Gittinger <cg@exept.de>
parents: 10007
diff changeset
    63
7ceb629b7d13 changed: #copyright
Claus Gittinger <cg@exept.de>
parents: 10007
diff changeset
    64
Permission is hereby granted, free of charge, to any person
7ceb629b7d13 changed: #copyright
Claus Gittinger <cg@exept.de>
parents: 10007
diff changeset
    65
obtaining a copy of this software and associated documentation
7ceb629b7d13 changed: #copyright
Claus Gittinger <cg@exept.de>
parents: 10007
diff changeset
    66
files (the 'Software'), to deal in the Software without
7ceb629b7d13 changed: #copyright
Claus Gittinger <cg@exept.de>
parents: 10007
diff changeset
    67
restriction, including without limitation the rights to use,
7ceb629b7d13 changed: #copyright
Claus Gittinger <cg@exept.de>
parents: 10007
diff changeset
    68
copy, modify, merge, publish, distribute, sublicense, and/or sell
7ceb629b7d13 changed: #copyright
Claus Gittinger <cg@exept.de>
parents: 10007
diff changeset
    69
copies of the Software, and to permit persons to whom the
7ceb629b7d13 changed: #copyright
Claus Gittinger <cg@exept.de>
parents: 10007
diff changeset
    70
Software is furnished to do so, subject to the following
7ceb629b7d13 changed: #copyright
Claus Gittinger <cg@exept.de>
parents: 10007
diff changeset
    71
conditions:
7ceb629b7d13 changed: #copyright
Claus Gittinger <cg@exept.de>
parents: 10007
diff changeset
    72
7ceb629b7d13 changed: #copyright
Claus Gittinger <cg@exept.de>
parents: 10007
diff changeset
    73
The above copyright notice and this permission notice shall be
7ceb629b7d13 changed: #copyright
Claus Gittinger <cg@exept.de>
parents: 10007
diff changeset
    74
included in all copies or substantial portions of the Software.
7ceb629b7d13 changed: #copyright
Claus Gittinger <cg@exept.de>
parents: 10007
diff changeset
    75
7ceb629b7d13 changed: #copyright
Claus Gittinger <cg@exept.de>
parents: 10007
diff changeset
    76
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
7ceb629b7d13 changed: #copyright
Claus Gittinger <cg@exept.de>
parents: 10007
diff changeset
    77
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
7ceb629b7d13 changed: #copyright
Claus Gittinger <cg@exept.de>
parents: 10007
diff changeset
    78
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
7ceb629b7d13 changed: #copyright
Claus Gittinger <cg@exept.de>
parents: 10007
diff changeset
    79
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
7ceb629b7d13 changed: #copyright
Claus Gittinger <cg@exept.de>
parents: 10007
diff changeset
    80
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
7ceb629b7d13 changed: #copyright
Claus Gittinger <cg@exept.de>
parents: 10007
diff changeset
    81
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
7ceb629b7d13 changed: #copyright
Claus Gittinger <cg@exept.de>
parents: 10007
diff changeset
    82
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
7ceb629b7d13 changed: #copyright
Claus Gittinger <cg@exept.de>
parents: 10007
diff changeset
    83
OTHER DEALINGS IN THE SOFTWARE.
9985
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    84
"
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    85
! !
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    86
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    87
!CodeView2 class methodsFor:'initialization'!
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    88
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    89
initialize
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    90
    "Invoked at system start or when the class is dynamically loaded."
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    91
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    92
    "/ please change as required (and remove this comment)
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    93
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    94
    TraceSelectors := IdentitySet new.
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    95
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    96
    "Modified: / 14-02-2010 / 15:36:11 / Jan Vrany <jan.vrany@fit.cvut.cz>"
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    97
! !
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    98
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    99
!CodeView2 class methodsFor:'debugging'!
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   100
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   101
trace: aSelector
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   102
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   103
    TraceSelectors add: aSelector
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   104
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   105
    "Created: / 14-02-2010 / 09:26:30 / Jan Vrany <jan.vrany@fit.cvut.cz>"
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   106
!
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   107
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   108
untrace: aSelector
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   109
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   110
    TraceSelectors remove: aSelector ifAbsent:[]
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   111
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   112
    "Created: / 14-02-2010 / 09:50:31 / Jan Vrany <jan.vrany@fit.cvut.cz>"
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   113
!
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   114
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   115
untraceAll
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   116
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   117
    TraceSelectors := IdentitySet new
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   118
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   119
    "Created: / 14-02-2010 / 09:53:32 / Jan Vrany <jan.vrany@fit.cvut.cz>"
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   120
! !
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   121
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   122
!CodeView2 class methodsFor:'examples'!
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   123
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   124
example1
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   125
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   126
    | window codeView |
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   127
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   128
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   129
    window := StandardSystemView new.
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   130
    window extent: 300 @ 300.              
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   131
    window label: 'CodeView2 example1'.
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   132
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   133
    codeView := Tools::CodeView2 in: window.
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   134
    codeView
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   135
        origin: 0.1 @ 0.1
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   136
        corner: 0.9 @ 0.9.
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   137
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   138
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   139
    window open.
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   140
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   141
    "Created: / 02-09-2009 / 21:48:56 / Jan Vrany <jan.vrany@fit.cvut.cz>"
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   142
! !
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   143
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   144
!CodeView2 class methodsFor:'menu specs'!
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   145
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   146
editMenu
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   147
    "This resource specification was automatically generated
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   148
     by the MenuEditor of ST/X."
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   149
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   150
    "Do not manually edit this!! If it is corrupted,
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   151
     the MenuEditor may not be able to read the specification."
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   152
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   153
    "
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   154
     MenuEditor new openOnClass:Tools::CodeView2 andSelector:#editMenu
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   155
     (Menu new fromLiteralArrayEncoding:(Tools::CodeView2 editMenu)) startUp
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   156
    "
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   157
10290
Claus Gittinger <cg@exept.de>
parents: 10262
diff changeset
   158
    UserPreferences current eclipseStyleMenus ifTrue:[
Claus Gittinger <cg@exept.de>
parents: 10262
diff changeset
   159
        ^ self editMenu_eclipseStyle
Claus Gittinger <cg@exept.de>
parents: 10262
diff changeset
   160
    ].
Claus Gittinger <cg@exept.de>
parents: 10262
diff changeset
   161
    ^ self editMenu_stxStyle
Claus Gittinger <cg@exept.de>
parents: 10262
diff changeset
   162
Claus Gittinger <cg@exept.de>
parents: 10262
diff changeset
   163
    "Modified: / 08-07-2011 / 13:23:35 / cg"
Claus Gittinger <cg@exept.de>
parents: 10262
diff changeset
   164
!
Claus Gittinger <cg@exept.de>
parents: 10262
diff changeset
   165
Claus Gittinger <cg@exept.de>
parents: 10262
diff changeset
   166
editMenu_eclipseStyle
Claus Gittinger <cg@exept.de>
parents: 10262
diff changeset
   167
    "This resource specification was automatically generated
Claus Gittinger <cg@exept.de>
parents: 10262
diff changeset
   168
     by the MenuEditor of ST/X."
Claus Gittinger <cg@exept.de>
parents: 10262
diff changeset
   169
Claus Gittinger <cg@exept.de>
parents: 10262
diff changeset
   170
    "Do not manually edit this!! If it is corrupted,
Claus Gittinger <cg@exept.de>
parents: 10262
diff changeset
   171
     the MenuEditor may not be able to read the specification."
Claus Gittinger <cg@exept.de>
parents: 10262
diff changeset
   172
Claus Gittinger <cg@exept.de>
parents: 10262
diff changeset
   173
    "
Claus Gittinger <cg@exept.de>
parents: 10262
diff changeset
   174
     MenuEditor new openOnClass:Tools::CodeView2 andSelector:#editMenu
Claus Gittinger <cg@exept.de>
parents: 10262
diff changeset
   175
     (Menu new fromLiteralArrayEncoding:(Tools::CodeView2 editMenu)) startUp
Claus Gittinger <cg@exept.de>
parents: 10262
diff changeset
   176
    "
Claus Gittinger <cg@exept.de>
parents: 10262
diff changeset
   177
9985
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   178
    <resource: #menu>
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   179
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   180
    ^ 
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   181
     #(Menu
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   182
        (
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   183
         (MenuItem
10262
39688cd73dff Merged with JV's branch
vrany
parents: 10245
diff changeset
   184
            label: 'Implementors...'
9985
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   185
            itemValue: browseImplementorsOfIt
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   186
            translateLabel: true
10262
39688cd73dff Merged with JV's branch
vrany
parents: 10245
diff changeset
   187
            submenuChannel: implementorsMenu
9985
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   188
            shortcutKey: ImplementorsOfIt
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   189
          )
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   190
         (MenuItem
10262
39688cd73dff Merged with JV's branch
vrany
parents: 10245
diff changeset
   191
            label: 'Senders...'
9985
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   192
            itemValue: browseSendersOfIt
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   193
            translateLabel: true
10262
39688cd73dff Merged with JV's branch
vrany
parents: 10245
diff changeset
   194
            submenuChannel: sendersMenu
9985
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   195
            shortcutKey: SendersOfIt
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   196
          )
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   197
         (MenuItem
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   198
            label: 'Refactor'
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   199
            translateLabel: true
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   200
            isVisible: false
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   201
            shortcutKey: Shift
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   202
          )
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   203
         (MenuItem
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   204
            label: '-'
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   205
          )
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   206
         (MenuItem
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   207
            label: 'Accept'
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   208
            itemValue: accept
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   209
            translateLabel: true
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   210
            shortcutKey: Accept
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   211
          )
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   212
         (MenuItem
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   213
            label: '-'
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   214
          )
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   215
         (MenuItem
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   216
            label: 'Cut'
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   217
            itemValue: cut
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   218
            translateLabel: true
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   219
            shortcutKey: Cut
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   220
          )
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   221
         (MenuItem
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   222
            label: 'Copy'
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   223
            itemValue: copySelection
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   224
            translateLabel: true
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   225
            shortcutKey: Copy
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   226
          )
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   227
         (MenuItem
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   228
            label: 'Paste'
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   229
            itemValue: pasteOrReplace
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   230
            translateLabel: true
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   231
            shortcutKey: Paste
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   232
          )
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   233
         (MenuItem
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   234
            label: '-'
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   235
          )
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   236
         (MenuItem
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   237
            label: 'Undo'
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   238
            itemValue: undo
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   239
            translateLabel: true
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   240
            shortcutKey: Undo
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   241
          )
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   242
         (MenuItem
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   243
            label: '-'
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   244
          )
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   245
         (MenuItem
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   246
            label: 'Do it'
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   247
            itemValue: doIt
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   248
            translateLabel: true
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   249
            shortcutKey: DoIt
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   250
          )
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   251
         (MenuItem
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   252
            label: 'Print it'
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   253
            itemValue: printIt
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   254
            translateLabel: true
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   255
            shortcutKey: PrintIt
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   256
          )
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   257
         (MenuItem
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   258
            label: 'Inspect it'
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   259
            itemValue: inspectIt
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   260
            translateLabel: true
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   261
            shortcutKey: InspectIt
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   262
          )
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   263
         (MenuItem
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   264
            label: 'Profile it'
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   265
            itemValue: profileIt
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   266
            translateLabel: true
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   267
            shortcutKey: InspectIt
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   268
          )
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   269
         (MenuItem
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   270
            label: '-'
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   271
          )
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   272
         (MenuItem
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   273
            label: 'Show Gutter'
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   274
            nameKey: ShowGutter
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   275
            translateLabel: true
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   276
            indication: showGutterChannel
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   277
          )
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   278
         (MenuItem
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   279
            label: 'More'
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   280
            nameKey: More
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   281
            translateLabel: true
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   282
          )
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   283
         (MenuItem
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   284
            label: 'Services'
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   285
            translateLabel: true
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   286
            submenuChannel: servicesMenu
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   287
          )
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   288
         (MenuItem
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   289
            label: 'Debug'
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   290
            translateLabel: true
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   291
            submenu: 
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   292
           (Menu
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   293
              (
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   294
               (MenuItem
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   295
                  label: 'Inspect '
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   296
                  itemValue: inspectView
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   297
                  translateLabel: true
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   298
                )
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   299
               (MenuItem
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   300
                  label: 'Inspect Syntax Elements'
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   301
                  itemValue: inspectSyntaxElements
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   302
                  translateLabel: true
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   303
                )
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   304
               (MenuItem
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   305
                  label: 'Inspect selected selector'
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   306
                  itemValue: inspectSelectedSelector
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   307
                  translateLabel: true
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   308
                )
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   309
               )
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   310
              nil
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   311
              nil
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   312
            )
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   313
          )
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   314
         )
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   315
        nil
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   316
        nil
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   317
      )
10290
Claus Gittinger <cg@exept.de>
parents: 10262
diff changeset
   318
Claus Gittinger <cg@exept.de>
parents: 10262
diff changeset
   319
    "Created: / 08-07-2011 / 13:20:47 / cg"
Claus Gittinger <cg@exept.de>
parents: 10262
diff changeset
   320
!
Claus Gittinger <cg@exept.de>
parents: 10262
diff changeset
   321
Claus Gittinger <cg@exept.de>
parents: 10262
diff changeset
   322
editMenu_stxStyle
Claus Gittinger <cg@exept.de>
parents: 10262
diff changeset
   323
    "This resource specification was automatically generated
Claus Gittinger <cg@exept.de>
parents: 10262
diff changeset
   324
     by the MenuEditor of ST/X."
Claus Gittinger <cg@exept.de>
parents: 10262
diff changeset
   325
Claus Gittinger <cg@exept.de>
parents: 10262
diff changeset
   326
    "Do not manually edit this!! If it is corrupted,
Claus Gittinger <cg@exept.de>
parents: 10262
diff changeset
   327
     the MenuEditor may not be able to read the specification."
Claus Gittinger <cg@exept.de>
parents: 10262
diff changeset
   328
Claus Gittinger <cg@exept.de>
parents: 10262
diff changeset
   329
    "
Claus Gittinger <cg@exept.de>
parents: 10262
diff changeset
   330
     MenuEditor new openOnClass:Tools::CodeView2 andSelector:#editMenu_stxStyle
Claus Gittinger <cg@exept.de>
parents: 10262
diff changeset
   331
     (Menu new fromLiteralArrayEncoding:(Tools::CodeView2 editMenu_stxStyle)) startUp
Claus Gittinger <cg@exept.de>
parents: 10262
diff changeset
   332
    "
Claus Gittinger <cg@exept.de>
parents: 10262
diff changeset
   333
Claus Gittinger <cg@exept.de>
parents: 10262
diff changeset
   334
    <resource: #menu>
Claus Gittinger <cg@exept.de>
parents: 10262
diff changeset
   335
Claus Gittinger <cg@exept.de>
parents: 10262
diff changeset
   336
    ^ 
Claus Gittinger <cg@exept.de>
parents: 10262
diff changeset
   337
     #(Menu
Claus Gittinger <cg@exept.de>
parents: 10262
diff changeset
   338
        (
Claus Gittinger <cg@exept.de>
parents: 10262
diff changeset
   339
         (MenuItem
Claus Gittinger <cg@exept.de>
parents: 10262
diff changeset
   340
            label: 'Undo'
Claus Gittinger <cg@exept.de>
parents: 10262
diff changeset
   341
            itemValue: undo
Claus Gittinger <cg@exept.de>
parents: 10262
diff changeset
   342
            translateLabel: true
Claus Gittinger <cg@exept.de>
parents: 10262
diff changeset
   343
            shortcutKey: Undo
Claus Gittinger <cg@exept.de>
parents: 10262
diff changeset
   344
          )
Claus Gittinger <cg@exept.de>
parents: 10262
diff changeset
   345
         (MenuItem
Claus Gittinger <cg@exept.de>
parents: 10262
diff changeset
   346
            label: 'Again'
Claus Gittinger <cg@exept.de>
parents: 10262
diff changeset
   347
            itemValue: again
Claus Gittinger <cg@exept.de>
parents: 10262
diff changeset
   348
            translateLabel: true
Claus Gittinger <cg@exept.de>
parents: 10262
diff changeset
   349
            shortcutKey: Again
Claus Gittinger <cg@exept.de>
parents: 10262
diff changeset
   350
          )
Claus Gittinger <cg@exept.de>
parents: 10262
diff changeset
   351
         (MenuItem
Claus Gittinger <cg@exept.de>
parents: 10262
diff changeset
   352
            label: '-'
Claus Gittinger <cg@exept.de>
parents: 10262
diff changeset
   353
          )
Claus Gittinger <cg@exept.de>
parents: 10262
diff changeset
   354
         (MenuItem
Claus Gittinger <cg@exept.de>
parents: 10262
diff changeset
   355
            label: 'Cut'
Claus Gittinger <cg@exept.de>
parents: 10262
diff changeset
   356
            itemValue: cut
Claus Gittinger <cg@exept.de>
parents: 10262
diff changeset
   357
            translateLabel: true
Claus Gittinger <cg@exept.de>
parents: 10262
diff changeset
   358
            shortcutKey: Cut
Claus Gittinger <cg@exept.de>
parents: 10262
diff changeset
   359
          )
Claus Gittinger <cg@exept.de>
parents: 10262
diff changeset
   360
         (MenuItem
Claus Gittinger <cg@exept.de>
parents: 10262
diff changeset
   361
            label: 'Copy'
Claus Gittinger <cg@exept.de>
parents: 10262
diff changeset
   362
            itemValue: copySelection
Claus Gittinger <cg@exept.de>
parents: 10262
diff changeset
   363
            translateLabel: true
Claus Gittinger <cg@exept.de>
parents: 10262
diff changeset
   364
            shortcutKey: Copy
Claus Gittinger <cg@exept.de>
parents: 10262
diff changeset
   365
          )
Claus Gittinger <cg@exept.de>
parents: 10262
diff changeset
   366
         (MenuItem
Claus Gittinger <cg@exept.de>
parents: 10262
diff changeset
   367
            label: 'Paste'
Claus Gittinger <cg@exept.de>
parents: 10262
diff changeset
   368
            itemValue: pasteOrReplace
Claus Gittinger <cg@exept.de>
parents: 10262
diff changeset
   369
            translateLabel: true
Claus Gittinger <cg@exept.de>
parents: 10262
diff changeset
   370
            shortcutKey: Paste
Claus Gittinger <cg@exept.de>
parents: 10262
diff changeset
   371
          )
Claus Gittinger <cg@exept.de>
parents: 10262
diff changeset
   372
         (MenuItem
Claus Gittinger <cg@exept.de>
parents: 10262
diff changeset
   373
            label: '-'
Claus Gittinger <cg@exept.de>
parents: 10262
diff changeset
   374
          )
Claus Gittinger <cg@exept.de>
parents: 10262
diff changeset
   375
         (MenuItem
Claus Gittinger <cg@exept.de>
parents: 10262
diff changeset
   376
            label: 'DoIt'
Claus Gittinger <cg@exept.de>
parents: 10262
diff changeset
   377
            itemValue: doIt
Claus Gittinger <cg@exept.de>
parents: 10262
diff changeset
   378
            translateLabel: true
Claus Gittinger <cg@exept.de>
parents: 10262
diff changeset
   379
            shortcutKey: DoIt
Claus Gittinger <cg@exept.de>
parents: 10262
diff changeset
   380
          )
Claus Gittinger <cg@exept.de>
parents: 10262
diff changeset
   381
         (MenuItem
Claus Gittinger <cg@exept.de>
parents: 10262
diff changeset
   382
            label: 'PrintIt'
Claus Gittinger <cg@exept.de>
parents: 10262
diff changeset
   383
            itemValue: printIt
Claus Gittinger <cg@exept.de>
parents: 10262
diff changeset
   384
            translateLabel: true
Claus Gittinger <cg@exept.de>
parents: 10262
diff changeset
   385
            shortcutKey: PrintIt
Claus Gittinger <cg@exept.de>
parents: 10262
diff changeset
   386
          )
Claus Gittinger <cg@exept.de>
parents: 10262
diff changeset
   387
         (MenuItem
Claus Gittinger <cg@exept.de>
parents: 10262
diff changeset
   388
            label: 'InspectIt'
Claus Gittinger <cg@exept.de>
parents: 10262
diff changeset
   389
            itemValue: inspectIt
Claus Gittinger <cg@exept.de>
parents: 10262
diff changeset
   390
            translateLabel: true
Claus Gittinger <cg@exept.de>
parents: 10262
diff changeset
   391
            shortcutKey: InspectIt
Claus Gittinger <cg@exept.de>
parents: 10262
diff changeset
   392
          )
Claus Gittinger <cg@exept.de>
parents: 10262
diff changeset
   393
         (MenuItem
Claus Gittinger <cg@exept.de>
parents: 10262
diff changeset
   394
            label: '-'
Claus Gittinger <cg@exept.de>
parents: 10262
diff changeset
   395
          )
Claus Gittinger <cg@exept.de>
parents: 10262
diff changeset
   396
         (MenuItem
Claus Gittinger <cg@exept.de>
parents: 10262
diff changeset
   397
            label: 'Accept'
Claus Gittinger <cg@exept.de>
parents: 10262
diff changeset
   398
            itemValue: accept
Claus Gittinger <cg@exept.de>
parents: 10262
diff changeset
   399
            translateLabel: true
Claus Gittinger <cg@exept.de>
parents: 10262
diff changeset
   400
            shortcutKey: Accept
Claus Gittinger <cg@exept.de>
parents: 10262
diff changeset
   401
          )
Claus Gittinger <cg@exept.de>
parents: 10262
diff changeset
   402
         (MenuItem
Claus Gittinger <cg@exept.de>
parents: 10262
diff changeset
   403
            label: '-'
Claus Gittinger <cg@exept.de>
parents: 10262
diff changeset
   404
          )
Claus Gittinger <cg@exept.de>
parents: 10262
diff changeset
   405
         (MenuItem
Claus Gittinger <cg@exept.de>
parents: 10262
diff changeset
   406
            label: 'Refactor'
Claus Gittinger <cg@exept.de>
parents: 10262
diff changeset
   407
            translateLabel: true
Claus Gittinger <cg@exept.de>
parents: 10262
diff changeset
   408
            isVisible: false
Claus Gittinger <cg@exept.de>
parents: 10262
diff changeset
   409
            shortcutKey: Shift
Claus Gittinger <cg@exept.de>
parents: 10262
diff changeset
   410
          )
Claus Gittinger <cg@exept.de>
parents: 10262
diff changeset
   411
         (MenuItem
Claus Gittinger <cg@exept.de>
parents: 10262
diff changeset
   412
            label: 'Show Gutter'
Claus Gittinger <cg@exept.de>
parents: 10262
diff changeset
   413
            nameKey: ShowGutter
Claus Gittinger <cg@exept.de>
parents: 10262
diff changeset
   414
            translateLabel: true
Claus Gittinger <cg@exept.de>
parents: 10262
diff changeset
   415
            indication: showGutterChannel
Claus Gittinger <cg@exept.de>
parents: 10262
diff changeset
   416
          )
Claus Gittinger <cg@exept.de>
parents: 10262
diff changeset
   417
         (MenuItem
Claus Gittinger <cg@exept.de>
parents: 10262
diff changeset
   418
            label: 'Services'
Claus Gittinger <cg@exept.de>
parents: 10262
diff changeset
   419
            translateLabel: true
Claus Gittinger <cg@exept.de>
parents: 10262
diff changeset
   420
            submenuChannel: servicesMenu
Claus Gittinger <cg@exept.de>
parents: 10262
diff changeset
   421
          )
Claus Gittinger <cg@exept.de>
parents: 10262
diff changeset
   422
         (MenuItem
Claus Gittinger <cg@exept.de>
parents: 10262
diff changeset
   423
            label: 'Debug'
Claus Gittinger <cg@exept.de>
parents: 10262
diff changeset
   424
            translateLabel: true
Claus Gittinger <cg@exept.de>
parents: 10262
diff changeset
   425
            submenu: 
Claus Gittinger <cg@exept.de>
parents: 10262
diff changeset
   426
           (Menu
Claus Gittinger <cg@exept.de>
parents: 10262
diff changeset
   427
              (
Claus Gittinger <cg@exept.de>
parents: 10262
diff changeset
   428
               (MenuItem
Claus Gittinger <cg@exept.de>
parents: 10262
diff changeset
   429
                  label: 'Inspect '
Claus Gittinger <cg@exept.de>
parents: 10262
diff changeset
   430
                  itemValue: inspectView
Claus Gittinger <cg@exept.de>
parents: 10262
diff changeset
   431
                  translateLabel: true
Claus Gittinger <cg@exept.de>
parents: 10262
diff changeset
   432
                )
Claus Gittinger <cg@exept.de>
parents: 10262
diff changeset
   433
               (MenuItem
Claus Gittinger <cg@exept.de>
parents: 10262
diff changeset
   434
                  label: 'Inspect Syntax Elements'
Claus Gittinger <cg@exept.de>
parents: 10262
diff changeset
   435
                  itemValue: inspectSyntaxElements
Claus Gittinger <cg@exept.de>
parents: 10262
diff changeset
   436
                  translateLabel: true
Claus Gittinger <cg@exept.de>
parents: 10262
diff changeset
   437
                )
Claus Gittinger <cg@exept.de>
parents: 10262
diff changeset
   438
               (MenuItem
Claus Gittinger <cg@exept.de>
parents: 10262
diff changeset
   439
                  label: 'Inspect selected selector'
Claus Gittinger <cg@exept.de>
parents: 10262
diff changeset
   440
                  itemValue: inspectSelectedSelector
Claus Gittinger <cg@exept.de>
parents: 10262
diff changeset
   441
                  translateLabel: true
Claus Gittinger <cg@exept.de>
parents: 10262
diff changeset
   442
                )
Claus Gittinger <cg@exept.de>
parents: 10262
diff changeset
   443
               )
Claus Gittinger <cg@exept.de>
parents: 10262
diff changeset
   444
              nil
Claus Gittinger <cg@exept.de>
parents: 10262
diff changeset
   445
              nil
Claus Gittinger <cg@exept.de>
parents: 10262
diff changeset
   446
            )
Claus Gittinger <cg@exept.de>
parents: 10262
diff changeset
   447
          )
Claus Gittinger <cg@exept.de>
parents: 10262
diff changeset
   448
         (MenuItem
Claus Gittinger <cg@exept.de>
parents: 10262
diff changeset
   449
            label: '-'
Claus Gittinger <cg@exept.de>
parents: 10262
diff changeset
   450
          )
Claus Gittinger <cg@exept.de>
parents: 10262
diff changeset
   451
         (MenuItem
Claus Gittinger <cg@exept.de>
parents: 10262
diff changeset
   452
            label: 'More'
Claus Gittinger <cg@exept.de>
parents: 10262
diff changeset
   453
            nameKey: More
Claus Gittinger <cg@exept.de>
parents: 10262
diff changeset
   454
            translateLabel: true
Claus Gittinger <cg@exept.de>
parents: 10262
diff changeset
   455
            shortcutKey: Ctrl
Claus Gittinger <cg@exept.de>
parents: 10262
diff changeset
   456
          )
Claus Gittinger <cg@exept.de>
parents: 10262
diff changeset
   457
         )
Claus Gittinger <cg@exept.de>
parents: 10262
diff changeset
   458
        nil
Claus Gittinger <cg@exept.de>
parents: 10262
diff changeset
   459
        nil
Claus Gittinger <cg@exept.de>
parents: 10262
diff changeset
   460
      )
9985
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   461
! !
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   462
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   463
!CodeView2 methodsFor:'accessing'!
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   464
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   465
acceptAction:aBlock
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   466
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   467
    textView acceptAction: aBlock
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   468
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   469
    "Modified: / 01-08-2010 / 20:40:17 / Jan Vrany <jan.vrany@fit.cvut.cz>"
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   470
!
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   471
10224
eb799692952b More improvements in BreakpointService
vrany
parents: 10072
diff changeset
   472
breakpoints
eb799692952b More improvements in BreakpointService
vrany
parents: 10072
diff changeset
   473
eb799692952b More improvements in BreakpointService
vrany
parents: 10072
diff changeset
   474
    services do:[:each|
eb799692952b More improvements in BreakpointService
vrany
parents: 10072
diff changeset
   475
        (each isKindOf: BreakpointService) ifTrue:[
eb799692952b More improvements in BreakpointService
vrany
parents: 10072
diff changeset
   476
            ^each breakpoints
eb799692952b More improvements in BreakpointService
vrany
parents: 10072
diff changeset
   477
        ]
eb799692952b More improvements in BreakpointService
vrany
parents: 10072
diff changeset
   478
    ].
eb799692952b More improvements in BreakpointService
vrany
parents: 10072
diff changeset
   479
    ^nil
eb799692952b More improvements in BreakpointService
vrany
parents: 10072
diff changeset
   480
eb799692952b More improvements in BreakpointService
vrany
parents: 10072
diff changeset
   481
    "Created: / 06-07-2011 / 18:05:35 / jv"
eb799692952b More improvements in BreakpointService
vrany
parents: 10072
diff changeset
   482
!
eb799692952b More improvements in BreakpointService
vrany
parents: 10072
diff changeset
   483
10245
1a1b298637d1 Attempt to fix the accept/cancel bar - no success.
vrany
parents: 10224
diff changeset
   484
browser
1a1b298637d1 Attempt to fix the accept/cancel bar - no success.
vrany
parents: 10224
diff changeset
   485
1a1b298637d1 Attempt to fix the accept/cancel bar - no success.
vrany
parents: 10224
diff changeset
   486
    ^self browserHolder value
1a1b298637d1 Attempt to fix the accept/cancel bar - no success.
vrany
parents: 10224
diff changeset
   487
1a1b298637d1 Attempt to fix the accept/cancel bar - no success.
vrany
parents: 10224
diff changeset
   488
    "Created: / 07-07-2011 / 12:25:59 / Jan Vrany <jan.vrant@fit.cvut,cz>"
1a1b298637d1 Attempt to fix the accept/cancel bar - no success.
vrany
parents: 10224
diff changeset
   489
!
1a1b298637d1 Attempt to fix the accept/cancel bar - no success.
vrany
parents: 10224
diff changeset
   490
9985
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   491
codeAspect
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   492
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   493
    |app|
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   494
    codeAspect ifNotNil:[^codeAspect].
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   495
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   496
    ^((app := self topView application) notNil and:[app respondsTo: #codeAspect])
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   497
        ifTrue:[app codeAspect]
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   498
        ifFalse:[#expression]
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   499
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   500
    "Modified: / 14-02-2010 / 19:51:44 / Jan Vrany <jan.vrany@fit.cvut.cz>"
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   501
!
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   502
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   503
codeAspect:aSymbol
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   504
    codeAspect := aSymbol.
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   505
!
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   506
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   507
contents
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   508
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   509
    ^textView contents
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   510
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   511
    "Created: / 14-02-2010 / 22:13:47 / Jan Vrany <jan.vrany@fit.cvut.cz>"
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   512
!
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   513
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   514
contents: aStringOrStringCollection
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   515
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   516
    textView contents: aStringOrStringCollection.
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   517
    "/self update:#value with: aStringOrStringCollection from: textView model
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   518
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   519
    "Modified: / 07-03-2010 / 20:10:43 / Jan Vrany <jan.vrany@fit.cvut.cz>"
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   520
!
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   521
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   522
diffMode
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   523
    ^ diffMode
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   524
!
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   525
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   526
diffMode:aBoolean
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   527
    diffMode := aBoolean.
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   528
    textView diffMode: aBoolean
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   529
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   530
    "Modified: / 08-04-2011 / 20:50:51 / Jan Vrany <jan.vrany@fit.cvut.cz>"
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   531
!
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   532
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   533
font
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   534
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   535
    ^textView font
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   536
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   537
    "Created: / 16-02-2010 / 10:26:31 / Jan Vrany <jan.vrany@fit.cvut.cz>"
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   538
!
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   539
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   540
font: aFont
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   541
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   542
    ^textView font: aFont
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   543
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   544
    "Created: / 16-02-2010 / 10:26:26 / Jan Vrany <jan.vrany@fit.cvut.cz>"
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   545
!
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   546
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   547
language
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   548
    "return the value in 'languageHolder'"
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   549
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   550
    | v |
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   551
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   552
    (v := self languageHolder value) notNil ifTrue:[^v].
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   553
    (v := self methodHolder value) notNil ifTrue:[^v programmingLanguage].
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   554
    (v := self classHolder value) notNil ifTrue:[^v programmingLanguage].
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   555
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   556
    ^SmalltalkLanguage instance
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   557
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   558
    "Modified: / 17-06-2011 / 12:36:44 / Jan Vrany <jan.vrany@fit.cvut.cz>"
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   559
!
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   560
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   561
language: newValue
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   562
    "set the value in 'languageHolder'"
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   563
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   564
    self languageHolder value: newValue
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   565
!
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   566
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   567
mode
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   568
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   569
    ^self modeHolder value
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   570
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   571
    "Created: / 13-06-2011 / 10:49:52 / Jan Vrany <jan.vrany@fit.cvut.cz>"
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   572
!
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   573
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   574
mode: aSymbol
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   575
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   576
    self assert: (#(expression method) includes: aSymbol).    
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   577
    
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   578
    ^self modeHolder value: aSymbol
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   579
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   580
    "Created: / 13-06-2011 / 10:50:28 / Jan Vrany <jan.vrany@fit.cvut.cz>"
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   581
    "Modified: / 15-06-2011 / 16:37:45 / Jan Vrany <jan.vrany@fit.cvut.cz>"
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   582
!
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   583
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   584
modified
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   585
    "return true if text was modified"
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   586
10245
1a1b298637d1 Attempt to fix the accept/cancel bar - no success.
vrany
parents: 10224
diff changeset
   587
    ^ self modifiedChannel value
1a1b298637d1 Attempt to fix the accept/cancel bar - no success.
vrany
parents: 10224
diff changeset
   588
1a1b298637d1 Attempt to fix the accept/cancel bar - no success.
vrany
parents: 10224
diff changeset
   589
    "Modified: / 07-07-2011 / 12:15:43 / Jan Vrany <jan.vrant@fit.cvut,cz>"
9985
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   590
!
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   591
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   592
modified:aBoolean
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   593
    "set/clear the modified flag"
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   594
10245
1a1b298637d1 Attempt to fix the accept/cancel bar - no success.
vrany
parents: 10224
diff changeset
   595
    self modifiedChannel value:aBoolean
1a1b298637d1 Attempt to fix the accept/cancel bar - no success.
vrany
parents: 10224
diff changeset
   596
1a1b298637d1 Attempt to fix the accept/cancel bar - no success.
vrany
parents: 10224
diff changeset
   597
    "Modified: / 14-02-1997 / 16:44:05 / cg"
1a1b298637d1 Attempt to fix the accept/cancel bar - no success.
vrany
parents: 10224
diff changeset
   598
    "Modified: / 07-07-2011 / 12:15:39 / Jan Vrany <jan.vrant@fit.cvut,cz>"
9985
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   599
!
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   600
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   601
scrolledView
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   602
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   603
    ^self
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   604
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   605
    "Created: / 14-02-2010 / 22:54:56 / Jan Vrany <jan.vrany@fit.cvut.cz>"
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   606
!
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   607
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   608
showGutter
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   609
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   610
    ^showGutterChannel value
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   611
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   612
    "Created: / 23-06-2010 / 19:37:47 / Jan Vrany <jan.vrany@fit.cvut.cz>"
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   613
!
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   614
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   615
synchronizeWith: aCodeView
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   616
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   617
    self assert: aCodeView ~= self.
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   618
    (synchronizedCodeViews includes: aCodeView) ifTrue:[^self].    
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   619
    synchronizedCodeViews := synchronizedCodeViews copyWith: aCodeView.
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   620
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   621
    "Created: / 06-04-2010 / 14:13:14 / Jakub <zelenja7@fel.cvut.cz>"
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   622
    "Modified: / 23-06-2010 / 17:01:47 / Jan Vrany <jan.vrany@fit.cvut.cz>"
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   623
! !
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   624
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   625
!CodeView2 methodsFor:'aspects'!
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   626
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   627
browserHolder
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   628
    browserHolder ifNil:[
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   629
        browserHolder := ValueHolder new
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   630
    ].
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   631
    ^browserHolder
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   632
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   633
    "Modified: / 14-02-2010 / 19:27:33 / Jan Vrany <jan.vrany@fit.cvut.cz>"
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   634
!
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   635
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   636
browserHolder:aValueModel
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   637
    browserHolder := aValueModel.
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   638
!
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   639
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   640
classHolder
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   641
    "return/create the 'classHolder' value holder (automatically generated)"
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   642
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   643
    classHolder isNil ifTrue:[
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   644
        classHolder := ValueHolder with: UndefinedObject.
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   645
        classHolder addDependent:self.
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   646
    ].
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   647
    ^ classHolder
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   648
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   649
    "Modified: / 16-02-2010 / 10:53:52 / Jan Vrany <jan.vrany@fit.cvut.cz>"
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   650
!
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   651
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   652
classHolder:aValueModel
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   653
    "set the 'classHolder' value holder (automatically generated)"
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   654
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   655
    |old oldValue newValue|
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   656
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   657
    classHolder notNil ifTrue:[
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   658
        oldValue := classHolder value.
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   659
        classHolder removeDependent:self.
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   660
    ].
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   661
    classHolder := aValueModel.
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   662
    classHolder notNil ifTrue:[
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   663
        classHolder addDependent:self.
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   664
    ].
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   665
    old := methodHolder.
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   666
    newValue := classHolder value.
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   667
    oldValue ~~ newValue ifTrue:[
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   668
        self update:#value with:newValue from:classHolder.
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   669
    ].
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   670
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   671
    self changed: #classHolder with: old -> classHolder
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   672
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   673
    "Modified: / 17-06-2011 / 12:56:10 / Jan Vrany <jan.vrany@fit.cvut.cz>"
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   674
!
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   675
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   676
languageHolder
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   677
    "return/create the 'languageHolder' value holder (automatically generated)"
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   678
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   679
    languageHolder isNil ifTrue:[
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   680
        languageHolder := ValueHolder with: SmalltalkLanguage instance.
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   681
        languageHolder addDependent:self.
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   682
    ].
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   683
    ^ languageHolder
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   684
!
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   685
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   686
languageHolder:aValueModel
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   687
    "set the 'languageHolder' value holder (automatically generated)"
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   688
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   689
    |old oldValue newValue|
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   690
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   691
    languageHolder notNil ifTrue:[
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   692
        oldValue := languageHolder value.
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   693
        languageHolder removeDependent:self.
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   694
    ].
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   695
    languageHolder := aValueModel.
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   696
    languageHolder notNil ifTrue:[
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   697
        languageHolder addDependent:self.
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   698
    ].
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   699
    old := languageHolder.
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   700
    newValue := languageHolder value.
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   701
    oldValue ~~ newValue ifTrue:[
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   702
        self update:#value with:newValue from:languageHolder.
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   703
    ].
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   704
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   705
    self changed: #languageHolder with: old -> languageHolder
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   706
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   707
    "Modified: / 17-06-2011 / 12:56:30 / Jan Vrany <jan.vrany@fit.cvut.cz>"
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   708
!
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   709
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   710
methodHolder
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   711
    "return/create the 'methodHolder' value holder (automatically generated)"
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   712
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   713
    methodHolder isNil ifTrue:[
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   714
        methodHolder := ValueHolder new.
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   715
        methodHolder addDependent:self.
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   716
    ].
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   717
    ^ methodHolder
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   718
!
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   719
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   720
methodHolder:aValueModel
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   721
    "set the 'methodHolder' value holder (automatically generated)"
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   722
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   723
    |old oldValue newValue|
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   724
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   725
    methodHolder notNil ifTrue:[
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   726
        oldValue := methodHolder value.
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   727
        methodHolder removeDependent:self.
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   728
    ].
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   729
    old := methodHolder.
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   730
    methodHolder := aValueModel.
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   731
    methodHolder notNil ifTrue:[
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   732
        methodHolder addDependent:self.
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   733
    ].
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   734
    newValue := methodHolder value.
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   735
    oldValue ~~ newValue ifTrue:[
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   736
        self update:#value with:newValue from:methodHolder.
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   737
    ].
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   738
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   739
    self changed: #methodHolder with: old -> methodHolder
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   740
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   741
    "Modified: / 17-06-2011 / 12:55:47 / Jan Vrany <jan.vrany@fit.cvut.cz>"
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   742
!
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   743
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   744
modeHolder
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   745
    "return/create the 'modeHolder' value holder (automatically generated)"
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   746
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   747
    modeHolder isNil ifTrue:[
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   748
        modeHolder := #expression asValue.
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   749
        modeHolder addDependent:self.
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   750
    ].
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   751
    ^ modeHolder
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   752
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   753
    "Modified: / 13-06-2011 / 10:52:11 / Jan Vrany <jan.vrany@fit.cvut.cz>"
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   754
!
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   755
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   756
modeHolder:something
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   757
    "set the 'modeHolder' value holder (automatically generated)"
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   758
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   759
    |oldValue newValue|
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   760
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   761
    modeHolder notNil ifTrue:[
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   762
        oldValue := modeHolder value.
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   763
        modeHolder removeDependent:self.
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   764
    ].
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   765
    modeHolder := something.
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   766
    modeHolder notNil ifTrue:[
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   767
        modeHolder addDependent:self.
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   768
    ].
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   769
    newValue := modeHolder value.
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   770
    oldValue ~~ newValue ifTrue:[
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   771
        self update:#value with:newValue from:modeHolder.
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   772
    ].
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   773
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   774
    self changed: #modeHolder with: modeHolder
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   775
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   776
    "Modified: / 17-06-2011 / 12:55:01 / Jan Vrany <jan.vrany@fit.cvut.cz>"
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   777
!
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   778
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   779
model: aValueModel
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   780
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   781
    |oldValue newValue|
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   782
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   783
    textView model notNil ifTrue:[
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   784
        oldValue := textView model value.
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   785
        textView model removeDependent:self.
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   786
    ].
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   787
    textView model: aValueModel.
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   788
    textView model notNil ifTrue:[
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   789
        textView model addDependent:self.
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   790
    ].
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   791
    newValue := textView model value.
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   792
    oldValue ~~ newValue ifTrue:[
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   793
        self update:#value with:newValue from:textView model.
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   794
    ].
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   795
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   796
    "Modified: / 17-06-2011 / 12:54:32 / Jan Vrany <jan.vrany@fit.cvut.cz>"
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   797
! !
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   798
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   799
!CodeView2 methodsFor:'change & update'!
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   800
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   801
update:aspect with:param from:sender
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   802
10245
1a1b298637d1 Attempt to fix the accept/cancel bar - no success.
vrany
parents: 10224
diff changeset
   803
    sender == showGutterChannel ifTrue: [
1a1b298637d1 Attempt to fix the accept/cancel bar - no success.
vrany
parents: 10224
diff changeset
   804
        self updateGutterVisibility.
1a1b298637d1 Attempt to fix the accept/cancel bar - no success.
vrany
parents: 10224
diff changeset
   805
        ^self.
1a1b298637d1 Attempt to fix the accept/cancel bar - no success.
vrany
parents: 10224
diff changeset
   806
    ].
9985
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   807
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   808
    services do:
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   809
        [ :each | 
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   810
        each isEnabled ifTrue:
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   811
            [each update:aspect with:param from:sender ]].
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   812
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   813
    super update:aspect with:param from:sender
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   814
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   815
    "Modified: / 23-06-2010 / 19:05:39 / Jan Vrany <jan.vrany@fit.cvut.cz>"
10245
1a1b298637d1 Attempt to fix the accept/cancel bar - no success.
vrany
parents: 10224
diff changeset
   816
    "Modified: / 07-07-2011 / 12:07:04 / Jan Vrany <jan.vrant@fit.cvut,cz>"
9985
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   817
!
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   818
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   819
updateGutterVisibility
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   820
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   821
    self showGutterChannel value ifTrue:[        
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   822
        textViewScroller origin:(gutterView width @ 0.0) corner:(1.0 @ 1.0).
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   823
        gutterView beVisible.
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   824
    ] ifFalse:[
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   825
        textViewScroller origin:(0.0 @ 0.0) corner:(1.0 @ 1.0).
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   826
        gutterView beInvisible.
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   827
    ]
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   828
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   829
    "Created: / 23-06-2010 / 19:05:39 / Jan Vrany <jan.vrany@fit.cvut.cz>"
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   830
! !
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   831
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   832
!CodeView2 methodsFor:'channels'!
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   833
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   834
modifiedChannel
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   835
    "return the valueHolder holding true if text was modified"
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   836
10245
1a1b298637d1 Attempt to fix the accept/cancel bar - no success.
vrany
parents: 10224
diff changeset
   837
    ^ textView modifiedChannel
1a1b298637d1 Attempt to fix the accept/cancel bar - no success.
vrany
parents: 10224
diff changeset
   838
"/    ^ modifiedChannel
1a1b298637d1 Attempt to fix the accept/cancel bar - no success.
vrany
parents: 10224
diff changeset
   839
1a1b298637d1 Attempt to fix the accept/cancel bar - no success.
vrany
parents: 10224
diff changeset
   840
    "Modified: / 07-07-2011 / 12:07:26 / Jan Vrany <jan.vrant@fit.cvut,cz>"
9985
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   841
!
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   842
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   843
modifiedChannel:aValueHolder
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   844
    "set the valueHolder holding true if text was modified"
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   845
10245
1a1b298637d1 Attempt to fix the accept/cancel bar - no success.
vrany
parents: 10224
diff changeset
   846
    textView modifiedChannel:aValueHolder
1a1b298637d1 Attempt to fix the accept/cancel bar - no success.
vrany
parents: 10224
diff changeset
   847
1a1b298637d1 Attempt to fix the accept/cancel bar - no success.
vrany
parents: 10224
diff changeset
   848
"/    |prev|
1a1b298637d1 Attempt to fix the accept/cancel bar - no success.
vrany
parents: 10224
diff changeset
   849
"/
1a1b298637d1 Attempt to fix the accept/cancel bar - no success.
vrany
parents: 10224
diff changeset
   850
"/    prev := modifiedChannel.
1a1b298637d1 Attempt to fix the accept/cancel bar - no success.
vrany
parents: 10224
diff changeset
   851
"/    modifiedChannel := aValueHolder.
1a1b298637d1 Attempt to fix the accept/cancel bar - no success.
vrany
parents: 10224
diff changeset
   852
"/    self setupChannel:aValueHolder for:nil withOld:prev
1a1b298637d1 Attempt to fix the accept/cancel bar - no success.
vrany
parents: 10224
diff changeset
   853
1a1b298637d1 Attempt to fix the accept/cancel bar - no success.
vrany
parents: 10224
diff changeset
   854
    "Created: / 30-01-1998 / 14:51:32 / cg"
1a1b298637d1 Attempt to fix the accept/cancel bar - no success.
vrany
parents: 10224
diff changeset
   855
    "Modified: / 07-07-2011 / 12:07:43 / Jan Vrany <jan.vrant@fit.cvut,cz>"
9985
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   856
!
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   857
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   858
showGutterChannel
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   859
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   860
    ^showGutterChannel
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   861
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   862
    "Created: / 23-06-2010 / 19:02:15 / Jan Vrany <jan.vrany@fit.cvut.cz>"
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   863
!
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   864
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   865
showGutterChannel:aValueHolder
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   866
    "set the valueHolder holding true if text was modified"
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   867
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   868
    |prev|
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   869
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   870
    prev := showGutterChannel.
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   871
    showGutterChannel := aValueHolder.
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   872
    self setupChannel:aValueHolder for:nil withOld:prev
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   873
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   874
    "Created: / 23-06-2010 / 19:03:26 / Jan Vrany <jan.vrany@fit.cvut.cz>"
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   875
! !
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   876
10262
39688cd73dff Merged with JV's branch
vrany
parents: 10245
diff changeset
   877
!CodeView2 methodsFor:'code services'!
39688cd73dff Merged with JV's branch
vrany
parents: 10245
diff changeset
   878
39688cd73dff Merged with JV's branch
vrany
parents: 10245
diff changeset
   879
browseMethod: method
39688cd73dff Merged with JV's branch
vrany
parents: 10245
diff changeset
   880
39688cd73dff Merged with JV's branch
vrany
parents: 10245
diff changeset
   881
    self browseMethod: method label: nil.
39688cd73dff Merged with JV's branch
vrany
parents: 10245
diff changeset
   882
39688cd73dff Merged with JV's branch
vrany
parents: 10245
diff changeset
   883
    "Created: / 14-02-2010 / 19:41:46 / Jan Vrany <jan.vrany@fit.cvut.cz>"
39688cd73dff Merged with JV's branch
vrany
parents: 10245
diff changeset
   884
!
39688cd73dff Merged with JV's branch
vrany
parents: 10245
diff changeset
   885
39688cd73dff Merged with JV's branch
vrany
parents: 10245
diff changeset
   886
browseMethod: method label: label
39688cd73dff Merged with JV's branch
vrany
parents: 10245
diff changeset
   887
39688cd73dff Merged with JV's branch
vrany
parents: 10245
diff changeset
   888
    self browser ifNil: [^NewSystemBrowser openInMethod:method].
39688cd73dff Merged with JV's branch
vrany
parents: 10245
diff changeset
   889
    (UserPreferences current alwaysOpenNewTabWhenCtrlClick 
39688cd73dff Merged with JV's branch
vrany
parents: 10245
diff changeset
   890
        or:[self browser navigationState modified])  
39688cd73dff Merged with JV's branch
vrany
parents: 10245
diff changeset
   891
        ifTrue:
39688cd73dff Merged with JV's branch
vrany
parents: 10245
diff changeset
   892
            [self browser 
39688cd73dff Merged with JV's branch
vrany
parents: 10245
diff changeset
   893
                spawnFullBrowserInClass: method mclass 
39688cd73dff Merged with JV's branch
vrany
parents: 10245
diff changeset
   894
                selector:method selector 
39688cd73dff Merged with JV's branch
vrany
parents: 10245
diff changeset
   895
                in:#newBuffer]
39688cd73dff Merged with JV's branch
vrany
parents: 10245
diff changeset
   896
        ifFalse:
39688cd73dff Merged with JV's branch
vrany
parents: 10245
diff changeset
   897
            [self browser 
39688cd73dff Merged with JV's branch
vrany
parents: 10245
diff changeset
   898
                switchToClass: method containingClass 
39688cd73dff Merged with JV's branch
vrany
parents: 10245
diff changeset
   899
                selector: method selector].
39688cd73dff Merged with JV's branch
vrany
parents: 10245
diff changeset
   900
39688cd73dff Merged with JV's branch
vrany
parents: 10245
diff changeset
   901
    "Modified: / 19-02-2008 / 10:15:17 / janfrog"
39688cd73dff Merged with JV's branch
vrany
parents: 10245
diff changeset
   902
    "Created: / 19-10-2008 / 08:16:17 / Jan Vrany <vranyj1@fel.cvut.cz>"
39688cd73dff Merged with JV's branch
vrany
parents: 10245
diff changeset
   903
    "Modified: / 25-07-2010 / 13:34:27 / Jan Vrany <jan.vrany@fit.cvut.cz>"
39688cd73dff Merged with JV's branch
vrany
parents: 10245
diff changeset
   904
!
39688cd73dff Merged with JV's branch
vrany
parents: 10245
diff changeset
   905
39688cd73dff Merged with JV's branch
vrany
parents: 10245
diff changeset
   906
browseMethods: methods label: label
39688cd73dff Merged with JV's branch
vrany
parents: 10245
diff changeset
   907
39688cd73dff Merged with JV's branch
vrany
parents: 10245
diff changeset
   908
    methods size = 1 ifTrue:
39688cd73dff Merged with JV's branch
vrany
parents: 10245
diff changeset
   909
        [^self browseMethod: methods anyOne label: label].
39688cd73dff Merged with JV's branch
vrany
parents: 10245
diff changeset
   910
39688cd73dff Merged with JV's branch
vrany
parents: 10245
diff changeset
   911
    self browser 
39688cd73dff Merged with JV's branch
vrany
parents: 10245
diff changeset
   912
        ifNil: [NewSystemBrowser browseMethods: methods title: label]
39688cd73dff Merged with JV's branch
vrany
parents: 10245
diff changeset
   913
        ifNotNil:[self browser spawnMethodBrowserFor:methods in:#newBuffer label:label]
39688cd73dff Merged with JV's branch
vrany
parents: 10245
diff changeset
   914
39688cd73dff Merged with JV's branch
vrany
parents: 10245
diff changeset
   915
    "Created: / 26-12-2007 / 11:32:04 / janfrog"
39688cd73dff Merged with JV's branch
vrany
parents: 10245
diff changeset
   916
    "Modified: / 19-10-2008 / 08:17:28 / Jan Vrany <vranyj1@fel.cvut.cz>"
39688cd73dff Merged with JV's branch
vrany
parents: 10245
diff changeset
   917
!
39688cd73dff Merged with JV's branch
vrany
parents: 10245
diff changeset
   918
39688cd73dff Merged with JV's branch
vrany
parents: 10245
diff changeset
   919
extractSelectorAndSelectedTextFrom: givenSelectedText
39688cd73dff Merged with JV's branch
vrany
parents: 10245
diff changeset
   920
39688cd73dff Merged with JV's branch
vrany
parents: 10245
diff changeset
   921
    | selector selectedText compilerClass na |
39688cd73dff Merged with JV's branch
vrany
parents: 10245
diff changeset
   922
    selectedText := givenSelectedText.
39688cd73dff Merged with JV's branch
vrany
parents: 10245
diff changeset
   923
    compilerClass := self language compilerClass.
39688cd73dff Merged with JV's branch
vrany
parents: 10245
diff changeset
   924
    selectedText size > 0 ifTrue:[
39688cd73dff Merged with JV's branch
vrany
parents: 10245
diff changeset
   925
        self windowGroup withWaitCursorDo:[
39688cd73dff Merged with JV's branch
vrany
parents: 10245
diff changeset
   926
            "/ hack, for now and expecco; must ask the Parser eventually...
39688cd73dff Merged with JV's branch
vrany
parents: 10245
diff changeset
   927
            (compilerClass notNil and:[compilerClass includesBehavior:JavaScriptParser]) ifTrue:[
39688cd73dff Merged with JV's branch
vrany
parents: 10245
diff changeset
   928
                "/ selector is in one piece anyway
39688cd73dff Merged with JV's branch
vrany
parents: 10245
diff changeset
   929
                (selectedText includes:$_) ifFalse:[
39688cd73dff Merged with JV's branch
vrany
parents: 10245
diff changeset
   930
                    "/ zero or one args - sigh (need to parse more to figure this out)
39688cd73dff Merged with JV's branch
vrany
parents: 10245
diff changeset
   931
                    selector := JavaScriptParser basicNew translatedSmalltalkSelectorFor:selectedText numArgs:1.
39688cd73dff Merged with JV's branch
vrany
parents: 10245
diff changeset
   932
                    selectedText := JavaScriptParser basicNew translatedSmalltalkSelectorFor:selectedText numArgs:0.
39688cd73dff Merged with JV's branch
vrany
parents: 10245
diff changeset
   933
                ] ifTrue:[
39688cd73dff Merged with JV's branch
vrany
parents: 10245
diff changeset
   934
                    "/ count _#s plus one arg - sigh
39688cd73dff Merged with JV's branch
vrany
parents: 10245
diff changeset
   935
                    na := (selectedText occurrencesOf:$_) + 1. 
39688cd73dff Merged with JV's branch
vrany
parents: 10245
diff changeset
   936
                    selector := JavaScriptParser basicNew translatedSmalltalkSelectorFor:selectedText numArgs:na
39688cd73dff Merged with JV's branch
vrany
parents: 10245
diff changeset
   937
                ].
39688cd73dff Merged with JV's branch
vrany
parents: 10245
diff changeset
   938
            ] ifFalse:[
39688cd73dff Merged with JV's branch
vrany
parents: 10245
diff changeset
   939
                selector := SystemBrowser extractSelectorFrom:selectedText.
39688cd73dff Merged with JV's branch
vrany
parents: 10245
diff changeset
   940
            ].
39688cd73dff Merged with JV's branch
vrany
parents: 10245
diff changeset
   941
        ]
39688cd73dff Merged with JV's branch
vrany
parents: 10245
diff changeset
   942
    ].
39688cd73dff Merged with JV's branch
vrany
parents: 10245
diff changeset
   943
    ^Array with: selector with: selectedText
39688cd73dff Merged with JV's branch
vrany
parents: 10245
diff changeset
   944
39688cd73dff Merged with JV's branch
vrany
parents: 10245
diff changeset
   945
    "Created: / 30-06-2011 / 19:49:53 / Jan Vrany <jan.vrany@fit.cvut.cz>"
39688cd73dff Merged with JV's branch
vrany
parents: 10245
diff changeset
   946
!
39688cd73dff Merged with JV's branch
vrany
parents: 10245
diff changeset
   947
39688cd73dff Merged with JV's branch
vrany
parents: 10245
diff changeset
   948
implementorsOf: selector
39688cd73dff Merged with JV's branch
vrany
parents: 10245
diff changeset
   949
39688cd73dff Merged with JV's branch
vrany
parents: 10245
diff changeset
   950
    selector ifNil:[^#()].
39688cd73dff Merged with JV's branch
vrany
parents: 10245
diff changeset
   951
    ^SystemBrowser
39688cd73dff Merged with JV's branch
vrany
parents: 10245
diff changeset
   952
        findImplementorsOf: selector
39688cd73dff Merged with JV's branch
vrany
parents: 10245
diff changeset
   953
        in: Smalltalk allClasses
39688cd73dff Merged with JV's branch
vrany
parents: 10245
diff changeset
   954
        ignoreCase: false
39688cd73dff Merged with JV's branch
vrany
parents: 10245
diff changeset
   955
39688cd73dff Merged with JV's branch
vrany
parents: 10245
diff changeset
   956
    "Created: / 26-12-2007 / 11:37:11 / janfrog"
39688cd73dff Merged with JV's branch
vrany
parents: 10245
diff changeset
   957
!
39688cd73dff Merged with JV's branch
vrany
parents: 10245
diff changeset
   958
39688cd73dff Merged with JV's branch
vrany
parents: 10245
diff changeset
   959
sendersOf: selector
39688cd73dff Merged with JV's branch
vrany
parents: 10245
diff changeset
   960
39688cd73dff Merged with JV's branch
vrany
parents: 10245
diff changeset
   961
    selector ifNil:[^#()].
39688cd73dff Merged with JV's branch
vrany
parents: 10245
diff changeset
   962
    ^SystemBrowser
39688cd73dff Merged with JV's branch
vrany
parents: 10245
diff changeset
   963
        findSendersOf: selector
39688cd73dff Merged with JV's branch
vrany
parents: 10245
diff changeset
   964
        in: Smalltalk allClasses
39688cd73dff Merged with JV's branch
vrany
parents: 10245
diff changeset
   965
        ignoreCase: false
39688cd73dff Merged with JV's branch
vrany
parents: 10245
diff changeset
   966
39688cd73dff Merged with JV's branch
vrany
parents: 10245
diff changeset
   967
    "Created: / 26-12-2007 / 11:37:22 / janfrog"
39688cd73dff Merged with JV's branch
vrany
parents: 10245
diff changeset
   968
    "Modified: / 30-06-2011 / 19:32:52 / Jan Vrany <jan.vrany@fit.cvut.cz>"
39688cd73dff Merged with JV's branch
vrany
parents: 10245
diff changeset
   969
! !
39688cd73dff Merged with JV's branch
vrany
parents: 10245
diff changeset
   970
9985
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   971
!CodeView2 methodsFor:'delegation'!
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   972
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   973
doesNotUnderstand: aMessage
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   974
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   975
    ((textView respondsTo: aMessage selector) 
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   976
    and:[(TraceSelectors includes:aMessage selector) not])
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   977
        ifTrue:[^aMessage sendTo: textView].
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   978
    ^super doesNotUnderstand: aMessage
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   979
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   980
    "Created: / 13-02-2010 / 23:27:09 / Jan Vrany <jan.vrany@fit.cvut.cz>"
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   981
    "Modified: / 14-02-2010 / 09:53:06 / Jan Vrany <jan.vrany@fit.cvut.cz>"
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   982
!
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   983
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   984
hasSelection
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   985
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   986
    ^textView hasSelection
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   987
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   988
    "Created: / 14-02-2010 / 09:53:54 / Jan Vrany <jan.vrany@fit.cvut.cz>"
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   989
! !
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   990
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   991
!CodeView2 methodsFor:'delegation - drawing'!
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   992
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   993
drawLine:lineNo in: view atX:x y:y width: w height:h from:startCol to:endColOrNil with:fg and:bg
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   994
    "See the comment in
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   995
     CodeViewService>>drawLine:in:atX..."
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   996
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   997
    services do:[:each|
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   998
        each drawLine:lineNo in: view atX:x y:y width: w height:h from:startCol to:endColOrNil with:fg and:bg
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   999
    ]
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1000
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1001
    "Created: / 17-06-2011 / 13:50:20 / Jan Vrany <jan.vrany@fit.cvut.cz>"
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1002
!
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1003
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1004
redrawVisibleLine: visLineNr
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1005
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1006
    "Created: / 07-03-2010 / 14:44:23 / Jan Vrany <jan.vrany@fit.cvut.cz>"
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1007
!
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1008
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1009
redrawVisibleLine:visLine col:colNr
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1010
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1011
    "Modified: / 05-11-2007 / 17:35:53 / cg"
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1012
    "Modified: / 07-03-2010 / 14:45:32 / Jan Vrany <jan.vrany@fit.cvut.cz>"
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1013
!
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1014
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1015
redrawVisibleLine:visLine from:startCol
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1016
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1017
    "Modified: / 07-03-2010 / 14:46:18 / Jan Vrany <jan.vrany@fit.cvut.cz>"
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1018
!
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1019
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1020
redrawVisibleLine:visLine from:startCol to:endCol
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1021
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1022
    "Modified: / 07-03-2010 / 14:46:22 / Jan Vrany <jan.vrany@fit.cvut.cz>"
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1023
! !
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1024
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1025
!CodeView2 methodsFor:'delegation - events'!
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1026
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1027
buttonMotion: button x:x y:y in: view
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1028
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1029
    "Delegates events to services. Answers true iff at least
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1030
     one service handler method returns true. In that case,
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1031
     the event is is NOT processes by the view."
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1032
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1033
    ^services
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1034
        inject: false
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1035
        into:
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1036
            [:processed :service|
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1037
            service isEnabled 
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1038
                ifFalse:
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1039
                    [processed]
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1040
                ifTrue:
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1041
                    [processed | ((service buttonMotion: button x:x y:y in: view) == true)]].
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1042
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1043
    "Modified: / 07-03-2010 / 13:53:18 / Jan Vrany <jan.vrany@fit.cvut.cz>"
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1044
!
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1045
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1046
buttonPress: button x:x y:y in: view
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1047
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1048
    "Delegates events to services. Answers true iff at least
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1049
     one service handler method returns true. In that case,
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1050
     the event is is NOT processes by the view."
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1051
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1052
    ^services
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1053
        inject: false
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1054
        into:
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1055
            [:processed :service|
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1056
            service isEnabled 
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1057
                ifFalse:
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1058
                    [processed]
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1059
                ifTrue:
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1060
                    [processed | ((service buttonPress: button x:x y:y in: view) == true)]].
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1061
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1062
    "Modified: / 07-03-2010 / 13:53:47 / Jan Vrany <jan.vrany@fit.cvut.cz>"
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1063
!
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1064
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1065
keyPress: key x:x y:y in: view
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1066
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1067
    "Delegates events to services. Answers true iff at least
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1068
     one service handler method returns true. In that case,
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1069
     the event is is NOT processes by the view."
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1070
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1071
    ^services
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1072
        inject: false
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1073
        into:
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1074
            [:processed :service|
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1075
            service isEnabled 
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1076
                ifFalse:
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1077
                    [processed]
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1078
                ifTrue:
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1079
                    [processed | ((service keyPress: key x:x y:y in: view) == true)]].
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1080
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1081
    "Modified: / 07-03-2010 / 13:54:15 / Jan Vrany <jan.vrany@fit.cvut.cz>"
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1082
!
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1083
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1084
keyRelease: key x:x y:y in: view
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1085
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1086
    "Delegates events to services. Answers true iff at least
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1087
     one service handler method returns true. In that case,
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1088
     the event is is NOT processes by the view."
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1089
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1090
    ^services
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1091
        inject: false
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1092
        into:
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1093
            [:processed :service|
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1094
            service isEnabled 
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1095
                ifFalse:
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1096
                    [processed]
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1097
                ifTrue:
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1098
                    [processed | ((service keyRelease: key x:x y:y in: view) == true)]].
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1099
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1100
    "Modified: / 07-03-2010 / 13:54:27 / Jan Vrany <jan.vrany@fit.cvut.cz>"
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1101
!
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1102
10224
eb799692952b More improvements in BreakpointService
vrany
parents: 10072
diff changeset
  1103
linesDeletedFrom: start to: end
eb799692952b More improvements in BreakpointService
vrany
parents: 10072
diff changeset
  1104
eb799692952b More improvements in BreakpointService
vrany
parents: 10072
diff changeset
  1105
    services do: [:each |
eb799692952b More improvements in BreakpointService
vrany
parents: 10072
diff changeset
  1106
        each isEnabled ifTrue: [
eb799692952b More improvements in BreakpointService
vrany
parents: 10072
diff changeset
  1107
            each linesDeletedFrom: start to: end
eb799692952b More improvements in BreakpointService
vrany
parents: 10072
diff changeset
  1108
        ]
eb799692952b More improvements in BreakpointService
vrany
parents: 10072
diff changeset
  1109
    ].
eb799692952b More improvements in BreakpointService
vrany
parents: 10072
diff changeset
  1110
eb799692952b More improvements in BreakpointService
vrany
parents: 10072
diff changeset
  1111
    "Created: / 06-07-2011 / 17:12:54 / jv"
eb799692952b More improvements in BreakpointService
vrany
parents: 10072
diff changeset
  1112
!
eb799692952b More improvements in BreakpointService
vrany
parents: 10072
diff changeset
  1113
eb799692952b More improvements in BreakpointService
vrany
parents: 10072
diff changeset
  1114
linesInsertedFrom: start to: end
eb799692952b More improvements in BreakpointService
vrany
parents: 10072
diff changeset
  1115
eb799692952b More improvements in BreakpointService
vrany
parents: 10072
diff changeset
  1116
    services do: [:each |
eb799692952b More improvements in BreakpointService
vrany
parents: 10072
diff changeset
  1117
        each isEnabled ifTrue: [
eb799692952b More improvements in BreakpointService
vrany
parents: 10072
diff changeset
  1118
            each linesInsertedFrom: start to: end
eb799692952b More improvements in BreakpointService
vrany
parents: 10072
diff changeset
  1119
        ]
eb799692952b More improvements in BreakpointService
vrany
parents: 10072
diff changeset
  1120
    ].
eb799692952b More improvements in BreakpointService
vrany
parents: 10072
diff changeset
  1121
eb799692952b More improvements in BreakpointService
vrany
parents: 10072
diff changeset
  1122
    "Created: / 06-07-2011 / 17:12:48 / jv"
eb799692952b More improvements in BreakpointService
vrany
parents: 10072
diff changeset
  1123
!
eb799692952b More improvements in BreakpointService
vrany
parents: 10072
diff changeset
  1124
eb799692952b More improvements in BreakpointService
vrany
parents: 10072
diff changeset
  1125
linesModifiedFrom: start to: end
eb799692952b More improvements in BreakpointService
vrany
parents: 10072
diff changeset
  1126
eb799692952b More improvements in BreakpointService
vrany
parents: 10072
diff changeset
  1127
    services do: [:each |
eb799692952b More improvements in BreakpointService
vrany
parents: 10072
diff changeset
  1128
        each isEnabled ifTrue: [
eb799692952b More improvements in BreakpointService
vrany
parents: 10072
diff changeset
  1129
            each linesModifiedFrom: start to: end
eb799692952b More improvements in BreakpointService
vrany
parents: 10072
diff changeset
  1130
        ]
eb799692952b More improvements in BreakpointService
vrany
parents: 10072
diff changeset
  1131
    ].
eb799692952b More improvements in BreakpointService
vrany
parents: 10072
diff changeset
  1132
eb799692952b More improvements in BreakpointService
vrany
parents: 10072
diff changeset
  1133
    "Created: / 06-07-2011 / 17:12:58 / jv"
eb799692952b More improvements in BreakpointService
vrany
parents: 10072
diff changeset
  1134
!
eb799692952b More improvements in BreakpointService
vrany
parents: 10072
diff changeset
  1135
9985
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1136
scrollDown: nLines in: view
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1137
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1138
    view == textView 
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1139
        ifTrue:
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1140
            ["/my text view scrolled...
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1141
            synchronizedCodeViews do:[:codeView|codeView scrollDown: nLines in: view]]
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1142
        ifFalse:
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1143
            ["/other code view scrolls and I'm notified about that
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1144
            textView basicScrollDown: nLines]
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1145
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1146
    "Created: / 06-04-2010 / 14:02:39 / Jakub <zelenja7@fel.cvut.cz>"
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1147
!
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1148
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1149
scrollUp: nLines in: view
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1150
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1151
    view == textView 
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1152
        ifTrue:
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1153
            ["/my text view scrolled...
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1154
            synchronizedCodeViews do:[:codeView|codeView scrollUp: nLines in: view]]
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1155
        ifFalse:
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1156
            ["/other code view scrolls and I'm notified about that
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1157
            textView basicScrollUp: nLines]
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1158
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1159
    "Created: / 06-04-2010 / 14:02:39 / Jakub <zelenja7@fel.cvut.cz>"
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1160
! !
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1161
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1162
!CodeView2 methodsFor:'diff mode'!
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1163
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1164
recomputeDiff:view 
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1165
    |t1 t2 pom diffHelper view2|
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1166
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1167
    t1 := view getNewOriginText.
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1168
    synchronizedCodeViews do:[:codeView | 
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1169
        view2 := codeView
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1170
    ].
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1171
    view changedDiffText:false.
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1172
    view2 changedDiffText:false.
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1173
    t2 := view2 getNewOriginText.
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1174
    pom := DiffCodeView2 new.
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1175
    (view == textView) ifTrue:[
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1176
        diffHelper := pom computeDiffDataForText1:t1 text2:t2.
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1177
        (view) contents:(diffHelper text1).
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1178
        (view) deletedLines:(diffHelper deleted).
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1179
        (view) changedLines:(diffHelper changed).
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1180
        (view) originDiffText:t1.
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1181
        (view) emptyLines:(diffHelper inserted).
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1182
        (view) changedLines:(diffHelper changed).
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1183
        (view2) contents:(diffHelper text2).
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1184
        (view2) insertedLines:(diffHelper inserted).
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1185
        (view2) changedLines:(diffHelper changed).
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1186
        (view2) originDiffText:t2.
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1187
        (view2) emptyLines:(diffHelper deleted).
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1188
    ].
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1189
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1190
    "Modified: / 22-06-2010 / 23:35:41 / Jakub <zelenja7@fel.cvut.cz>"
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1191
    "Modified: / 23-06-2010 / 17:25:59 / Jan Vrany <jan.vrany@fit.cvut.cz>"
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1192
! !
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1193
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1194
!CodeView2 methodsFor:'initialization'!
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1195
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1196
initialize
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1197
    "Invoked when a new instance is created."
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1198
    "Call super initialize"
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1199
    
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1200
    super initialize.
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1201
     "Now set up some visual properties"
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1202
    self level:-1.
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1203
     "Now initialize sub-views"
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1204
    showGutterChannel := (ValueHolder with: true).
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1205
    showGutterChannel addDependent: self.     
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1206
    self initializeGutterView.
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1207
    self initializeTextView.
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1208
    gutterView setCodeView:self.
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1209
    textView setCodeView:self.
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1210
    modifiedChannel := ValueHolder with:false.    
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1211
    diffMode := false.
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1212
    synchronizedCodeViews := #().
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1213
     "Initialize services"
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1214
    services := OrderedCollection new.
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1215
    self initializeServices.
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1216
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1217
    "Modified: / 14-12-2009 / 13:59:53 / Jindra <a>"
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1218
    "Modified: / 06-04-2010 / 13:56:35 / Jakub <zelenja7@fel.cvut.cz>"
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1219
    "Modified: / 23-06-2010 / 19:30:24 / Jan Vrany <jan.vrany@fit.cvut.cz>"
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1220
!
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1221
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1222
initializeGutterView
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1223
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1224
    gutterView := CodeView2::GutterView new.
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1225
    gutterView origin:(0.0 @ 0.0) corner:(gutterView preferredWidth @ 1.0).
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1226
    showGutterChannel value ifTrue:[self addSubView: gutterView].
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1227
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1228
    "Created: / 02-09-2009 / 21:35:56 / Jan Vrany <jan.vrany@fit.cvut.cz>"
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1229
    "Modified: / 23-06-2010 / 19:14:55 / Jan Vrany <jan.vrany@fit.cvut.cz>"
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1230
!
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1231
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1232
initializeServices
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1233
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1234
    | serviceClasses |
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1235
    serviceClasses := CodeViewService availableServices.
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1236
    serviceClasses do:
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1237
        [:cls|
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1238
        self registerService: cls new].
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1239
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1240
    "Modified: / 07-03-2010 / 13:50:50 / Jan Vrany <jan.vrany@fit.cvut.cz>"
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1241
!
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1242
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1243
initializeTextView
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1244
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1245
    "Initialize textView. gutterView have to be 
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1246
     already initialized!!"
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1247
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1248
    textViewScroller := HVScrollableView for: CodeView2::TextView in: self.
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1249
    textViewScroller
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1250
        origin: ((self showGutter ifTrue:[gutterView width] ifFalse:[0.0]) @ 0.0)
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1251
        corner: 1.0@1.0;
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1252
        level: 0.
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1253
    textView := textViewScroller scrolledView.
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1254
    textView level: 0.
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1255
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1256
    textView modifiedChannel addDependent: self.
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1257
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1258
    "Created: / 02-09-2009 / 21:36:02 / Jan Vrany <jan.vrany@fit.cvut.cz>"
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1259
    "Modified: / 23-06-2010 / 19:38:20 / Jan Vrany <jan.vrany@fit.cvut.cz>"
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1260
! !
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1261
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1262
!CodeView2 methodsFor:'menu actions'!
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1263
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1264
browseImplementorsOfIt
10262
39688cd73dff Merged with JV's branch
vrany
parents: 10245
diff changeset
  1265
39688cd73dff Merged with JV's branch
vrany
parents: 10245
diff changeset
  1266
    textView browseImplementorsOfIt
39688cd73dff Merged with JV's branch
vrany
parents: 10245
diff changeset
  1267
39688cd73dff Merged with JV's branch
vrany
parents: 10245
diff changeset
  1268
    "Modified: / 30-06-2011 / 19:22:41 / Jan Vrany <jan.vrany@fit.cvut.cz>"
9985
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1269
!
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1270
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1271
browseSendersOfIt
10262
39688cd73dff Merged with JV's branch
vrany
parents: 10245
diff changeset
  1272
39688cd73dff Merged with JV's branch
vrany
parents: 10245
diff changeset
  1273
    textView browseSendersOfIt
39688cd73dff Merged with JV's branch
vrany
parents: 10245
diff changeset
  1274
39688cd73dff Merged with JV's branch
vrany
parents: 10245
diff changeset
  1275
    "Modified: / 30-06-2011 / 19:22:57 / Jan Vrany <jan.vrany@fit.cvut.cz>"
9985
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1276
!
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1277
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1278
copySelection
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1279
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1280
    textView copySelection
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1281
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1282
    "Created: / 16-02-2010 / 19:36:37 / Jan Vrany <jan.vrany@fit.cvut.cz>"
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1283
!
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1284
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1285
cut
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1286
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1287
    textView cut
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1288
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1289
    "Created: / 16-02-2010 / 19:36:06 / Jan Vrany <jan.vrany@fit.cvut.cz>"
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1290
!
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1291
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1292
doIt
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1293
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1294
    textView doIt
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1295
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1296
    "Modified: / 16-02-2010 / 19:38:15 / Jan Vrany <jan.vrany@fit.cvut.cz>"
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1297
!
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1298
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1299
inspectIt
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1300
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1301
    textView inspectIt
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1302
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1303
    "Modified: / 16-02-2010 / 19:38:26 / Jan Vrany <jan.vrany@fit.cvut.cz>"
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1304
!
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1305
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1306
inspectSelectedSelector
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1307
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1308
    self error: 'Not yet implemented'
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1309
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1310
    "Modified: / 14-02-2010 / 15:58:15 / Jan Vrany <jan.vrany@fit.cvut.cz>"
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1311
!
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1312
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1313
inspectSyntaxElements
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1314
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1315
    syntaxElements inspect
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1316
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1317
    "Modified: / 14-02-2010 / 15:57:58 / Jan Vrany <jan.vrany@fit.cvut.cz>"
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1318
!
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1319
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1320
inspectView
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1321
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1322
    self inspect
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1323
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1324
    "Modified: / 25-03-2010 / 17:58:10 / Jan Vrany <jan.vrany@fit.cvut.cz>"
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1325
!
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1326
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1327
pasteOrReplace
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1328
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1329
    textView pasteOrReplace
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1330
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1331
    "Created: / 16-02-2010 / 19:37:08 / Jan Vrany <jan.vrany@fit.cvut.cz>"
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1332
!
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1333
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1334
printIt
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1335
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1336
    textView printIt
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1337
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1338
    "Modified: / 16-02-2010 / 19:38:05 / Jan Vrany <jan.vrany@fit.cvut.cz>"
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1339
!
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1340
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1341
profileIt
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1342
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1343
    textView profileIt
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1344
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1345
    "Created: / 27-08-2010 / 22:12:42 / Jan Vrany <jan.vrany@fit.cvut.cz>"
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1346
!
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1347
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1348
undo
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1349
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1350
    textView undo
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1351
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1352
    "Created: / 16-02-2010 / 19:35:50 / Jan Vrany <jan.vrany@fit.cvut.cz>"
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1353
! !
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1354
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1355
!CodeView2 methodsFor:'menus-dynamic'!
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1356
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1357
editMenu
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1358
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1359
    | editMenu superEditMenu moreMenu moreMenuItem showGutterItem |
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1360
    editMenu := self class editMenu decodeAsLiteralArray.
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1361
    superEditMenu := textView superEditMenu.
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1362
    moreMenu := superEditMenu subMenuAt: superEditMenu numberOfItems.
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1363
    moreMenuItem := editMenu menuItemLabeled: 'More'.
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1364
    showGutterItem := editMenu atNameKey: #ShowGutter.
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1365
    showGutterItem indication: showGutterChannel.
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1366
    moreMenuItem submenu: moreMenu asMenu.
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1367
    editMenu findGuiResourcesIn: self.
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1368
    ^editMenu
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1369
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1370
    "Created: / 25-12-2007 / 10:10:01 / janfrog"
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1371
    "Modified: / 25-12-2007 / 19:50:53 / janfrog"
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1372
    "Modified: / 18-10-2008 / 20:31:16 / Jan Vrany <vranyj1@fel.cvut.cz>"
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1373
    "Modified: / 23-06-2010 / 19:13:22 / Jan Vrany <jan.vrany@fit.cvut.cz>"
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1374
!
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1375
10262
39688cd73dff Merged with JV's branch
vrany
parents: 10245
diff changeset
  1376
implementorsMenu
39688cd73dff Merged with JV's branch
vrany
parents: 10245
diff changeset
  1377
39688cd73dff Merged with JV's branch
vrany
parents: 10245
diff changeset
  1378
    | selectorAndSelectedText selector selectedText  implementors |
39688cd73dff Merged with JV's branch
vrany
parents: 10245
diff changeset
  1379
39688cd73dff Merged with JV's branch
vrany
parents: 10245
diff changeset
  1380
    selectedText := textView selectionAsString.
39688cd73dff Merged with JV's branch
vrany
parents: 10245
diff changeset
  1381
    selectedText size > 0 ifTrue:[
39688cd73dff Merged with JV's branch
vrany
parents: 10245
diff changeset
  1382
        self windowGroup withWaitCursorDo:[
39688cd73dff Merged with JV's branch
vrany
parents: 10245
diff changeset
  1383
            selectorAndSelectedText := self extractSelectorAndSelectedTextFrom:  selectedText.
39688cd73dff Merged with JV's branch
vrany
parents: 10245
diff changeset
  1384
            selector := selectorAndSelectedText first.
39688cd73dff Merged with JV's branch
vrany
parents: 10245
diff changeset
  1385
            selectedText := selectorAndSelectedText second.
39688cd73dff Merged with JV's branch
vrany
parents: 10245
diff changeset
  1386
39688cd73dff Merged with JV's branch
vrany
parents: 10245
diff changeset
  1387
            (selector notNil and:[selector = selectedText]) ifTrue:[
39688cd73dff Merged with JV's branch
vrany
parents: 10245
diff changeset
  1388
                implementors := (SystemBrowser 
39688cd73dff Merged with JV's branch
vrany
parents: 10245
diff changeset
  1389
                                findImplementorsOfAny:(Array with:selectedText) 
39688cd73dff Merged with JV's branch
vrany
parents: 10245
diff changeset
  1390
                                in:(Smalltalk allClasses) 
39688cd73dff Merged with JV's branch
vrany
parents: 10245
diff changeset
  1391
                                ignoreCase:false)
39688cd73dff Merged with JV's branch
vrany
parents: 10245
diff changeset
  1392
39688cd73dff Merged with JV's branch
vrany
parents: 10245
diff changeset
  1393
                ] ifFalse:[
39688cd73dff Merged with JV's branch
vrany
parents: 10245
diff changeset
  1394
                implementors := (SystemBrowser 
39688cd73dff Merged with JV's branch
vrany
parents: 10245
diff changeset
  1395
                                findImplementorsOfAny:(Array with:selectedText with: selector) 
39688cd73dff Merged with JV's branch
vrany
parents: 10245
diff changeset
  1396
                                in:(Smalltalk allClasses) 
39688cd73dff Merged with JV's branch
vrany
parents: 10245
diff changeset
  1397
                                ignoreCase:false)
39688cd73dff Merged with JV's branch
vrany
parents: 10245
diff changeset
  1398
                ].
39688cd73dff Merged with JV's branch
vrany
parents: 10245
diff changeset
  1399
            ] 
39688cd73dff Merged with JV's branch
vrany
parents: 10245
diff changeset
  1400
    ] ifFalse:[
39688cd73dff Merged with JV's branch
vrany
parents: 10245
diff changeset
  1401
        implementors := #().
39688cd73dff Merged with JV's branch
vrany
parents: 10245
diff changeset
  1402
    ].
39688cd73dff Merged with JV's branch
vrany
parents: 10245
diff changeset
  1403
39688cd73dff Merged with JV's branch
vrany
parents: 10245
diff changeset
  1404
    ^self implementorsMenu: implementors selector: (selector ? selectedText)
39688cd73dff Merged with JV's branch
vrany
parents: 10245
diff changeset
  1405
39688cd73dff Merged with JV's branch
vrany
parents: 10245
diff changeset
  1406
    "Modified: / 19-10-2008 / 08:16:50 / Jan Vrany <vranyj1@fel.cvut.cz>"
39688cd73dff Merged with JV's branch
vrany
parents: 10245
diff changeset
  1407
    "Created: / 30-06-2011 / 19:28:14 / Jan Vrany <jan.vrany@fit.cvut.cz>"
39688cd73dff Merged with JV's branch
vrany
parents: 10245
diff changeset
  1408
!
39688cd73dff Merged with JV's branch
vrany
parents: 10245
diff changeset
  1409
9985
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1410
implementorsMenu: implementors selector: selector  
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1411
    | menu|
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1412
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1413
    menu := Menu new.
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1414
    implementors isNilOrEmptyCollection ifTrue:[
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1415
        menu addItem:(MenuItem label:'No implementors found') disable
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1416
    ] ifFalse:[
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1417
        menu addItem:(MenuItem 
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1418
                    label:(selector storeString , (' (all implementors) ') asText allItalic)
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1419
                    value:[
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1420
                        self browseMethods:implementors
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1421
                            label:'Implementors of ' , selector storeString
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1422
                    ]).
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1423
        menu addSeparator.
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1424
        implementors do:[:mth | 
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1425
            menu 
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1426
                addItem:(MenuItem label:(selector storeString 
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1427
                                , (' in ' , mth containingClass name asText allBold))
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1428
                        value:[ self browseMethod:mth label: 'Implementor of ' , selector storeString  ])
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1429
        ]
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1430
    ].
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1431
    ^ menu
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1432
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1433
    "Modified: / 19-10-2008 / 08:16:50 / Jan Vrany <vranyj1@fel.cvut.cz>"
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1434
    "Created: / 14-02-2010 / 19:39:37 / Jan Vrany <jan.vrany@fit.cvut.cz>"
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1435
!
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1436
10262
39688cd73dff Merged with JV's branch
vrany
parents: 10245
diff changeset
  1437
sendersMenu
39688cd73dff Merged with JV's branch
vrany
parents: 10245
diff changeset
  1438
39688cd73dff Merged with JV's branch
vrany
parents: 10245
diff changeset
  1439
    | selectorAndSelectedText selector selectedText  senders |
39688cd73dff Merged with JV's branch
vrany
parents: 10245
diff changeset
  1440
39688cd73dff Merged with JV's branch
vrany
parents: 10245
diff changeset
  1441
    selectedText := textView selectionAsString.
39688cd73dff Merged with JV's branch
vrany
parents: 10245
diff changeset
  1442
    selectedText size > 0 ifTrue:[
39688cd73dff Merged with JV's branch
vrany
parents: 10245
diff changeset
  1443
        self windowGroup withWaitCursorDo:[
39688cd73dff Merged with JV's branch
vrany
parents: 10245
diff changeset
  1444
            selectorAndSelectedText := self extractSelectorAndSelectedTextFrom:  selectedText.
39688cd73dff Merged with JV's branch
vrany
parents: 10245
diff changeset
  1445
            selector := selectorAndSelectedText first.
39688cd73dff Merged with JV's branch
vrany
parents: 10245
diff changeset
  1446
            selectedText := selectorAndSelectedText second.
39688cd73dff Merged with JV's branch
vrany
parents: 10245
diff changeset
  1447
39688cd73dff Merged with JV's branch
vrany
parents: 10245
diff changeset
  1448
            (selector notNil and:[selector = selectedText]) ifTrue:[
39688cd73dff Merged with JV's branch
vrany
parents: 10245
diff changeset
  1449
                senders := (SystemBrowser 
39688cd73dff Merged with JV's branch
vrany
parents: 10245
diff changeset
  1450
                                findSendersOfAny:(Array with:selectedText) 
39688cd73dff Merged with JV's branch
vrany
parents: 10245
diff changeset
  1451
                                in:(Smalltalk allClasses) 
39688cd73dff Merged with JV's branch
vrany
parents: 10245
diff changeset
  1452
                                ignoreCase:false)
39688cd73dff Merged with JV's branch
vrany
parents: 10245
diff changeset
  1453
39688cd73dff Merged with JV's branch
vrany
parents: 10245
diff changeset
  1454
                ] ifFalse:[
39688cd73dff Merged with JV's branch
vrany
parents: 10245
diff changeset
  1455
                senders := (SystemBrowser 
39688cd73dff Merged with JV's branch
vrany
parents: 10245
diff changeset
  1456
                                findSendersOfAny:(Array with:selectedText with: selector) 
39688cd73dff Merged with JV's branch
vrany
parents: 10245
diff changeset
  1457
                                in:(Smalltalk allClasses) 
39688cd73dff Merged with JV's branch
vrany
parents: 10245
diff changeset
  1458
                                ignoreCase:false)
39688cd73dff Merged with JV's branch
vrany
parents: 10245
diff changeset
  1459
                ].
39688cd73dff Merged with JV's branch
vrany
parents: 10245
diff changeset
  1460
            ] 
39688cd73dff Merged with JV's branch
vrany
parents: 10245
diff changeset
  1461
    ] ifFalse:[
39688cd73dff Merged with JV's branch
vrany
parents: 10245
diff changeset
  1462
        senders := #().
39688cd73dff Merged with JV's branch
vrany
parents: 10245
diff changeset
  1463
    ].
39688cd73dff Merged with JV's branch
vrany
parents: 10245
diff changeset
  1464
39688cd73dff Merged with JV's branch
vrany
parents: 10245
diff changeset
  1465
    ^self sendersMenu: senders selector: (selector ? selectedText)
39688cd73dff Merged with JV's branch
vrany
parents: 10245
diff changeset
  1466
39688cd73dff Merged with JV's branch
vrany
parents: 10245
diff changeset
  1467
    "Modified: / 19-10-2008 / 08:16:50 / Jan Vrany <vranyj1@fel.cvut.cz>"
39688cd73dff Merged with JV's branch
vrany
parents: 10245
diff changeset
  1468
    "Created: / 30-06-2011 / 19:28:14 / Jan Vrany <jan.vrany@fit.cvut.cz>"
39688cd73dff Merged with JV's branch
vrany
parents: 10245
diff changeset
  1469
!
39688cd73dff Merged with JV's branch
vrany
parents: 10245
diff changeset
  1470
9985
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1471
sendersMenu: senders  selector: selector  
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1472
    | menu|
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1473
10262
39688cd73dff Merged with JV's branch
vrany
parents: 10245
diff changeset
  1474
    menu := Menu new.
9985
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1475
    senders isNilOrEmptyCollection ifTrue:[
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1476
        menu addItem:(MenuItem label:'No senders found') disable
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1477
    ] ifFalse:[
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1478
        menu addItem:(MenuItem 
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1479
                    label:(selector storeString , (' (all senders)') asText allItalic)
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1480
                    value:[
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1481
                        self browseMethods:senders
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1482
                            label:'Senders of ' , selector storeString
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1483
                    ]).
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1484
        menu addSeparator.
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1485
        senders do:[:mth | 
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1486
            menu 
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1487
                addItem:(MenuItem label:(mth selector storeString 
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1488
                                , (' in ' , mth containingClass name asText allBold))
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1489
                        value:[ self browseMethod:mth label: 'Sender of ' , selector storeString ])
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1490
        ]
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1491
    ].
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1492
    ^ menu
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1493
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1494
    "Modified: / 19-10-2008 / 08:17:00 / Jan Vrany <vranyj1@fel.cvut.cz>"
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1495
    "Created: / 14-02-2010 / 19:40:10 / Jan Vrany <jan.vrany@fit.cvut.cz>"
10262
39688cd73dff Merged with JV's branch
vrany
parents: 10245
diff changeset
  1496
    "Modified: / 07-07-2011 / 14:51:54 / jv"
9985
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1497
!
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1498
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1499
servicesMenu
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1500
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1501
    | menu |
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1502
    menu := Menu new.
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1503
    services do:
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1504
        [ :service | | item |
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1505
        item := MenuItem label: service label.
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1506
        item indication:
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1507
            ((AspectAdaptor forAspect: #enabled) subject: service).
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1508
        menu addItem: item].
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1509
    ^menu
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1510
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1511
    "Created: / 07-03-2010 / 14:03:00 / Jan Vrany <jan.vrany@fit.cvut.cz>"
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1512
! !
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1513
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1514
!CodeView2 methodsFor:'private'!
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1515
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1516
codeCompletion
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1517
    |cls 
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1518
"/     crsrPos interval node checkedNode
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1519
"/     char start stop selectorSoFar matchingSelectors
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1520
    |
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1521
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1522
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1523
    cls := self classHolder value.
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1524
    cls isNil ifTrue:[
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1525
        self showInfo:'No class'.
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1526
        ^ self.
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1527
    ].
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1528
    UserInformation handle:[:ex |
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1529
        self showInfo:(ex messageText).
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1530
        ex proceed.
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1531
    ] do:[
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1532
        self withWaitCursorDo:[
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1533
            DoWhatIMeanSupport codeCompletionForClass:cls codeView:self.
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1534
        ]
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1535
    ].
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1536
    ^ self.
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1537
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1538
"/
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1539
"/    interval := self selectedInterval.
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1540
"/    interval isEmpty ifTrue:[
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1541
"/        crsrPos := codeView characterPositionOfCursor - 1.
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1542
"/        char := codeView characterUnderCursor.
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1543
"/        [crsrPos > 1 and:[char isSeparator or:['.' includes:char]]] whileTrue:[
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1544
"/            crsrPos := crsrPos - 1.
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1545
"/            char := codeView characterAtCharacterPosition:crsrPos.
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1546
"/        ].
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1547
"/        interval := crsrPos to:crsrPos.
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1548
"/    ].
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1549
"/
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1550
"/    node := self findNodeForInterval:interval allowErrors:true.
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1551
"/    [node isNil] whileTrue:[
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1552
"/        "/ expand to the left ...
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1553
"/        interval start > 1 ifFalse:[
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1554
"/            self showInfo:'No parseNode found'.
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1555
"/            ^ self.
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1556
"/        ].
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1557
"/        interval start:(interval start - 1).
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1558
"/        node := self findNodeForInterval:interval allowErrors:true.
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1559
"/    ].
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1560
"/
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1561
"/    node isVariable ifTrue:[
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1562
"/        self codeCompletionForVariable:node inClass:cls.
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1563
"/        ^ self.
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1564
"/    ].
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1565
"/
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1566
"/    checkedNode := node.
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1567
"/    [checkedNode notNil] whileTrue:[
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1568
"/        checkedNode isMessage ifTrue:[
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1569
"/            self codeCompletionForMessage:checkedNode inClass:cls.
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1570
"/            ^ self
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1571
"/        ].
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1572
"/        checkedNode isMethod ifTrue:[
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1573
"/            self codeCompletionForMethod:checkedNode inClass:cls.
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1574
"/            ^ self.
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1575
"/        ].
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1576
"/        checkedNode := checkedNode parent.
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1577
"/    ].
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1578
"/
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1579
"/    self showInfo:'Node is neither variable nor message.'.
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1580
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1581
    "Modified: / 04-07-2006 / 18:48:26 / fm"
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1582
    "Modified: / 20-11-2006 / 12:30:59 / cg"
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1583
    "Modified: / 16-02-2010 / 10:53:07 / Jan Vrany <jan.vrany@fit.cvut.cz>"
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1584
!
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1585
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1586
reallyModified
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1587
    "check for modified code by comparing the source against
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1588
     the codeViews contents.
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1589
     Thats the true modified value (in case user undid its changes,
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1590
     and the displayed text is actually original"
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1591
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1592
    |modified changedSource originalSource s1 s2|
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1593
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1594
    textView modified ifTrue:[^true].
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1595
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1596
    "/ higher prio to prevent it from being changed while we convert it (by editing)
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1597
    Processor activeProcess
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1598
        withHigherPriorityDo:[
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1599
            changedSource :=  textView contentsAsString asStringCollection.
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1600
        ].
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1601
    changedSource := changedSource collect:[:line | line string withoutTrailingSeparators withTabsExpanded].
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1602
    changedSource := changedSource collect:[:line | line isEmpty ifTrue:[nil] ifFalse:[line]].
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1603
    [changedSource size > 0 and:[changedSource last isNil]] whileTrue:[
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1604
        changedSource := changedSource copyWithoutLast:1
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1605
    ].
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1606
    changedSource := changedSource asString.
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1607
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1608
        originalSource := textView model value ? ''.
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1609
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1610
        originalSource := originalSource asStringCollection.
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1611
        originalSource := originalSource collect:[:line | line string withoutTrailingSeparators withTabsExpanded].
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1612
        originalSource := originalSource collect:[:line | line isEmpty ifTrue:[nil] ifFalse:[line]].
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1613
        [originalSource size > 0 and:[originalSource last isNil]] whileTrue:[
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1614
            originalSource := originalSource copyWithoutLast:1
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1615
        ].
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1616
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1617
        s1 := originalSource asString.
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1618
        s2 := changedSource asString.
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1619
        modified := (s1 ~= s2).
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1620
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1621
    ^ modified
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1622
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1623
    "Created: / 06-02-2010 / 19:59:37 / Jan Vrany <jan.vrany@fit.cvut.cz>"
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1624
!
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1625
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1626
showInfo: message
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1627
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1628
    | app |
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1629
    (app := self topView application) ifNotNil:
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1630
        [(app respondsTo: #showInfo:) ifTrue:
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1631
            [app showInfo: message]].
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1632
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1633
    "Modified: / 13-02-2010 / 23:25:53 / Jan Vrany <jan.vrany@fit.cvut.cz>"
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1634
! !
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1635
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1636
!CodeView2 methodsFor:'private-accessing'!
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1637
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1638
gutterView
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1639
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1640
    ^gutterView
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1641
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1642
    "Created: / 14-02-2010 / 15:21:27 / Jan Vrany <jan.vrany@fit.cvut.cz>"
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1643
!
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1644
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1645
syntaxElementSelection
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1646
    ^ syntaxElementSelection
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1647
!
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1648
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1649
syntaxElementSelection:something
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1650
    syntaxElementSelection := something.
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1651
!
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1652
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1653
syntaxElements
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1654
    ^ syntaxElements
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1655
!
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1656
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1657
syntaxElements:something
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1658
    syntaxElements := something.
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1659
!
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1660
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1661
textView
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1662
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1663
    ^textView
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1664
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1665
    "Created: / 14-02-2010 / 15:21:12 / Jan Vrany <jan.vrany@fit.cvut.cz>"
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1666
!
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1667
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1668
textViewScroller
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1669
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1670
    ^textViewScroller
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1671
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1672
    "Created: / 14-02-2010 / 15:21:18 / Jan Vrany <jan.vrany@fit.cvut.cz>"
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1673
! !
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1674
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1675
!CodeView2 methodsFor:'queries'!
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1676
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1677
isCodeView2
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1678
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1679
    ^true
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1680
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1681
    "Created: / 20-07-2010 / 15:43:05 / Jan Vrany <jan.vrany@fit.cvut.cz>"
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1682
! !
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1683
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1684
!CodeView2 methodsFor:'services'!
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1685
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1686
registerService: aCodeViewService
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1687
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1688
    services add: aCodeViewService.
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1689
    aCodeViewService registerIn: self
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1690
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1691
    "Created: / 06-03-2010 / 19:19:40 / Jan Vrany <jan.vrany@fit.cvut.cz>"
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1692
!
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1693
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1694
underService: aCodeViewService
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1695
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1696
    services remove: aCodeViewService ifAbsent:[^self].
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1697
    aCodeViewService unregister.
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1698
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1699
    "Created: / 06-03-2010 / 19:21:10 / Jan Vrany <jan.vrany@fit.cvut.cz>"
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1700
! !
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1701
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1702
!CodeView2 methodsFor:'testing'!
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1703
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1704
isTextView
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1705
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1706
    ^true
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1707
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1708
    "Created: / 14-02-2010 / 22:13:37 / Jan Vrany <jan.vrany@fit.cvut.cz>"
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1709
! !
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1710
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1711
!CodeView2::GutterView methodsFor:'accessing'!
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1712
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1713
setTextView: aTextView
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1714
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1715
    self assert: textView isNil message:'Attempting to set textView twice'.
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1716
    textView := aTextView.
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1717
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1718
    self backgroundPaint: textView backgroundPaint darkened lighter.
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1719
    self paint: textView paint.
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1720
    self font: textView font.
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1721
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1722
    "Created: / 02-09-2009 / 21:55:43 / Jan Vrany <jan.vrany@fit.cvut.cz>"
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1723
    "Modified: / 14-12-2009 / 15:09:29 / Jindra <a>"
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1724
    "Modified: / 09-02-2010 / 20:03:06 / Jan Vrany <jan.vrany@fit.cvut.cz>"
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1725
!
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1726
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1727
setTextViewScroller:aScr
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1728
    textViewScroller := aScr.
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1729
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1730
    "Created: / 07-12-2009 / 22:36:31 / Jindra <a>"
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1731
! !
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1732
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1733
!CodeView2::GutterView methodsFor:'accessing-dimensions'!
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1734
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1735
padding
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1736
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1737
    ^self paddingLeft + self paddingRight 
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1738
        + (widthAnnotations ? 0) 
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1739
        + (widthDiffInfo ? 0)
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1740
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1741
    "Created: / 14-02-2010 / 22:28:57 / Jan Vrany <jan.vrany@fit.cvut.cz>"
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1742
    "Modified: / 16-06-2011 / 14:01:08 / Jan Vrany <jan.vrany@fit.cvut.cz>"
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1743
!
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1744
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1745
paddingLeft
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1746
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1747
    ^0"px"
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1748
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1749
    "Created: / 14-02-2010 / 22:27:17 / Jan Vrany <jan.vrany@fit.cvut.cz>"
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1750
    "Modified: / 16-06-2011 / 13:47:53 / Jan Vrany <jan.vrany@fit.cvut.cz>"
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1751
!
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1752
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1753
paddingRight
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1754
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1755
    ^0"px"
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1756
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1757
    "Created: / 14-02-2010 / 22:27:22 / Jan Vrany <jan.vrany@fit.cvut.cz>"
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1758
    "Modified: / 16-06-2011 / 13:47:30 / Jan Vrany <jan.vrany@fit.cvut.cz>"
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1759
!
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1760
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1761
preferredExtent
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1762
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1763
    | w h |
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1764
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1765
    explicitExtent ifNotNil:[^explicitExtent].
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1766
    preferredExtent ifNotNil:[^preferredExtent].
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1767
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1768
    w := (self font widthOf:'00') + self padding.
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1769
    h := textView ifNotNil:[textView height] ifNil:[self font height * 12].
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1770
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1771
    ^preferredExtent := w @ h
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1772
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1773
    "Modified: / 16-06-2011 / 14:03:11 / Jan Vrany <jan.vrany@fit.cvut.cz>"
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1774
! !
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1775
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1776
!CodeView2::GutterView methodsFor:'change & update'!
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1777
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1778
update:something with:aParameter from:changedObject
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1779
    "Invoked when an object that I depend upon sends a change notification."
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1780
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1781
    self shown ifFalse:[^self].
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1782
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1783
    (changedObject == textView and: [something == #sizeOfContents])
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1784
        ifTrue:[^self invalidate].
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1785
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1786
    "/ changedObject == someOfMyValueHolders ifTrue:[
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1787
    "/     self doSomethingApropriate.
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1788
    "/     ^ self.
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1789
    "/ ].
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1790
    super update:something with:aParameter from:changedObject
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1791
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1792
    "Modified: / 23-06-2010 / 19:01:21 / Jan Vrany <jan.vrany@fit.cvut.cz>"
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1793
! !
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1794
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1795
!CodeView2::GutterView methodsFor:'event handling'!
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1796
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1797
buttonPress: btn x: x y: y
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1798
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1799
    "Do not allow clicking on line numbers..."
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1800
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1801
    ((x < (self paddingLeft + widthAnnotations)) or:
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1802
        [x > (self width - self paddingRight - widthDiffInfo)])
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1803
        ifTrue:[
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1804
            (codeView buttonPress: btn x:x y:y in: self)
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1805
                ifFalse:[super buttonPress: btn x: x y: y]
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1806
        ] ifFalse:[
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1807
            super buttonPress: btn x: x y: y
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1808
        ]
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1809
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1810
    "Created: / 17-06-2011 / 13:02:54 / Jan Vrany <jan.vrany@fit.cvut.cz>"
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1811
! !
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1812
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1813
!CodeView2::GutterView methodsFor:'initialization'!
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1814
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1815
initialize
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1816
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1817
    super initialize.
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1818
    widthAnnotations := 16.
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1819
    widthDiffInfo := 5.
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1820
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1821
    "Created: / 16-06-2011 / 13:47:10 / Jan Vrany <jan.vrany@fit.cvut.cz>"
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1822
!
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1823
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1824
setCodeView: aCodeView2
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1825
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1826
    codeView := aCodeView2.
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1827
    codeView addDependent: self.
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1828
    textView := aCodeView2 textView.
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1829
    textView addDependent: self.
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1830
    textViewScroller := aCodeView2 textViewScroller.
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1831
    self backgroundPaint: (textView backgroundPaint blendWith: (Color gray:80)).
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1832
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1833
    "Created: / 14-02-2010 / 15:19:40 / Jan Vrany <jan.vrany@fit.cvut.cz>"
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1834
    "Modified: / 17-06-2011 / 12:43:33 / Jan Vrany <jan.vrany@fit.cvut.cz>"
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1835
! !
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1836
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1837
!CodeView2::GutterView methodsFor:'queries'!
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1838
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1839
displayedString: line
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1840
    "get text to display in gutter for specified list line number"
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1841
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1842
    ^(line asString).
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1843
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1844
    "Created: / 14-12-2009 / 13:37:47 / Jindra <a>"
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1845
!
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1846
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1847
firstLineShown
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1848
    "returns first line shown by associated text view"
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1849
    ^textView firstLineShown.
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1850
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1851
    "Created: / 14-12-2009 / 13:22:54 / Jindra <a>"
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1852
!
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1853
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1854
lastLineShown
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1855
    "returns last line shown by associated text view"
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1856
    ^textView lastLineShown.
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1857
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1858
    "Created: / 14-12-2009 / 13:23:07 / Jindra <a>"
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1859
!
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1860
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1861
lineColor:line
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1862
    "return special color for given line if required, nil otherwise"
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1863
    "used only if lineFont return nil"
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1864
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1865
    ^nil
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1866
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1867
    "Created: / 14-12-2009 / 15:01:31 / Jindra <a>"
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1868
!
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1869
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1870
lineDisplayable:line
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1871
    "true if this list line can be displayed"
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1872
    ^(textView listLineIsVisible:line)
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1873
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1874
    "Created: / 14-12-2009 / 13:38:23 / Jindra <a>"
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1875
!
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1876
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1877
lineFont:line
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1878
    "return special font for given line if required, nil otherwise"
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1879
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1880
    ^nil
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1881
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1882
    "Created: / 14-12-2009 / 14:40:17 / Jindra <a>"
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1883
!
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1884
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1885
yOfTextViewLine:line
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1886
    ^(textView yOfLine:line) + 1
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1887
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1888
    "Created: / 14-12-2009 / 13:35:07 / Jindra <a>"
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1889
! !
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1890
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1891
!CodeView2::GutterView methodsFor:'redrawing'!
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1892
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1893
redrawBackgroundX:x y:y width:w height:h
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1894
    "redraws gutter background"
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1895
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1896
    "background is filled with background color"
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1897
    self 
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1898
        fillRectangleX:x
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1899
        y:y
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1900
        width:w
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1901
        height:h
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1902
        color: self backgroundPaint.
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1903
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1904
    "separator line is drawn with foreground color"
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1905
    self 
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1906
        displayLineFromX:(self width - 2)
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1907
        y:y
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1908
        toX:(self width - 2)
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1909
        y:(y+h).
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1910
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1911
    "Created: / 14-12-2009 / 13:15:53 / Jindra <a>"
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1912
    "Modified: / 14-12-2009 / 15:09:54 / Jindra <a>"
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1913
!
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1914
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1915
redrawLine:line 
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1916
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1917
    ^self redrawLine:line cleared: false.
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1918
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1919
    "Modified: / 17-06-2011 / 14:12:31 / Jan Vrany <jan.vrany@fit.cvut.cz>"
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1920
!
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1921
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1922
redrawLine:line cleared: cleared
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1923
    "redraws specified line. Returns width of drawn object. Color of drawn objects should be taken from lineFont, lineColor"
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1924
    
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1925
    |lineString y0 textW requiredW oldFont newFont oldColor newColor|
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1926
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1927
    lineString := self displayedString:line.
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1928
    textW := (lineString widthOn:self).
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1929
    requiredW := textW + self padding.
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1930
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1931
    oldFont := self font.
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1932
    oldColor := self paint.
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1933
    newFont := self lineFont:line.
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1934
    newFont 
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1935
        ifNotNil:[ self font:newFont. ]
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1936
        ifNil:[
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1937
            newColor := self lineColor:line.
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1938
            newColor ifNotNil:[ self paint:newColor ].
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1939
        ].
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1940
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1941
    y0 := (self yOfTextViewLine:line) + ((self font) ascentOn:device).
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1942
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1943
    cleared ifFalse:[
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1944
        self clearRectangleX:0 y:y0 - font height width: self width - 2 height: font height + font descent.
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1945
    ].
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1946
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1947
    "Let the services to draw annotations and other stuff"
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1948
    codeView
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1949
        drawLine:line in: self 
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1950
        atX: self paddingLeft y:y0 width: widthAnnotations height: font height
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1951
        from:nil to:nil with:self paint and: self backgroundColor.
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1952
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1953
    self 
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1954
        displayString:lineString
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1955
        x:(self width - textW - self paddingRight - widthDiffInfo)
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1956
        y:y0.
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1957
    newFont 
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1958
        ifNotNil:[
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1959
            self font:oldFont.
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1960
            self paint:oldColor
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1961
        ]
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1962
        ifNil:[ newColor ifNotNil:[ self paint:oldColor ]. ].
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1963
    ^ requiredW.
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1964
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1965
    "Modified: / 14-12-2009 / 15:30:44 / Jindra <a>"
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1966
    "Created: / 17-06-2011 / 14:11:45 / Jan Vrany <jan.vrany@fit.cvut.cz>"
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1967
!
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1968
10224
eb799692952b More improvements in BreakpointService
vrany
parents: 10072
diff changeset
  1969
redrawLinesFrom:start
eb799692952b More improvements in BreakpointService
vrany
parents: 10072
diff changeset
  1970
eb799692952b More improvements in BreakpointService
vrany
parents: 10072
diff changeset
  1971
    start to: (self lastLineShown - 1 min: textView list size) do:[:line|
eb799692952b More improvements in BreakpointService
vrany
parents: 10072
diff changeset
  1972
        self redrawLine:line cleared: false.
eb799692952b More improvements in BreakpointService
vrany
parents: 10072
diff changeset
  1973
    ]
eb799692952b More improvements in BreakpointService
vrany
parents: 10072
diff changeset
  1974
eb799692952b More improvements in BreakpointService
vrany
parents: 10072
diff changeset
  1975
    "Modified: / 17-06-2011 / 14:12:31 / Jan Vrany <jan.vrany@fit.cvut.cz>"
eb799692952b More improvements in BreakpointService
vrany
parents: 10072
diff changeset
  1976
    "Created: / 06-07-2011 / 17:25:36 / jv"
eb799692952b More improvements in BreakpointService
vrany
parents: 10072
diff changeset
  1977
!
eb799692952b More improvements in BreakpointService
vrany
parents: 10072
diff changeset
  1978
9985
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1979
redrawX:x y:y width:w height:h 
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1980
    |first last requiredW currentW |
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1981
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1982
    self redrawBackgroundX:x y:y width:w height:h.
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1983
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1984
    first := self firstLineShown.
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1985
    last := self lastLineShown - 1 min: textView list size.
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1986
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1987
    currentW := requiredW := self width.
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1988
    first to:last do:
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1989
        [:line | 
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1990
        requiredW := requiredW max: (self redrawLine:line cleared: true)].
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1991
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1992
    (requiredW > self width) ifTrue:[
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1993
        self corner:(requiredW @ 1.0).
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1994
        textViewScroller origin:(requiredW @ 0.0) corner:(1.0 @ 1.0).
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1995
        self invalidate.
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1996
    ].
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1997
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1998
    "Created: / 03-09-2009 / 08:22:55 / Jan Vrany <jan.vrany@fit.cvut.cz>"
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1999
    "Modified: / 14-12-2009 / 14:13:14 / Jindra <a>"
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2000
    "Modified: / 17-06-2011 / 14:14:26 / Jan Vrany <jan.vrany@fit.cvut.cz>"
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2001
! !
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2002
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2003
!CodeView2::TextView methodsFor:'accessing'!
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2004
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2005
changedDiffText
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2006
    ^ changedDiffText
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2007
!
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2008
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2009
changedDiffText:something
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2010
    changedDiffText := something.
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2011
!
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2012
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2013
changedLines
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2014
    ^ changedLines
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2015
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2016
    "Created: / 26-04-2010 / 20:30:32 / Jakub <zelenja7@fel.cvut.cz>"
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2017
    "Modified: / 26-04-2010 / 21:48:13 / Jakub <zelenja7@fel.cvut.cz>"
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2018
!
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2019
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2020
changedLines:something 
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2021
    changedLines := something.
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2022
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2023
    "Created: / 26-04-2010 / 20:30:19 / Jakub <zelenja7@fel.cvut.cz>"
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2024
    "Modified: / 02-05-2010 / 19:13:32 / Jakub <zelenja7@fel.cvut.cz>"
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2025
!
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2026
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2027
deletedLines
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2028
    ^  deletedLines
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2029
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2030
    "Modified: / 26-04-2010 / 21:48:23 / Jakub <zelenja7@fel.cvut.cz>"
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2031
!
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2032
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2033
deletedLines:something
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2034
deletedLines:=something.
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2035
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2036
    "Modified: / 26-04-2010 / 21:48:54 / Jakub <zelenja7@fel.cvut.cz>"
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2037
!
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2038
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2039
diffMode
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2040
    ^ diffMode
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2041
!
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2042
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2043
diffMode:something
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2044
    diffMode := something.
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2045
!
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2046
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2047
emptyLines
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2048
    ^ emptyLines
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2049
!
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2050
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2051
emptyLines:something
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2052
    emptyLines := something.
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2053
!
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2054
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2055
insertedLines
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2056
    ^  insertedLines
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2057
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2058
    "Modified: / 26-04-2010 / 21:48:27 / Jakub <zelenja7@fel.cvut.cz>"
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2059
!
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2060
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2061
insertedLines:something
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2062
insertedLines:=something.
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2063
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2064
    "Modified: / 26-04-2010 / 21:48:59 / Jakub <zelenja7@fel.cvut.cz>"
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2065
!
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2066
10245
1a1b298637d1 Attempt to fix the accept/cancel bar - no success.
vrany
parents: 10224
diff changeset
  2067
modifiedChannel: aValueHolder
1a1b298637d1 Attempt to fix the accept/cancel bar - no success.
vrany
parents: 10224
diff changeset
  2068
1a1b298637d1 Attempt to fix the accept/cancel bar - no success.
vrany
parents: 10224
diff changeset
  2069
    super modifiedChannel: aValueHolder
1a1b298637d1 Attempt to fix the accept/cancel bar - no success.
vrany
parents: 10224
diff changeset
  2070
1a1b298637d1 Attempt to fix the accept/cancel bar - no success.
vrany
parents: 10224
diff changeset
  2071
    "Created: / 07-07-2011 / 12:27:11 / Jan Vrany <jan.vrant@fit.cvut,cz>"
1a1b298637d1 Attempt to fix the accept/cancel bar - no success.
vrany
parents: 10224
diff changeset
  2072
!
1a1b298637d1 Attempt to fix the accept/cancel bar - no success.
vrany
parents: 10224
diff changeset
  2073
9985
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2074
originDiffText
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2075
    ^ originDiffText
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2076
!
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2077
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2078
originDiffText:something
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2079
    originDiffText := something.
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2080
! !
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2081
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2082
!CodeView2::TextView methodsFor:'accessing - colors'!
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2083
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2084
colorChanged
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2085
    ^ Color redByte:240 greenByte: 192 blueByte: 192
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2086
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2087
    "Modified: / 24-06-2010 / 14:05:03 / Jan Vrany <jan.vrany@fit.cvut.cz>"
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2088
!
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2089
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2090
colorDeleted
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2091
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2092
    ^ self colorInserted.
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2093
    
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2094
    "/^ Color pink
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2095
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2096
    "Modified: / 24-06-2010 / 14:16:42 / Jan Vrany <jan.vrany@fit.cvut.cz>"
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2097
!
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2098
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2099
colorInserted
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2100
    ^ Color redByte: 239 greenByte: 225 blueByte: 152
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2101
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2102
    "Modified: / 24-06-2010 / 14:13:14 / Jan Vrany <jan.vrany@fit.cvut.cz>"
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2103
! !
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2104
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2105
!CodeView2::TextView methodsFor:'actions'!
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2106
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2107
cancel
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2108
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2109
    self halt.
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2110
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2111
    "Created: / 08-02-2010 / 09:29:43 / Jan Vrany <jan.vrany@fit.cvut.cz>"
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2112
! !
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2113
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2114
!CodeView2::TextView methodsFor:'drawing'!
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2115
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2116
drawFromVisibleLine:startVisLineNr to:endVisLineNr with:fg and:bg 
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2117
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2118
    super 
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2119
        drawFromVisibleLine:startVisLineNr
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2120
        to:endVisLineNr
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2121
        with:fg
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2122
        and:bg.
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2123
    self redrawLines.
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2124
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2125
    "Created: / 05-04-2010 / 12:08:38 / Jakub <zelenja7@fel.cvut.cz>"
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2126
    "Modified: / 02-05-2010 / 18:46:04 / Jakub <zelenja7@fel.cvut.cz>"
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2127
!
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2128
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2129
drawLine:line fromX:x inVisible:visLineNr with:fg and:bg 
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2130
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2131
    super 
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2132
        drawLine:line
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2133
        fromX:x
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2134
        inVisible:visLineNr
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2135
        with:fg
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2136
        and:bg.
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2137
    self redrawLines.
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2138
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2139
    "Created: / 05-04-2010 / 12:07:07 / Jakub <zelenja7@fel.cvut.cz>"
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2140
    "Modified: / 02-05-2010 / 18:46:00 / Jakub <zelenja7@fel.cvut.cz>"
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2141
!
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2142
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2143
drawLine:lineStringArg inVisible:visLineNr col:col with:fg and:bg 
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2144
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2145
    super 
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2146
        drawLine:lineStringArg
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2147
        inVisible:visLineNr
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2148
        col:col
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2149
        with:fg
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2150
        and:bg.
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2151
    self redrawLines.
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2152
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2153
    "Created: / 05-04-2010 / 11:49:42 / Jakub <zelenja7@fel.cvut.cz>"
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2154
    "Modified: / 02-05-2010 / 18:45:56 / Jakub <zelenja7@fel.cvut.cz>"
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2155
!
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2156
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2157
drawLine:lineStringArg inVisible:visLineNr from:startCol to:endColOrNil with:fg and:bg 
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2158
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2159
    super 
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2160
        drawLine:lineStringArg
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2161
        inVisible:visLineNr
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2162
        from:startCol
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2163
        to:endColOrNil
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2164
        with:fg
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2165
        and:bg.
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2166
    self redrawLines.
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2167
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2168
    "Created: / 05-04-2010 / 11:54:54 / Jakub <zelenja7@fel.cvut.cz>"
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2169
    "Modified: / 02-05-2010 / 18:45:52 / Jakub <zelenja7@fel.cvut.cz>"
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2170
!
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2171
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2172
drawLine:lineString inVisible:visLineNr from:startCol with:fg and:bg 
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2173
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2174
    super 
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2175
        drawLine:lineString
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2176
        inVisible:visLineNr
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2177
        from:startCol
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2178
        with:fg
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2179
        and:bg.
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2180
    self redrawLines.
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2181
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2182
    "Created: / 05-04-2010 / 11:54:26 / Jakub <zelenja7@fel.cvut.cz>"
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2183
    "Modified: / 02-05-2010 / 18:45:48 / Jakub <zelenja7@fel.cvut.cz>"
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2184
!
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2185
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2186
drawVisibleLine:visLineNr with:fg and:bg 
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2187
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2188
    super 
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2189
        drawVisibleLine:visLineNr
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2190
        with:fg
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2191
        and:bg.
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2192
    self redrawLines.
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2193
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2194
    "Created: / 05-04-2010 / 11:49:42 / Jakub <zelenja7@fel.cvut.cz>"
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2195
    "Modified: / 02-05-2010 / 18:45:44 / Jakub <zelenja7@fel.cvut.cz>"
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2196
!
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2197
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2198
redraw
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2199
    "/ thisContext fullPrintAll.   
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2200
    super redraw.
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2201
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2202
    "Created: / 30-06-2011 / 11:04:32 / cg"
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2203
!
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2204
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2205
redrawLines
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2206
    |i pom|
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2207
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2208
    diffMode ifFalse:[^self].
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2209
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2210
    pom := self hasSelection.
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2211
    (pom) ifTrue:[ ^ self. ].
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2212
    i := 1.
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2213
    [
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2214
        i <= (deletedLines size)
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2215
    ] whileTrue:[
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2216
        ((deletedLines at:i) > 0) ifTrue:[
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2217
            super 
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2218
                drawVisibleLine:(deletedLines at:i)
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2219
                with:fgColor
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2220
                and:self colorDeleted.
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2221
        ].
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2222
        i := i + 1.
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2223
    ].
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2224
    i := 1.
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2225
    [
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2226
        i <= (insertedLines size)
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2227
    ] whileTrue:[
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2228
        ((insertedLines at:i) > 0) ifTrue:[
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2229
            super 
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2230
                drawVisibleLine:(insertedLines at:i)
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2231
                with:fgColor
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2232
                and:self colorInserted.
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2233
        ].
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2234
        i := i + 1.
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2235
    ].
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2236
    i := 1.
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2237
    [
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2238
        i <= (changedLines size)
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2239
    ] whileTrue:[
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2240
        ((changedLines at:i) > 0) ifTrue:[
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2241
            super 
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2242
                drawVisibleLine:(changedLines at:i)
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2243
                with:fgColor
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2244
                and:self colorChanged.
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2245
        ].
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2246
        i := i + 1.
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2247
    ].
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2248
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2249
    "Created: / 26-04-2010 / 21:04:31 / Jakub <zelenja7@fel.cvut.cz>"
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2250
    "Modified: / 22-06-2010 / 23:28:30 / Jakub <zelenja7@fel.cvut.cz>"
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2251
    "Modified: / 08-04-2011 / 20:52:18 / Jan Vrany <jan.vrany@fit.cvut.cz>"
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2252
! !
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2253
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2254
!CodeView2::TextView methodsFor:'editing'!
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2255
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2256
contentsChanged
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2257
    super contentsChanged.
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2258
    "
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2259
    codeView diffMode ifTrue:[
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2260
        changedDiffText ifTrue:[
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2261
            codeView recomputeDiff:self.
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2262
        ] ifFalse:[
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2263
            changedDiffText := true.
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2264
        ].  
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2265
    ]
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2266
    "
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2267
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2268
    "Created: / 22-06-2010 / 23:13:24 / Jakub <zelenja7@fel.cvut.cz>"
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2269
    "Modified: / 01-08-2010 / 20:33:07 / Jan Vrany <jan.vrany@fit.cvut.cz>"
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2270
!
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2271
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2272
getNewOriginText
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2273
    |i size pole pom text helperText|
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2274
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2275
    i := 1.
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2276
    pole := list.
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2277
    size := list size.
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2278
    text:=''.
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2279
    emptyLines ifNil:[emptyLines := #()].
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2280
    [ i <= size ] whileTrue:[
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2281
        pom := emptyLines indexOf:i.
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2282
        (pom = 0) ifFalse:[
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2283
            helperText := pole at:i.
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2284
            (helperText = '') ifFalse:[
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2285
                (helperText isNil)ifTrue:[helperText:=''].
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2286
                helperText:=helperText,Character cr.
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2287
                text := text asString , helperText asString.
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2288
            ].
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2289
        ] ifTrue:[
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2290
            helperText := pole at:i.
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2291
            (helperText isNil)ifTrue:[helperText:=''].
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2292
            helperText:=helperText,Character cr.
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2293
            text := text asString , helperText asString.
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2294
        ].
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2295
    i:=i+1.
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2296
    ].
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2297
^text
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2298
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2299
    "Created: / 22-06-2010 / 22:33:27 / Jakub <zelenja7@fel.cvut.cz>"
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2300
    "Modified: / 24-06-2010 / 14:27:03 / Jan Vrany <jan.vrany@fit.cvut.cz>"
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2301
! !
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2302
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2303
!CodeView2::TextView methodsFor:'editing-basic'!
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2304
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2305
basicDeleteFromLine:startLineNr toLine:endLineNr
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2306
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2307
    self notifyLinesDeletedFrom: startLineNr to: endLineNr.  
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2308
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2309
    super basicDeleteFromLine:startLineNr toLine:endLineNr
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2310
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2311
    "Created: / 28-06-2011 / 09:09:25 / Jan Vrany <jan.vrany@fit.cvut.cz>"
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2312
!
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2313
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2314
basicDeleteLineWithoutRedraw:lineNr
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2315
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2316
    self notifyLinesDeletedFrom: lineNr to: lineNr. 
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2317
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2318
    ^super basicDeleteLineWithoutRedraw:lineNr
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2319
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2320
    "Created: / 28-06-2011 / 09:10:04 / Jan Vrany <jan.vrany@fit.cvut.cz>"
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2321
!
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2322
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2323
basicMergeLine:lineNr removeBlanks:removeBlanks
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2324
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2325
    self notifyLinesDeletedFrom: lineNr + 1 to: lineNr + 1.
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2326
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2327
    super basicMergeLine:lineNr removeBlanks:removeBlanks
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2328
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2329
    "Created: / 28-06-2011 / 09:13:36 / Jan Vrany <jan.vrany@fit.cvut.cz>"
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2330
!
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2331
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2332
basicSplitLine:lineNr before:colNr
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2333
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2334
    self notifyLinesInsertedFrom: lineNr +1 to: lineNr + 1. 
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2335
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2336
    ^super basicSplitLine:lineNr before:colNr
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2337
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2338
    "Created: / 28-06-2011 / 09:14:50 / Jan Vrany <jan.vrany@fit.cvut.cz>"
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2339
! !
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2340
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2341
!CodeView2::TextView methodsFor:'event handling'!
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2342
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2343
buttonMotion:button x:x y:y
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2344
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2345
    (codeView buttonMotion:button x:x y:y in: self)
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2346
        ifFalse:[super buttonMotion:button x:x y:y].
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2347
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2348
    "Created: / 14-02-2010 / 16:23:09 / Jan Vrany <jan.vrany@fit.cvut.cz>"
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2349
    "Modified: / 06-03-2010 / 20:10:10 / Jan Vrany <jan.vrany@fit.cvut.cz>"
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2350
!
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2351
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2352
buttonPress: button x: x y: y
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2353
    | ctrlDown  |
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2354
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2355
    (codeView buttonPress:button x:x y:y in: self)
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2356
        ifFalse:[super buttonPress:button x:x y:y].
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2357
    "
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2358
    ((ctrlDown := self sensor ctrlDown) and: [ codeView syntaxElementSelection notNil]) 
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2359
        ifTrue: [codeView buttonPressInTextView: button x:x y:y ctrlDown: ctrlDown].
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2360
    super 
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2361
        buttonPress: button
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2362
        x: x
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2363
        y: y
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2364
    "
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2365
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2366
    "Created: / 14-02-2010 / 18:12:32 / Jan Vrany <jan.vrany@fit.cvut.cz>"
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2367
    "Modified: / 06-03-2010 / 20:37:41 / Jan Vrany <jan.vrany@fit.cvut.cz>"
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2368
!
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2369
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2370
exposeX:x y:y width:w height:h 
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2371
    super 
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2372
        exposeX:x
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2373
        y:y
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2374
        width:w
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2375
        height:h.
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2376
    self redrawLines.
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2377
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2378
    "Created: / 05-04-2010 / 10:07:50 / Jakub <zelenja7@fel.cvut.cz>"
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2379
    "Modified: / 02-05-2010 / 18:41:07 / Jakub <zelenja7@fel.cvut.cz>"
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2380
!
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2381
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2382
keyPress:key x:x y:y
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2383
    (codeView keyPress:key x:x y:y in: self)
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2384
        ifFalse:[super keyPress:key x:x y:y].
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2385
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2386
    "Modified: / 06-03-2010 / 20:34:51 / Jan Vrany <jan.vrany@fit.cvut.cz>"
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2387
    "Modified: / 05-04-2010 / 09:55:52 / Jakub <zelenja7@fel.cvut.cz>"
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2388
!
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2389
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2390
keyRelease: key x: x y: y
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2391
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2392
    (codeView keyRelease:key x:x y:y in: self)
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2393
        ifFalse:[super keyRelease:key x:x y:y].
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2394
    "
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2395
    (key = #Control_L) ifTrue:
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2396
        [ codeView highlightClear. self redraw ].
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2397
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2398
    ^ super 
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2399
        keyRelease: key
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2400
        x: x
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2401
        y: y
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2402
    "
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2403
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2404
    "Created: / 14-02-2010 / 16:38:46 / Jan Vrany <jan.vrany@fit.cvut.cz>"
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2405
    "Modified: / 06-03-2010 / 21:04:55 / Jan Vrany <jan.vrany@fit.cvut.cz>"
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2406
! !
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2407
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2408
!CodeView2::TextView methodsFor:'initialization'!
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2409
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2410
initialize
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2411
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2412
    super initialize.
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2413
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2414
    changedDiffText := true.
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2415
    diffMode := false.
10224
eb799692952b More improvements in BreakpointService
vrany
parents: 10072
diff changeset
  2416
    suppressNotifications := false.
9985
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2417
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2418
    "Created: / 23-06-2010 / 17:28:52 / Jan Vrany <jan.vrany@fit.cvut.cz>"
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2419
    "Modified: / 08-04-2011 / 20:50:37 / Jan Vrany <jan.vrany@fit.cvut.cz>"
10224
eb799692952b More improvements in BreakpointService
vrany
parents: 10072
diff changeset
  2420
    "Modified: / 06-07-2011 / 17:46:31 / jv"
9985
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2421
!
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2422
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2423
setCodeView: aCodeView2
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2424
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2425
    codeView := aCodeView2.
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2426
    codeView addDependent: self.
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2427
    gutterView := aCodeView2 gutterView.
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2428
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2429
    "Created: / 14-02-2010 / 15:22:47 / Jan Vrany <jan.vrany@fit.cvut.cz>"
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2430
    "Modified: / 17-06-2011 / 12:43:53 / Jan Vrany <jan.vrany@fit.cvut.cz>"
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2431
!
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2432
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2433
setGutterView: aGutterView
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2434
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2435
    self assert: gutterView isNil message:'Attempting to set gutterView twice'.
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2436
    gutterView := aGutterView.
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2437
    gutterView setTextView: self.
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2438
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2439
    "Created: / 02-09-2009 / 21:57:53 / Jan Vrany <jan.vrany@fit.cvut.cz>"
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2440
! !
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2441
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2442
!CodeView2::TextView methodsFor:'menu & menu actions'!
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2443
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2444
editMenu
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2445
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2446
    ^codeView editMenu
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2447
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2448
    "Created: / 14-02-2010 / 15:49:03 / Jan Vrany <jan.vrany@fit.cvut.cz>"
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2449
! !
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2450
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2451
!CodeView2::TextView methodsFor:'notification'!
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2452
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2453
notifyLinesDeletedFrom: startLine to: endLine
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2454
10224
eb799692952b More improvements in BreakpointService
vrany
parents: 10072
diff changeset
  2455
    suppressNotifications ifTrue:[^self].
eb799692952b More improvements in BreakpointService
vrany
parents: 10072
diff changeset
  2456
    codeView linesDeletedFrom: startLine to: endLine.
eb799692952b More improvements in BreakpointService
vrany
parents: 10072
diff changeset
  2457
    suppressNotifications := true.
eb799692952b More improvements in BreakpointService
vrany
parents: 10072
diff changeset
  2458
9985
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2459
    "Created: / 28-06-2011 / 09:12:04 / Jan Vrany <jan.vrany@fit.cvut.cz>"
10224
eb799692952b More improvements in BreakpointService
vrany
parents: 10072
diff changeset
  2460
    "Modified: / 06-07-2011 / 17:47:05 / jv"
9985
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2461
!
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2462
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2463
notifyLinesInsertedFrom: startLine to: endLine
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2464
10224
eb799692952b More improvements in BreakpointService
vrany
parents: 10072
diff changeset
  2465
    suppressNotifications ifTrue:[^self].
eb799692952b More improvements in BreakpointService
vrany
parents: 10072
diff changeset
  2466
    codeView linesInsertedFrom: startLine to: endLine.
eb799692952b More improvements in BreakpointService
vrany
parents: 10072
diff changeset
  2467
    suppressNotifications := true.
eb799692952b More improvements in BreakpointService
vrany
parents: 10072
diff changeset
  2468
9985
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2469
    "Created: / 28-06-2011 / 09:12:14 / Jan Vrany <jan.vrany@fit.cvut.cz>"
10224
eb799692952b More improvements in BreakpointService
vrany
parents: 10072
diff changeset
  2470
    "Modified: / 06-07-2011 / 17:47:20 / jv"
9985
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2471
! !
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2472
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2473
!CodeView2::TextView methodsFor:'private'!
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2474
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2475
superEditMenu
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2476
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2477
    ^super editMenu
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2478
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2479
    "Created: / 14-02-2010 / 15:48:00 / Jan Vrany <jan.vrany@fit.cvut.cz>"
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2480
! !
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2481
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2482
!CodeView2::TextView methodsFor:'scrolling'!
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2483
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2484
basicScrollDown:nLines 
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2485
    |i|
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2486
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2487
    (lastFirstLine isNil) ifTrue:[
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2488
        lastFirstLine := firstLineShown.
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2489
    ].
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2490
    super scrollDown:nLines.
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2491
    (lastFirstLine = firstLineShown) ifFalse:[
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2492
        i := 1.
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2493
        [
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2494
            i <= changedLines size
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2495
        ] whileTrue:[
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2496
            super 
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2497
                drawVisibleLine:(changedLines at:i)
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2498
                with:fgColor
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2499
                and:Color white.
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2500
            changedLines at:i put:(changedLines at:i) - nLines.
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2501
            i := i + 1.
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2502
        ].
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2503
        i := 1.
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2504
        [
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2505
            i <= insertedLines size
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2506
        ] whileTrue:[
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2507
            super 
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2508
                drawVisibleLine:(insertedLines at:i)
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2509
                with:fgColor
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2510
                and:Color white.
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2511
            insertedLines at:i put:(insertedLines at:i) - nLines.
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2512
            i := i + 1.
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2513
        ].
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2514
        i := 1.
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2515
        [
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2516
            i <= deletedLines size
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2517
        ] whileTrue:[
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2518
            super 
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2519
                drawVisibleLine:(deletedLines at:i)
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2520
                with:fgColor
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2521
                and:Color white.
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2522
            deletedLines at:i put:(deletedLines at:i) - nLines.
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2523
            i := i + 1.
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2524
        ].
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2525
        lastFirstLine := firstLineShown.
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2526
        self redrawLines.
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2527
    ].
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2528
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2529
    "Created: / 06-04-2010 / 14:03:28 / Jakub <zelenja7@fel.cvut.cz>"
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2530
    "Modified: / 02-05-2010 / 19:29:23 / Jakub <zelenja7@fel.cvut.cz>"
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2531
!
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2532
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2533
basicScrollUp:nLines 
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2534
    |i|
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2535
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2536
    (scrolled isNil) ifTrue:[
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2537
        scrolled := false.
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2538
    ].
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2539
    (lastFirstLine isNil) ifTrue:[
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2540
        lastFirstLine := firstLineShown.
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2541
    ].
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2542
    super scrollUp:nLines.
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2543
    (lastFirstLine = firstLineShown) ifFalse:[
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2544
        i := 1.
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2545
        [
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2546
            i <= insertedLines size
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2547
        ] whileTrue:[
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2548
            super 
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2549
                drawVisibleLine:(insertedLines at:i)
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2550
                with:fgColor
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2551
                and:Color white.
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2552
            insertedLines at:i put:(insertedLines at:i) + nLines.
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2553
            i := i + 1.
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2554
        ].
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2555
        i := 1.
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2556
        [
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2557
            i <= deletedLines size
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2558
        ] whileTrue:[
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2559
            super 
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2560
                drawVisibleLine:(deletedLines at:i)
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2561
                with:fgColor
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2562
                and:Color white.
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2563
            deletedLines at:i put:(deletedLines at:i) + nLines.
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2564
            i := i + 1.
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2565
        ].
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2566
        i := 1.
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2567
        [
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2568
            i <= changedLines size
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2569
        ] whileTrue:[
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2570
            super 
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2571
                drawVisibleLine:(changedLines at:i)
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2572
                with:fgColor
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2573
                and:Color white.
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2574
            changedLines at:i put:(changedLines at:i) + nLines.
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2575
            i := i + 1.
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2576
        ].
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2577
        lastFirstLine := firstLineShown.
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2578
        self redrawLines.
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2579
    ].
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2580
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2581
    "Created: / 06-04-2010 / 14:03:46 / Jakub <zelenja7@fel.cvut.cz>"
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2582
    "Modified: / 02-05-2010 / 19:19:27 / Jakub <zelenja7@fel.cvut.cz>"
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2583
!
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2584
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2585
originChanged:delta
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2586
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2587
    super originChanged:delta.
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2588
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2589
    gutterView invalidate.
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2590
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2591
    "Created: / 07-12-2009 / 21:50:49 / Jindra <a>"
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2592
!
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2593
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2594
scrollDown:nLines
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2595
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2596
    codeView scrollDown: nLines in: self.
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2597
    self basicScrollDown: nLines.
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2598
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2599
    "Modified: / 06-04-2010 / 14:04:28 / Jakub <zelenja7@fel.cvut.cz>"
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2600
!
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2601
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2602
scrollUp:nLines
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2603
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2604
    codeView scrollUp: nLines in: self.
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2605
    self basicScrollUp: nLines.
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2606
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2607
    "Modified: / 06-04-2010 / 14:05:40 / Jakub <zelenja7@fel.cvut.cz>"
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2608
! !
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2609
10224
eb799692952b More improvements in BreakpointService
vrany
parents: 10072
diff changeset
  2610
!CodeView2::TextView methodsFor:'undo & again'!
eb799692952b More improvements in BreakpointService
vrany
parents: 10072
diff changeset
  2611
eb799692952b More improvements in BreakpointService
vrany
parents: 10072
diff changeset
  2612
nonUndoableDo: aBlock
eb799692952b More improvements in BreakpointService
vrany
parents: 10072
diff changeset
  2613
eb799692952b More improvements in BreakpointService
vrany
parents: 10072
diff changeset
  2614
    super nonUndoableDo: aBlock.
eb799692952b More improvements in BreakpointService
vrany
parents: 10072
diff changeset
  2615
    suppressNotifications := false.
eb799692952b More improvements in BreakpointService
vrany
parents: 10072
diff changeset
  2616
eb799692952b More improvements in BreakpointService
vrany
parents: 10072
diff changeset
  2617
    "Created: / 06-07-2011 / 17:48:27 / jv"
eb799692952b More improvements in BreakpointService
vrany
parents: 10072
diff changeset
  2618
!
eb799692952b More improvements in BreakpointService
vrany
parents: 10072
diff changeset
  2619
eb799692952b More improvements in BreakpointService
vrany
parents: 10072
diff changeset
  2620
undoableDo: aBlock info: into
eb799692952b More improvements in BreakpointService
vrany
parents: 10072
diff changeset
  2621
eb799692952b More improvements in BreakpointService
vrany
parents: 10072
diff changeset
  2622
    super undoableDo: aBlock info: into.
eb799692952b More improvements in BreakpointService
vrany
parents: 10072
diff changeset
  2623
    suppressNotifications := false.
eb799692952b More improvements in BreakpointService
vrany
parents: 10072
diff changeset
  2624
eb799692952b More improvements in BreakpointService
vrany
parents: 10072
diff changeset
  2625
    "Created: / 06-07-2011 / 17:48:49 / jv"
eb799692952b More improvements in BreakpointService
vrany
parents: 10072
diff changeset
  2626
! !
eb799692952b More improvements in BreakpointService
vrany
parents: 10072
diff changeset
  2627
9985
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2628
!CodeView2 class methodsFor:'documentation'!
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2629
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2630
version_CVS
10290
Claus Gittinger <cg@exept.de>
parents: 10262
diff changeset
  2631
    ^ '$Header: /cvs/stx/stx/libtool/Tools__CodeView2.st,v 1.7 2011-07-08 11:31:36 cg Exp $'
9985
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2632
!
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2633
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2634
version_SVN
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2635
    ^ '§Id: Tools__CodeView2.st 7797 2011-06-28 07:45:06Z vranyj1 §'
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2636
! !
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2637
76318fc4fb70 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2638
CodeView2 initialize!