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