Merged with JV's branch
authorvrany
Thu, 07 Jul 2011 15:22:36 +0200
changeset 10247 8517600df5c5
parent 10246 0a4d2feea6a3
child 10248 3237dc7fbfb8
Merged with JV's branch
NewChangesBrowser.st
--- a/NewChangesBrowser.st	Thu Jul 07 14:51:36 2011 +0200
+++ b/NewChangesBrowser.st	Thu Jul 07 15:22:36 2011 +0200
@@ -1788,6 +1788,20 @@
 
 !NewChangesBrowser methodsFor:'compiler interface'!
 
+correctableSelectorWarning:aText position:smallInteger1 to:smallInteger2 from:aByteCodeCompiler
+
+    ^false
+
+    "Created: / 16-11-2010 / 16:04:02 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
+correctableWarning:aText position:smallInteger1 to:smallInteger2 from:aByteCodeCompiler
+
+    ^false
+
+    "Created: / 16-11-2010 / 16:03:23 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
 wantChangeLog
     "sent by the compiler to ask if a changeLog entry should
      be written. Return false here."
@@ -1846,6 +1860,13 @@
     ^self changeTextEditor error:aString position:relPos to:relEndPos from:aCompiler
 !
 
+unusedVariableWarning:aText position:smallInteger1 to:smallInteger2 from:aByteCodeCompiler
+
+    ^false
+
+    "Created: / 24-02-2011 / 22:00:31 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
 warning:aString position:relPos to:relEndPos from:aCompiler
     "compiler notifys us of a warning - ignore it"
 
@@ -2717,7 +2738,7 @@
     self newLabel:(resources string:'updating...').
 
     i := f info.
-    changeFileTimestamp := i modified.
+    changeFileTimestamp := i modificationTime.
 
     self valueOfReadProgress value: 0.
     v := self readProgressIndicator.
@@ -2847,7 +2868,7 @@
                                     sel := (p args at:1) evaluate.
 
                                     DeltaInfoColumn ifTrue:[
-                                        (changeClass isNil or:[changeClass isLoaded not or:[sel isNil]]) ifTrue:[
+                                        (changeClass isNil or:[changeClass isLoaded not]) ifTrue:[
                                             changeDelta := '?'
                                         ] ifFalse:[
                                             (changeClass implements:sel asSymbol) ifTrue:[
@@ -2900,7 +2921,7 @@
                                 ].
                             ]
                         ] ifTrue:[
-                            |done first p className2 cls text methodPos|
+                            |done first p className cls text methodPos|
 
                             "
                              method definitions actually consist of
@@ -2909,19 +2930,24 @@
                              The system only writes one chunk,
                              and we cannot handle more in this ChangesBrowser....
                             "
-                            className2 := nil.
+                            className := nil.
                             p := Parser parseExpression:chunkText inNameSpace:Smalltalk.
 
                             (p notNil and:[p ~~ #Error]) ifTrue:[
                                 sel := p selector.
                                 (sel == #methodsFor:) ifTrue:[
                                     p receiver isUnaryMessage ifTrue:[
-                                        className2 := p receiver receiver name.
-                                        changeClass := (Smalltalk classNamed:className2) class.
-                                        className2 := className2 , ' class'.
+                                        className := p receiver receiver name.
+                                        changeClass := (Smalltalk classNamed:className) class.
+                                        className := className , ' class'.
                                     ] ifFalse:[
-                                        className2 := p receiver name.
-                                        changeClass := Smalltalk classNamed:className2
+                                        (p receiver type == #Nil) 
+                                            ifTrue: 
+                                                [className := 'nil'.
+                                                changeClass := nil] 
+                                            ifFalse:
+                                                [className := p receiver name.
+                                                changeClass := Smalltalk classNamed:className]
                                     ].
                                     category := (p args at:1) evaluate.
                                 ].
@@ -2946,7 +2972,7 @@
                                         change chunk: chunkText.
                                         change string:changeString.
                                         change position: methodPos.
-                                        change className: className2.
+                                        change className: className.
                                         lastChange notNil ifTrue: [lastChange lastPosition: methodPos - 1].
                                         lastChange := change.
                                         change timeStamp: timeStampInfo.
@@ -2959,7 +2985,7 @@
                                      try to find the selector
                                     "
                                     sel := nil.
-                                    className2 notNil ifTrue:[
+                                    className notNil ifTrue:[
                                         p := Parser
                                                  parseMethodSpecification:text
                                                  in:nil
@@ -2975,10 +3001,10 @@
                                         changeType := 'change'.
                                         headerLine := chunkText , ' (change)'.
                                     ] ifFalse:[
-                                        changeString :=  self contractClass:className2 selector:sel to:maxLen.
+                                        changeString :=  self contractClass:className selector:sel to:maxLen.
                                         changeType := 'method definition'.
                                         changeCategory := category.
-                                        headerLine := className2 , ' ' , sel , ' ' , '(change category: ''' , category , ''')'.
+                                        headerLine := className , ' ' , sel , ' ' , '(change category: ''' , category , ''')'.
                                         change selector:sel.
                                     ].
 
@@ -2991,7 +3017,7 @@
                                             ].
                                         ].
 
-                                        (changeClass isNil or:[cls isLoaded not or:[sel isNil]]) ifTrue:[
+                                        (changeClass isNil or:[cls isLoaded not]) ifTrue:[
                                             changeDelta := '?'
                                         ] ifFalse:[
                                             (changeClass implements:sel asSymbol) ifFalse:[
@@ -3050,6 +3076,7 @@
             inBackground ifTrue:[myProcess priority:myPriority].
         ].
     ].
+    changes removeLast.
     self setChangeList.
     self valueOfNotReading value: true.
     self filterField raise.
@@ -3057,7 +3084,8 @@
 
     self checkIfFileHasChanged.
 
-    "Modified: / 30.7.1998 / 11:39:58 / cg"
+    "Modified: / 30-07-1998 / 11:39:58 / cg"
+    "Modified: / 16-11-2010 / 15:52:54 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 !
 
 selectorOfMethodChange:aChange
@@ -3184,7 +3212,7 @@
 
     self valueOfNotSaving value ifFalse: [^ self].
 
-    modified ifTrue:[
+    modified == true ifTrue:[
         (OptionBox
               request:(resources string:'Change list was modified. Exit anyway?') withCRs
               label:'Changes Browser'
@@ -3196,7 +3224,8 @@
     ].
     super closeRequest
 
-    "Modified: / 20.5.1998 / 03:53:47 / cg"
+    "Modified: / 20-05-1998 / 03:53:47 / cg"
+    "Modified: / 08-04-2011 / 10:22:59 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 !
 
 postOpenWith:aBuilder
@@ -3567,20 +3596,29 @@
 
     |fileName|
     (fileName :=
-	(FileSelectionBrowser
-	    request: 'Load Changes List'
-	    fileName: changeFileName
-	    withFileFilters: #('c*'))) notNil
+        "
+        FileSelectionBrowser
+            request: 'Load Changes List'
+            fileName: changeFileName
+            withFileFilters: #('c*'))"
+        Dialog
+            requestFileName:'Load Changes List'
+            default: changeFileName
+            pattern:'*.chg;*.st'  
+        ) notNil
+
     ifTrue:
     [
-	changeFileName := fileName.
-	changes removeAll.
-	self readChangesFileInBackground:true.
-	self unselectChange.
-	Processor addTimedBlock:autoUpdateBlock afterSeconds:5.
-	self updateInfoLabel.
-	self autoSelectLast
+        changeFileName := fileName.
+        changes removeAll.
+        self readChangesFileInBackground:true.
+        self unselectChange.
+        Processor addTimedBlock:autoUpdateBlock afterSeconds:5.
+        self updateInfoLabel.
+        self autoSelectLast
     ]
+
+    "Modified: / 11-10-2010 / 20:35:28 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 !
 
 doReload
@@ -3848,10 +3886,6 @@
 
 !NewChangesBrowser class methodsFor:'documentation'!
 
-version
-    ^ '$Header: /cvs/stx/stx/libtool/NewChangesBrowser.st,v 1.32 2009-11-04 15:44:32 cg Exp $'
-!
-
 version_CVS
-    ^ '$Header: /cvs/stx/stx/libtool/NewChangesBrowser.st,v 1.32 2009-11-04 15:44:32 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libtool/NewChangesBrowser.st,v 1.33 2011-07-07 13:22:36 vrany Exp $'
 ! !