WarningCompilationErrorHandler.st
author Jan Vrany <jan.vrany@labware.com>
Thu, 27 Oct 2022 14:53:59 +0100
branchjv
changeset 4735 3b11fb3ede98
parent 2708 c3c1c7f2a4e6
permissions -rw-r--r--
Allow single underscore as method / block argument and temporaries This commit is a follow up for 38b221e.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
1451
44ef4c3ba214 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1332
diff changeset
     1
"
44ef4c3ba214 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1332
diff changeset
     2
 COPYRIGHT (c) 1999 by eXept Software AG
44ef4c3ba214 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1332
diff changeset
     3
              All Rights Reserved
44ef4c3ba214 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1332
diff changeset
     4
44ef4c3ba214 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1332
diff changeset
     5
 This software is furnished under a license and may be used
44ef4c3ba214 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1332
diff changeset
     6
 only in accordance with the terms of that license and with the
44ef4c3ba214 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1332
diff changeset
     7
 inclusion of the above copyright notice.   This software may not
44ef4c3ba214 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1332
diff changeset
     8
 be provided or otherwise made available to, or used by, any
44ef4c3ba214 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1332
diff changeset
     9
 other person.  No title to or ownership of the software is
44ef4c3ba214 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1332
diff changeset
    10
 hereby transferred.
44ef4c3ba214 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1332
diff changeset
    11
"
1332
1f64577c44b5 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 929
diff changeset
    12
"{ Package: 'stx:libcomp' }"
1f64577c44b5 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 929
diff changeset
    13
927
49f8b69d300c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    14
CompilationErrorHandler subclass:#WarningCompilationErrorHandler
49f8b69d300c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    15
	instanceVariableNames:''
49f8b69d300c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    16
	classVariableNames:''
49f8b69d300c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    17
	poolDictionaries:''
49f8b69d300c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    18
	category:'System-Compiler'
49f8b69d300c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    19
!
49f8b69d300c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    20
1332
1f64577c44b5 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 929
diff changeset
    21
!WarningCompilationErrorHandler class methodsFor:'documentation'!
1f64577c44b5 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 929
diff changeset
    22
1451
44ef4c3ba214 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1332
diff changeset
    23
copyright
44ef4c3ba214 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1332
diff changeset
    24
"
44ef4c3ba214 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1332
diff changeset
    25
 COPYRIGHT (c) 1999 by eXept Software AG
44ef4c3ba214 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1332
diff changeset
    26
              All Rights Reserved
44ef4c3ba214 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1332
diff changeset
    27
44ef4c3ba214 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1332
diff changeset
    28
 This software is furnished under a license and may be used
44ef4c3ba214 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1332
diff changeset
    29
 only in accordance with the terms of that license and with the
44ef4c3ba214 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1332
diff changeset
    30
 inclusion of the above copyright notice.   This software may not
44ef4c3ba214 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1332
diff changeset
    31
 be provided or otherwise made available to, or used by, any
44ef4c3ba214 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1332
diff changeset
    32
 other person.  No title to or ownership of the software is
44ef4c3ba214 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1332
diff changeset
    33
 hereby transferred.
44ef4c3ba214 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1332
diff changeset
    34
"
44ef4c3ba214 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1332
diff changeset
    35
!
44ef4c3ba214 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1332
diff changeset
    36
1332
1f64577c44b5 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 929
diff changeset
    37
documentation
1f64577c44b5 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 929
diff changeset
    38
"
1f64577c44b5 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 929
diff changeset
    39
    I am a warning ErrorHandler - i.e. showing a warning for
1f64577c44b5 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 929
diff changeset
    40
    compilation errors.
1f64577c44b5 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 929
diff changeset
    41
"
1f64577c44b5 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 929
diff changeset
    42
! !
927
49f8b69d300c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    43
49f8b69d300c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    44
!WarningCompilationErrorHandler methodsFor:'error handling'!
49f8b69d300c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    45
49f8b69d300c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    46
error:aMessage position:position to:endPos from:aCompiler
49f8b69d300c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    47
    "error notification.
49f8b69d300c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    48
     This is sent by the compiler/evaluator if it detects errors."
49f8b69d300c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    49
49f8b69d300c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    50
    |box|
49f8b69d300c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    51
49f8b69d300c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    52
    box := TextBox new.
49f8b69d300c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    53
    box initialText:currentSource.
49f8b69d300c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    54
    box label:aMessage.
929
4cd47fa33c28 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 927
diff changeset
    55
    box textView selectFromCharacterPosition:(position?1) to:(endPos?currentSource size).
927
49f8b69d300c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    56
    box open.
1490
eca3e274d627 pass back users return value
penk
parents: 1451
diff changeset
    57
eca3e274d627 pass back users return value
penk
parents: 1451
diff changeset
    58
    box accepted ifFalse:[ ^ #Error ].
927
49f8b69d300c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    59
    ^ false
49f8b69d300c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    60
49f8b69d300c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    61
    "Created: / 30.7.1999 / 18:10:22 / cg"
929
4cd47fa33c28 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 927
diff changeset
    62
    "Modified: / 30.7.1999 / 22:37:30 / cg"
927
49f8b69d300c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    63
! !
49f8b69d300c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    64
49f8b69d300c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    65
!WarningCompilationErrorHandler class methodsFor:'documentation'!
49f8b69d300c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    66
49f8b69d300c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    67
version
2708
c3c1c7f2a4e6 version_CVS
Claus Gittinger <cg@exept.de>
parents: 1490
diff changeset
    68
    ^ '$Header: /cvs/stx/stx/libcomp/WarningCompilationErrorHandler.st,v 1.6 2011-09-29 11:19:11 cg Exp $'
927
49f8b69d300c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    69
! !