Tools__NewSystemBrowser.st
changeset 9540 9fb5a6c0f3bf
parent 9539 39ae73fc1d8b
child 9541 a0881b0914ab
--- a/Tools__NewSystemBrowser.st	Tue Aug 10 15:07:19 2010 +0200
+++ b/Tools__NewSystemBrowser.st	Wed Aug 11 14:30:43 2010 +0200
@@ -27,7 +27,7 @@
 		LastIndividualChecks LastAcceptPackage LastVariableRenames
 		LastVisitorClassName LastTemporaryVariableName BookMarks
 		FindHistory CheckForInstancesWhenRemovingClasses
-		SynchronousUpdate DefaultIsNewBuffer DoubleClickIsOpenBrowser
+		SynchronousUpdate DoubleClickIsOpenBrowser
 		ShowMethodTemplateWhenProtocolIsSelected
 		DefaultShowMethodTemplate DefaultShowMethodInheritance
 		DefaultEmphasizeUnloadedClasses DefaultImmediateSyntaxColoring
@@ -37,10 +37,10 @@
 		DefaultMarkApplications DefaultAutoFormat
 		DefaultShowMethodComplexity DefaultShowMethodTypeIcon
 		DefaultShowSpecialResourceEditors SharedMethodCategoryCache
-		LastMethodProcessingBlockString PreviousBuildDirectory
-		LastLoadedPackage DefaultShortAllClassesInNameSpaceOrganisation
-		LastTag DefaultShowPseudoProtocols DefaultShowMultitabMode
-		LastRenamedOld LastRenamedNew'
+		LastMethodProcessingBlockString LastLoadedPackages
+		DefaultShortAllClassesInNameSpaceOrganisation LastTag
+		DefaultShowPseudoProtocols DefaultShowMultitabMode LastRenamedOld
+		LastRenamedNew'
 	poolDictionaries:''
 	category:'Interface-Browsers-New'
 !
@@ -13843,7 +13843,7 @@
     selectedClasses isEmptyOrNil ifTrue:[^ false].
     selectedClasses size == 1 ifTrue:[^ true].
 
-    Behavior commonSuperclassOf:(selectedClasses ? #()).
+    commonSuper := Behavior commonSuperclassOf:(selectedClasses ? #()).
     ^ commonSuper notNil and:[ selectedClasses includes: commonSuper ].
 
     "Modified: / 11-02-2007 / 13:47:14 / cg"
@@ -14431,8 +14431,6 @@
 !
 
 hasProjectDefinitionWithAnyUnloadedClassSelected
-    |selected|
-
     ((self selectedClasses value) ? #()) do:[:cls |
         cls isLoaded ifFalse:[^ true].
         cls isProjectDefinition ifTrue:[
@@ -15497,8 +15495,7 @@
 
 delayedUpdateCodeWithAutoSearch:withAutoSearch checkModified:checkModified
     |methods mthd selectedClass protocol
-     codeView code filteredVariables searchAction searchPattern
-     package project doShowMethodTemplate|
+     codeView code filteredVariables searchAction searchPattern doShowMethodTemplate|
 
     self enqueueDelayedUpdateBufferLabel.
 
@@ -15854,8 +15851,7 @@
     "in the chain-browsers, a selection in one of the 4 columns has changed"
 
     |mySearchBlock  "/ must again be the first local (see kludge below)
-     generator selectedMethods selectedMethod
-     myGenerator myGeneratorsHome |
+     generator selectedMethods myGenerator myGeneratorsHome |
 
     selectedMethods := (navigationState selectedMethodsArrayAt:index) value ? #().
     "/ filter those which are lost due to recompilation ...
@@ -15865,7 +15861,6 @@
         generator := #().
         selectedMethods := #().
     ] ifFalse:[
-
         "/ fetch the searchBlock - what a tricky kludge (no, really this should be done different)
         myGenerator := (navigationState selectorListGeneratorArrayAt:index) value.
         myGeneratorsHome := myGenerator block methodHome.
@@ -18916,6 +18911,7 @@
             defaultDir := Filename currentDirectory
         ]
     ].
+    currentClassCategory := self theSingleSelectedCategory.
 
     UserPreferences current useNewFileDialog ifTrue:[
         saveName := Dialog
@@ -18941,7 +18937,11 @@
         cancelAllActionOrNil notNil ifTrue:[
             cancelAllButton := Button label:(resources string:'Cancel All').
             fileBox addButton:cancelAllButton before:fileBox cancelButton.
-            cancelAllButton action:cancelAllActionOrNil.
+            cancelAllButton action:[
+                cancelAllActionOrNil value.
+                fileBox doAccept.
+                fileBox okPressed.
+            ].
         ].
 
         fileBox showAtPointer.
@@ -19742,7 +19742,7 @@
     "create a copy of the selected class."
 
     |currentClass currentClassName owningClass newClassName newOwnerClass ownerName idx
-     newClass nameSpace|
+     newClass|
 
     currentClass := self theSingleSelectedLoadedNonMetaclassOrNil.
     currentClass isNil ifTrue:[
@@ -19815,9 +19815,6 @@
     ].
 
     "Modified: / 01-03-2007 / 20:50:33 / cg"
-
-
-
 !
 
 classMenuDefinition
@@ -22123,7 +22120,7 @@
 fileOutClass:aClass askForFile:doAsk withCancelAll:withCancelAll format:formatSymbolOrNil sourceMode:sourceMode
     "fileOut a class."
 
-    |fileBox saveName stillAsking cancelAll suffix|
+    |saveName stillAsking cancelAll suffix|
 
     suffix := self fileSuffixForClass:aClass format:formatSymbolOrNil.
     formatSymbolOrNil notNil ifTrue:[
@@ -22139,8 +22136,6 @@
                         withCancelAll:(withCancelAll
                                         ifTrue:[
                                                   cancelAll := true.
-                                                  fileBox doAccept.
-                                                  fileBox okPressed.
                                                ]
                                         ifFalse:nil).
 
@@ -23960,9 +23955,7 @@
 classMenuCompareWithSmallTeamVersionOnHost:hostName
     "compare the class against a version on another SmallTeam host"
 
-    |collectionOfClasses classes s
-     aStream comparedSource currentSource thisRevString
-     classesToUnload current remote diffs allDiffs
+    |collectionOfClasses classes classesToUnload current remote diffs allDiffs
      title|
 
     collectionOfClasses := self selectedClasses value.
@@ -25018,9 +25011,9 @@
 has still problems to layout comments in an acceptable way (although its much better
 than it used to be...) Therefore, please have an eye on each formatted method.'.
         ^ self.
-        self selectedMethodsDo:[:each | 
-            self formatMethod:each
-        ].
+"/        self selectedMethodsDo:[:each | 
+"/            self formatMethod:each
+"/        ].
     ].
 !
 
@@ -25029,7 +25022,7 @@
 !
 
 codeMenuInlineAllSelfSends
-    |currentMethod selector refactoring newSelector|
+    |currentMethod selector refactoring|
 
     (self askIfModified) ifFalse:[
         ^ self
@@ -25046,7 +25039,6 @@
 
     (self findSendersOf:selector andConfirmRefactoring:refactoring) ifTrue:[
         self performRefactoring:refactoring.
-        self switchToSelector:newSelector
     ]
 !
 
@@ -26131,7 +26123,7 @@
                     param := param collect:[:each | (each isKindOf:RBAbstractClass) ifTrue:[
                                                         each realClass
                                                     ] ifFalse:[
-self halt:'should not happen'.
+self error:'should not happen' mayProceed:true.
                                                         (each isKindOf:RBMethod) ifTrue:[
                                                         ] ifFalse:[
                                                         ].
@@ -26425,6 +26417,7 @@
 
     |mthd classList initialSelection class conditionBlock|
 
+initialSelection := nil.
 "/    LastBreakPointClassName notNil ifTrue:[
 "/        initialSelection := LastBreakPointClassName.
 "/    ].
@@ -27726,10 +27719,8 @@
         ^ self
     ].
 
-self halt.
     Tools::ProjectBuilderAssistantApplication new
         projectType:projectDefinition projectType.    
-self halt.
 
     Tools::ProjectBuilder new
         package:projectToBuild;
@@ -27881,7 +27872,7 @@
 projectMenuCheckInProject:packageToCheckIn classes:doClasses extensions:doExtensions buildSupport:doBuild askForMethodsInOtherPackages:askForMethodsInOtherPackages
     |classes classesToCheckIn methodsToCheckIn
      methodsInOtherPackages looseMethods otherPackages
-     msg classesInChangeSet checkinInfo originalCheckinInfo labels values classesToTag|
+     msg classesInChangeSet checkinInfo originalCheckinInfo classesToTag|
 
     classes := Smalltalk allClasses.
 
@@ -28188,7 +28179,6 @@
                 (cls := eachClassDefinition changeClass) notNil ifTrue:[
                     (oldPackage := cls package) ~= eachProject ifTrue:[
                         (Dialog confirm:('Move the %1-class from %2 to %3 ?' bindWith:cls name allBold with:oldPackage allBold with:eachProject allBold)) ifTrue:[
-self halt.
                             cls package:eachProject.
                             cls instAndClassMethodsDo:[:m | m package = oldPackage ifTrue:[ m package:eachProject]].
                         ]
@@ -28196,7 +28186,6 @@
                 ].
             ].
             changeSets do:[:chgSet |
-self halt.
                 chgSet apply
             ].
         ].
@@ -28774,8 +28763,7 @@
 !
 
 projectMenuImport:doLoadClasses
-    |currentProject default pkg fromWhere abbrevFile loadAllFile
-     module checkedOutPackageDir package numImported numSkipped msg classDefs
+    |currentProject default pkg fromWhere module checkedOutPackageDir package numImported numSkipped msg classDefs
      filePerClassDefintion importFromFilesystem importDirectory importFromDirectoryAction|
 
     importFromFilesystem := false.
@@ -34220,7 +34208,6 @@
                                                     select:[:extensionMethod |
                                                         (packages includes:extensionMethod package)])
                                     ].
-                                l
                             ].
                             l
                        ].
@@ -35550,7 +35537,7 @@
 variablesRemoveWithConfirmation
     "remove selected variable(s)."
 
-    |variablesToRemove msg|
+    |variablesToRemove|
 
     variablesToRemove := self selectedVariables value.
     variablesToRemove size == 0 ifTrue:[^ self ].
@@ -36132,7 +36119,7 @@
 
     <resource: #programMenu >
 
-    |m mthd mSel contractedSelector item l cut methods allMessagesSent|
+    |m mthd mSel contractedSelector item l methods allMessagesSent|
 
     m := Menu new.
 
@@ -37185,7 +37172,7 @@
 !NewSystemBrowser methodsFor:'private-buffers'!
 
 removeBuffer:nr
-    |prevBuffer nextBuffer previouslyUsedBuffer newIndex state|
+    |prevBuffer previouslyUsedBuffer newIndex state|
 
     state := buffers at:nr.
 
@@ -38161,7 +38148,7 @@
 !NewSystemBrowser methodsFor:'private-dialogs'!
 
 askForDirectoryToFileOut:title default:defaultDirOrNil
-    |fileBox dirName dir|
+    |dirName dir|
 
     dir := defaultDirOrNil.
     dir isNil ifTrue:[
@@ -38624,7 +38611,7 @@
     "helper for move-class-to-project and move-method-to-ptoject;
      Ask for the new project (package-id)"
 
-    |offered already allProjects newProject box classesProjects selectedClasses selectedMethods|
+    |offered already allProjects classesProjects selectedClasses selectedMethods|
 
     allProjects := Smalltalk allProjectIDs.
 
@@ -39986,7 +39973,7 @@
 selectorToSearchFor
     "look in codeView and methodListView for a search-string when searching for selectors"
 
-    |sel t goodSelectors|
+    |sel|
 
     sel := self selectedSelectorInCodeViewOrNil.
     sel isNil ifTrue:[
@@ -42315,8 +42302,7 @@
     <resource: #obsolete>
     |codeView selector receiver nm srchClass implClass
      bestSelectors bestPrefixes best nodeVal info numArgs
-     newParts char nSelParts oldLen newLen oldVar selectorParts
-     selectorOfMessageToNode|
+     newParts nSelParts oldLen newLen selectorParts|
 
 self obsoleteMethodWarning.
     codeView := self codeView.
@@ -44586,11 +44572,11 @@
 !NewSystemBrowser class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libtool/Tools__NewSystemBrowser.st,v 1.1473 2010-08-10 13:07:19 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libtool/Tools__NewSystemBrowser.st,v 1.1474 2010-08-11 12:30:43 stefan Exp $'
 !
 
 version_CVS
-    ^ '$Header: /cvs/stx/stx/libtool/Tools__NewSystemBrowser.st,v 1.1473 2010-08-10 13:07:19 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libtool/Tools__NewSystemBrowser.st,v 1.1474 2010-08-11 12:30:43 stefan Exp $'
 ! !
 
 NewSystemBrowser initialize!