added compatibility warnings checkBox.
authorClaus Gittinger <cg@exept.de>
Fri, 23 May 1997 13:46:12 +0200
changeset 1180 464a3dd1f90a
parent 1179 e927f0c09298
child 1181 5a884c36a45f
added compatibility warnings checkBox. merged fullLineInfo & fullSingleStepSupport into one.
Launcher.st
--- a/Launcher.st	Fri May 09 12:19:10 1997 +0200
+++ b/Launcher.st	Fri May 23 13:46:12 1997 +0200
@@ -1087,11 +1087,12 @@
 
     |box warnings warnSTX warnUnderscore warnOldStyle allowUnderscore immutableArrays
      warnSTXBox warnUnderscoreBox warnOldStyleBox warnCommonMistakes warnCommonMistakesBox
+     warnCompatibility warnCompatibilityBox
      stcCompilation compilationList stcCompilationOptions stcIncludes stcDefines stcOptions
      stcLibraries stcLibraryPath cc ccOptions historyLines catchRedefs keepSourceOptions keepSource  
-     constantFoldingOptions constantFolding justInTimeCompilation fullSingleStep
+     constantFoldingOptions constantFolding justInTimeCompilation 
      warnEnabler check component oldIndent t supportsJustInTimeCompilation y
-     y2 fullLineNumbers|
+     y2 fullDebugSupport yMax|
 
     warnings := Compiler warnings asValue.
 
@@ -1099,9 +1100,9 @@
     warnUnderscore := Compiler warnUnderscoreInIdentifier asValue.
     warnOldStyle := Compiler warnOldStyleAssignment asValue.
     warnCommonMistakes := Compiler warnCommonMistakes asValue.
+    warnCompatibility := Compiler warnPossibleIncompatibilities asValue.
     allowUnderscore := Compiler allowUnderscoreInIdentifier asValue.
     immutableArrays := Compiler arraysAreImmutable asValue.
-    fullLineNumbers := (Compiler lineNumberInfo == #full) asValue.
 
     constantFoldingOptions := #( nil #level1 #level2 #full ).
     constantFolding := SelectionInList new list:(resources array:#('disabled' 'level1 (always safe)' 'level2 (usually safe)' 'full')).
@@ -1109,21 +1110,21 @@
 
     stcCompilationOptions := #( always default never).
     stcCompilation := SelectionInList new 
-			list:(resources array:#('always' 
-						'primitive code only' 
-						'never'
-					       )).
+                        list:(resources array:#('always' 
+                                                'primitive code only' 
+                                                'never'
+                                               )).
     stcCompilation selectionIndex:2.
     (supportsJustInTimeCompilation := ObjectMemory supportsJustInTimeCompilation)
     ifTrue:[
-	justInTimeCompilation := ObjectMemory justInTimeCompilation:nil.
-	fullSingleStep := ObjectMemory fullSingleStepSupport:nil.
+        justInTimeCompilation := ObjectMemory justInTimeCompilation:nil.
+        fullDebugSupport := ObjectMemory fullSingleStepSupport:nil.
     ] ifFalse:[
-	justInTimeCompilation := false.
-	fullSingleStep := false.
+        justInTimeCompilation := false.
+        fullDebugSupport := (Compiler lineNumberInfo == #full) asValue.
     ].
     justInTimeCompilation := justInTimeCompilation asValue.
-    fullSingleStep := fullSingleStep asValue.
+    fullDebugSupport := fullDebugSupport asValue.
 
     stcIncludes := Compiler stcCompilationIncludes asValue.
     stcDefines := Compiler stcCompilationDefines asValue.
@@ -1132,12 +1133,12 @@
     cc := Compiler ccPath asValue.
 
     ObjectFileLoader notNil ifTrue:[
-	(t := ObjectFileLoader searchedLibraries) notNil ifTrue:[
-	    stcLibraries := (String fromStringCollection:t separatedBy:' ') asValue.
-	].
-	(t := ObjectFileLoader libPath) notNil ifTrue:[
-	    stcLibraryPath := t asValue.
-	]
+        (t := ObjectFileLoader searchedLibraries) notNil ifTrue:[
+            stcLibraries := (String fromStringCollection:t separatedBy:' ') asValue.
+        ].
+        (t := ObjectFileLoader libPath) notNil ifTrue:[
+            stcLibraryPath := t asValue.
+        ]
     ].
 
     catchRedefs := Class catchMethodRedefinitions asValue.
@@ -1148,21 +1149,23 @@
     keepSource selectionIndex:1.
 
     warnEnabler := [
-	      warnings value ifTrue:[
-		warnSTXBox enable. 
-		warnOldStyleBox enable.
-		warnCommonMistakesBox enable.
-		allowUnderscore value ifTrue:[
-		    warnUnderscoreBox enable.
-		] ifFalse:[
-		    warnUnderscoreBox disable.
-		].
-	      ] ifFalse:[
-		warnSTXBox disable. 
-		warnUnderscoreBox disable.
-		warnOldStyleBox disable.
-		warnCommonMistakesBox disable.
-	      ]].
+              warnings value ifTrue:[
+                warnSTXBox enable. 
+                warnOldStyleBox enable.
+                warnCommonMistakesBox enable.
+                warnCompatibilityBox enable.
+                allowUnderscore value ifTrue:[
+                    warnUnderscoreBox enable.
+                ] ifFalse:[
+                    warnUnderscoreBox disable.
+                ].
+              ] ifFalse:[
+                warnSTXBox disable. 
+                warnUnderscoreBox disable.
+                warnOldStyleBox disable.
+                warnCommonMistakesBox disable.
+                warnCompatibilityBox disable.
+              ]].
 
     warnings onChangeSend:#value to:warnEnabler.
     allowUnderscore onChangeSend:#value to:warnEnabler.
@@ -1180,107 +1183,103 @@
     box addHorizontalLine.
 
     supportsJustInTimeCompilation ifTrue:[
-	component := box 
-			addCheckBox:(resources string:'just in time compilation to machine code') 
-			on:justInTimeCompilation.
-
-	component := box 
-			addCheckBox:(resources string:'detailed single step support') 
-			on:fullSingleStep.
-
-	box addHorizontalLine.
+        component := box 
+                        addCheckBox:(resources string:'just in time compilation to machine code') 
+                        on:justInTimeCompilation.
+
+        box addHorizontalLine.
     ].
 
     ObjectFileLoader notNil ifTrue:[
-	compilationList := box addPopUpList:(resources string:'stc compilation to machine code') on:stcCompilation.
-	stcCompilation selectionIndex:( stcCompilationOptions indexOf:(Compiler stcCompilation) ifAbsent:2).
-
-	component := box 
-			addLabelledInputField:(resources string:'include directories:')
-			adjust:#right
-			on:stcIncludes 
-			tabable:true
-			separateAtX:0.3.
-	component immediateAccept:true; acceptOnLeave:false; cursorMovementWhenUpdating:#beginOfLine.
-	component preferredExtent:(250 @ component preferredExtent y).
+        compilationList := box addPopUpList:(resources string:'stc compilation to machine code') on:stcCompilation.
+        stcCompilation selectionIndex:( stcCompilationOptions indexOf:(Compiler stcCompilation) ifAbsent:2).
+
+        component := box 
+                        addLabelledInputField:(resources string:'include directories:')
+                        adjust:#right
+                        on:stcIncludes 
+                        tabable:true
+                        separateAtX:0.3.
+        component immediateAccept:true; acceptOnLeave:false; cursorMovementWhenUpdating:#beginOfLine.
+        component preferredExtent:(250 @ component preferredExtent y).
 
 "/        box addVerticalSpace.
 
-	component := box 
-			addLabelledInputField:(resources string:'defines:')
-			adjust:#right
-			on:stcDefines 
-			tabable:true
-			separateAtX:0.3.
-	component immediateAccept:true; acceptOnLeave:false; cursorMovementWhenUpdating:#beginOfLine.
-	component preferredExtent:(250 @ component preferredExtent y).
+        component := box 
+                        addLabelledInputField:(resources string:'defines:')
+                        adjust:#right
+                        on:stcDefines 
+                        tabable:true
+                        separateAtX:0.3.
+        component immediateAccept:true; acceptOnLeave:false; cursorMovementWhenUpdating:#beginOfLine.
+        component preferredExtent:(250 @ component preferredExtent y).
 
 "/        box addVerticalSpace.
 
-	component := box 
-			addLabelledInputField:(resources string:'stc options:')
-			adjust:#right
-			on:stcOptions 
-			tabable:true
-			separateAtX:0.3.
-	component immediateAccept:true; acceptOnLeave:false; cursorMovementWhenUpdating:#beginOfLine.
-	component preferredExtent:(250 @ component preferredExtent y).
+        component := box 
+                        addLabelledInputField:(resources string:'stc options:')
+                        adjust:#right
+                        on:stcOptions 
+                        tabable:true
+                        separateAtX:0.3.
+        component immediateAccept:true; acceptOnLeave:false; cursorMovementWhenUpdating:#beginOfLine.
+        component preferredExtent:(250 @ component preferredExtent y).
 
 "/        box addVerticalSpace.
 
-	component := box 
-			addLabelledInputField:(resources string:'cc command:')
-			adjust:#right
-			on:cc 
-			tabable:true
-			separateAtX:0.3.
-	component immediateAccept:true; acceptOnLeave:false; cursorMovementWhenUpdating:#beginOfLine.
-	component preferredExtent:(250 @ component preferredExtent y).
-
-	component := box 
-			addLabelledInputField:(resources string:'cc options:')
-			adjust:#right
-			on:ccOptions 
-			tabable:true
-			separateAtX:0.3.
-	component immediateAccept:true; acceptOnLeave:false; cursorMovementWhenUpdating:#beginOfLine.
-	component preferredExtent:(250 @ component preferredExtent y).
-
-	stcLibraries notNil ifTrue:[
+        component := box 
+                        addLabelledInputField:(resources string:'cc command:')
+                        adjust:#right
+                        on:cc 
+                        tabable:true
+                        separateAtX:0.3.
+        component immediateAccept:true; acceptOnLeave:false; cursorMovementWhenUpdating:#beginOfLine.
+        component preferredExtent:(250 @ component preferredExtent y).
+
+        component := box 
+                        addLabelledInputField:(resources string:'cc options:')
+                        adjust:#right
+                        on:ccOptions 
+                        tabable:true
+                        separateAtX:0.3.
+        component immediateAccept:true; acceptOnLeave:false; cursorMovementWhenUpdating:#beginOfLine.
+        component preferredExtent:(250 @ component preferredExtent y).
+
+        stcLibraries notNil ifTrue:[
 "/            box addVerticalSpace.
 
-	    component := box 
-			    addLabelledInputField:(resources string:'C-libraries:')
-			    adjust:#right
-			    on:stcLibraries 
-			    tabable:true
-			    separateAtX:0.3.
-	    component immediateAccept:true; acceptOnLeave:false; cursorMovementWhenUpdating:#beginOfLine.
-	    component preferredExtent:(250 @ component preferredExtent y).
-	].
-
-	stcLibraryPath notNil ifTrue:[
+            component := box 
+                            addLabelledInputField:(resources string:'C-libraries:')
+                            adjust:#right
+                            on:stcLibraries 
+                            tabable:true
+                            separateAtX:0.3.
+            component immediateAccept:true; acceptOnLeave:false; cursorMovementWhenUpdating:#beginOfLine.
+            component preferredExtent:(250 @ component preferredExtent y).
+        ].
+
+        stcLibraryPath notNil ifTrue:[
 "/            box addVerticalSpace.
 
-	    component := box 
-			    addLabelledInputField:(resources string:'stc libPath:')
-			    adjust:#right
-			    on:stcLibraryPath 
-			    tabable:true
-			    separateAtX:0.3.
-	    component immediateAccept:true; acceptOnLeave:false; cursorMovementWhenUpdating:#beginOfLine.
-	    component preferredExtent:(250 @ component preferredExtent y).
-	].
+            component := box 
+                            addLabelledInputField:(resources string:'stc libPath:')
+                            adjust:#right
+                            on:stcLibraryPath 
+                            tabable:true
+                            separateAtX:0.3.
+            component immediateAccept:true; acceptOnLeave:false; cursorMovementWhenUpdating:#beginOfLine.
+            component preferredExtent:(250 @ component preferredExtent y).
+        ].
 
 "/        box addVerticalSpace.
-	box addHorizontalLine.
-
-	"/ if there is no compiler around,
-	"/ change to compile nothing, and disable the checkBoxes
-	Compiler canCreateMachineCode ifFalse:[
-	    stcCompilation selectionIndex:3.
-	    compilationList disable.
-	].
+        box addHorizontalLine.
+
+        "/ if there is no compiler around,
+        "/ change to compile nothing, and disable the checkBoxes
+        Compiler canCreateMachineCode ifFalse:[
+            stcCompilation selectionIndex:3.
+            compilationList disable.
+        ].
     ].
 
     y := box yPosition.
@@ -1301,7 +1300,7 @@
     component superView left:0.5; width:0.5.
     constantFolding selectionIndex:( constantFoldingOptions indexOf:(Compiler foldConstants) ifAbsent:1).
 
-    component := box addCheckBox:(resources string:'full lineNumber info') on:fullLineNumbers.
+    component := box addCheckBox:(resources string:'full debug info') on:fullDebugSupport.
     component left:0.5; width:0.4.
     box yPosition:(box yPosition max:y2).
 
@@ -1317,84 +1316,87 @@
 
     warnSTXBox := box addCheckBox:(resources string:'ST/X extensions') on:warnSTX.
     warnSTXBox width:0.4.
-"/    box addVerticalSpace.
 
     warnUnderscoreBox := box addCheckBox:(resources string:'underscores in identifiers') on:warnUnderscore.
     warnUnderscoreBox width:0.4.
-"/    box addVerticalSpace.
+
+    warnCompatibilityBox := box addCheckBox:(resources string:'possible incompatibilities') on:warnCompatibility.
+    warnCompatibilityBox width:0.4.
+
+    yMax := box yPosition.
 
     box yPosition:y.
     box leftIndent:0.
     warnOldStyleBox := box addCheckBox:(resources string:'oldStyle assignment') on:warnOldStyle.
     warnOldStyleBox left:0.5; width:0.4.
-"/    box addVerticalSpace.
 
     warnCommonMistakesBox := box addCheckBox:(resources string:'common mistakes') on:warnCommonMistakes.
     warnCommonMistakesBox left:0.5; width:0.4.
-"/    box addVerticalSpace.
 
     box leftIndent:oldIndent.
+    box yPosition:(yMax max: box yPosition).
 
     box 
-	addHelpButtonFor:'Launcher/compilerSettings.html';
-	addAbortButton; 
-	addOkButton.
+        addHelpButtonFor:'Launcher/compilerSettings.html';
+        addAbortButton; 
+        addOkButton.
 
     warnEnabler value.
     box open.
 
     box accepted ifTrue:[
-	HistoryManager notNil ifTrue:[
-	    historyLines value ifTrue:[
-		HistoryManager activate
-	    ] ifFalse:[
-		HistoryManager deactivate
-	    ].
-	].
-	Class catchMethodRedefinitions:catchRedefs value.
-	ClassCategoryReader sourceMode:(keepSourceOptions at:keepSource selectionIndex).
-	Compiler warnings:warnings value.
-	Compiler warnSTXSpecials:warnSTX value.
-	Compiler warnOldStyleAssignment:warnOldStyle value.
-	Compiler warnUnderscoreInIdentifier:warnUnderscore value.
-	Compiler warnCommonMistakes:warnCommonMistakes value.
-	Compiler allowUnderscoreInIdentifier:allowUnderscore value.
-	Compiler arraysAreImmutable:immutableArrays value.
-	fullLineNumbers value ifTrue:[
-	    Compiler lineNumberInfo:#full.
-	] ifFalse:[
-	    Compiler lineNumberInfo:true
-	].
-
-	Compiler stcCompilation:(stcCompilationOptions at:stcCompilation selectionIndex).
-	Compiler stcCompilationIncludes:stcIncludes value.
-	Compiler stcCompilationDefines:stcDefines value.
-	Compiler stcCompilationOptions:stcOptions value.
-	Compiler ccCompilationOptions:ccOptions value.
-	Compiler ccPath:cc value.
-	Compiler foldConstants:(constantFoldingOptions at:constantFolding selectionIndex).
-
-	supportsJustInTimeCompilation ifTrue:[
-	    justInTimeCompilation value ifTrue:[
-		Method allInstancesDo:[:m | m checked:false].
-	    ].
-	    ObjectMemory justInTimeCompilation:justInTimeCompilation value.
-	    ObjectMemory fullSingleStepSupport:fullSingleStep value.
-	].
-	ObjectFileLoader notNil ifTrue:[
-	    stcLibraries notNil ifTrue:[
-		ObjectFileLoader searchedLibraries:(stcLibraries value asCollectionOfWords).
-	    ].
-	    stcLibraryPath notNil ifTrue:[
-		ObjectFileLoader libPath:(stcLibraryPath value).
-	    ]
-	]
+        HistoryManager notNil ifTrue:[
+            historyLines value ifTrue:[
+                HistoryManager activate
+            ] ifFalse:[
+                HistoryManager deactivate
+            ].
+        ].
+        Class catchMethodRedefinitions:catchRedefs value.
+        ClassCategoryReader sourceMode:(keepSourceOptions at:keepSource selectionIndex).
+        Compiler warnings:warnings value.
+        Compiler warnSTXSpecials:warnSTX value.
+        Compiler warnOldStyleAssignment:warnOldStyle value.
+        Compiler warnUnderscoreInIdentifier:warnUnderscore value.
+        Compiler warnCommonMistakes:warnCommonMistakes value.
+        Compiler warnPossibleIncompatibilities:warnCompatibility value.
+        Compiler allowUnderscoreInIdentifier:allowUnderscore value.
+        Compiler arraysAreImmutable:immutableArrays value.
+        fullDebugSupport value ifTrue:[
+            Compiler lineNumberInfo:#full.
+        ] ifFalse:[
+            Compiler lineNumberInfo:true
+        ].
+
+        Compiler stcCompilation:(stcCompilationOptions at:stcCompilation selectionIndex).
+        Compiler stcCompilationIncludes:stcIncludes value.
+        Compiler stcCompilationDefines:stcDefines value.
+        Compiler stcCompilationOptions:stcOptions value.
+        Compiler ccCompilationOptions:ccOptions value.
+        Compiler ccPath:cc value.
+        Compiler foldConstants:(constantFoldingOptions at:constantFolding selectionIndex).
+
+        supportsJustInTimeCompilation ifTrue:[
+            justInTimeCompilation value ifTrue:[
+                Method allInstancesDo:[:m | m checked:false].
+            ].
+            ObjectMemory justInTimeCompilation:justInTimeCompilation value.
+            ObjectMemory fullSingleStepSupport:fullDebugSupport value.
+        ].
+        ObjectFileLoader notNil ifTrue:[
+            stcLibraries notNil ifTrue:[
+                ObjectFileLoader searchedLibraries:(stcLibraries value asCollectionOfWords).
+            ].
+            stcLibraryPath notNil ifTrue:[
+                ObjectFileLoader libPath:(stcLibraryPath value).
+            ]
+        ]
     ].
     box destroy
 
     "Modified: 10.9.1995 / 19:19:18 / claus"
     "Modified: 9.9.1996 / 22:42:47 / stefan"
-    "Modified: 8.1.1997 / 14:52:36 / cg"
+    "Modified: 23.5.1997 / 12:44:54 / cg"
 !
 
 displaySettings
@@ -4716,5 +4718,5 @@
 !Launcher class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libtool/Launcher.st,v 1.270 1997-04-26 19:03:06 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libtool/Launcher.st,v 1.271 1997-05-23 11:46:12 cg Exp $'
 ! !