Tools__NewSystemBrowser.st
branchjv
changeset 16571 cf319f2e56d0
parent 16570 dc5e958a20dc
parent 16533 84fe5d2d72f3
child 16573 2f5cd8950dcf
equal deleted inserted replaced
16570:dc5e958a20dc 16571:cf319f2e56d0
   446 'Hide toolbar. Show again via the "View"-Menu'
   446 'Hide toolbar. Show again via the "View"-Menu'
   447 
   447 
   448 #hideBookmarkBar
   448 #hideBookmarkBar
   449 'Hide the bookmark-bar. Show again via the "View"-menu'
   449 'Hide the bookmark-bar. Show again via the "View"-menu'
   450 
   450 
       
   451 #infoLabelHelp
       
   452 'Display info on the just selected method, the clicked on code-fragment or the current activity'
       
   453 
   451 #redoOperation
   454 #redoOperation
   452 'Redo undone operation'
   455 'Redo undone operation'
   453 
   456 
   454 #undoOperation
   457 #undoOperation
   455 'Undo operation'
   458 'Undo operation'
       
   459 
   456 
   460 
   457 ).
   461 ).
   458 
   462 
   459     (RefactoryChangeManager notNil and:[ RefactoryChangeManager isLoaded ]) ifTrue:[
   463     (RefactoryChangeManager notNil and:[ RefactoryChangeManager isLoaded ]) ifTrue:[
   460         manager := RefactoryChangeManager instance.
   464         manager := RefactoryChangeManager instance.
  1471                          name: 'InfoLabel'
  1475                          name: 'InfoLabel'
  1472                          level: -1
  1476                          level: -1
  1473                          translateLabel: true
  1477                          translateLabel: true
  1474                          labelChannel: infoLabelHolder
  1478                          labelChannel: infoLabelHolder
  1475                          adjust: left
  1479                          adjust: left
       
  1480                          activeHelpKey: infoLabelHelp
  1476                        )
  1481                        )
  1477                       (HorizontalPanelViewSpec
  1482                       (HorizontalPanelViewSpec
  1478                          name: 'PackageInfoPanel'
  1483                          name: 'PackageInfoPanel'
  1479                          level: -1
  1484                          level: -1
  1480                          horizontalLayout: rightSpaceFit
  1485                          horizontalLayout: rightSpaceFit
  1481                          verticalLayout: fitSpace
  1486                          verticalLayout: fitSpace
  1482                          horizontalSpace: 0
  1487                          horizontalSpace: 0
  1483                          verticalSpace: 0
  1488                          verticalSpace: 0
  1484                          elementsChangeSize: true
  1489                          elementsChangeSize: true
       
  1490                          activeHelpKey: packageInfoLabel
  1485                          component: 
  1491                          component: 
  1486                         (SpecCollection
  1492                         (SpecCollection
  1487                            collection: (
  1493                            collection: (
  1488                             (LabelSpec
  1494                             (LabelSpec
  1489                                label: 'Package'
  1495                                label: 'Package'
 12667             label: 'Sort by Name'
 12673             label: 'Sort by Name'
 12668             hideMenuOnActivated: false
 12674             hideMenuOnActivated: false
 12669             indication: sortVariablesByName
 12675             indication: sortVariablesByName
 12670           )
 12676           )
 12671          (MenuItem
 12677          (MenuItem
       
 12678             label: 'Group by Inheritance'
       
 12679             hideMenuOnActivated: false
       
 12680             indication: groupVariablesByInheritance
       
 12681           )
       
 12682          (MenuItem
 12672             label: '-'
 12683             label: '-'
 12673           )
 12684           )
 12674          (MenuItem
 12685          (MenuItem
 12675             enabled: hasClassSelectedHolder
 12686             enabled: hasClassSelectedHolder
 12676             label: 'Generate'
 12687             label: 'Generate'
 18433                             |cls|
 18444                             |cls|
 18434 
 18445 
 18435                             cls := Smalltalk classNamed:nm.
 18446                             cls := Smalltalk classNamed:nm.
 18436                             cls isNil ifTrue:[
 18447                             cls isNil ifTrue:[
 18437                                 "/ class no longer exists (removed?)
 18448                                 "/ class no longer exists (removed?)
 18438                                 nm colorizeAllWith:(Color gray)
 18449                                 nm withColor:(Color gray)
 18439                             ] ifFalse:[
 18450                             ] ifFalse:[
 18440                                 cls isJavaClass ifTrue:[
 18451                                 cls isJavaClass ifTrue:[
 18441                                     cls javaName
 18452                                     cls javaName
 18442                                 ] ifFalse:[
 18453                                 ] ifFalse:[
 18443                                     genShortNameListEntry value:(Smalltalk classNamed:nm)
 18454                                     genShortNameListEntry value:(Smalltalk classNamed:nm)
 19701 selectedMethods4
 19712 selectedMethods4
 19702     ^ self navigationState selectedMethodsArrayAt:4
 19713     ^ self navigationState selectedMethodsArrayAt:4
 19703 !
 19714 !
 19704 
 19715 
 19705 selectedMethodsClasses
 19716 selectedMethodsClasses
 19706     ^ (self selectedMethodsValue collect:[:m | m mclass] as:Set)
 19717     ^ (self selectedMethodsValue 
       
 19718         collect:[:m | m mclass] as:Set)
 19707             select:[:each| each notNil]
 19719             select:[:each| each notNil]
 19708 
 19720 
 19709     "Created: / 07-08-2006 / 12:13:37 / cg"
 19721     "Created: / 07-08-2006 / 12:13:37 / cg"
 19710 !
 19722 !
 19711 
 19723 
 19749 selectorListGenerator
 19761 selectorListGenerator
 19750     ^ self navigationState selectorListGenerator
 19762     ^ self navigationState selectorListGenerator
 19751 !
 19763 !
 19752 
 19764 
 19753 selectorListGenerator1
 19765 selectorListGenerator1
       
 19766     "used for the sender-/implementor-chain's first methodlist"
       
 19767     
 19754     ^ self navigationState selectorListGeneratorArrayAt:1
 19768     ^ self navigationState selectorListGeneratorArrayAt:1
 19755 !
 19769 !
 19756 
 19770 
 19757 selectorListGenerator2
 19771 selectorListGenerator2
       
 19772     "used for the sender-/implementor-chain's second methodlist"
       
 19773 
 19758     ^ self navigationState selectorListGeneratorArrayAt:2
 19774     ^ self navigationState selectorListGeneratorArrayAt:2
 19759 !
 19775 !
 19760 
 19776 
 19761 selectorListGenerator3
 19777 selectorListGenerator3
       
 19778     "used for the sender-/implementor-chain's third methodlist"
       
 19779 
 19762     ^ self navigationState selectorListGeneratorArrayAt:3
 19780     ^ self navigationState selectorListGeneratorArrayAt:3
 19763 !
 19781 !
 19764 
 19782 
 19765 selectorListGenerator4
 19783 selectorListGenerator4
       
 19784     "used for the sender-/implementor-chain's fourth methodlist"
       
 19785 
 19766     ^ self navigationState selectorListGeneratorArrayAt:4
 19786     ^ self navigationState selectorListGeneratorArrayAt:4
 19767 !
 19787 !
 19768 
 19788 
 19769 selectorListGenerator5
 19789 selectorListGenerator5
 19770 
 19790     "Used for all method's generator of ClassList. "
 19771     "Used for all methods generator of ClassList. "
       
 19772 
 19791 
 19773     ^ self navigationState selectorListGeneratorArrayAt:5
 19792     ^ self navigationState selectorListGeneratorArrayAt:5
 19774 
 19793 
 19775     "Created: / 07-08-2011 / 19:06:20 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 19794     "Created: / 07-08-2011 / 19:06:20 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 19776 !
 19795 !
 20387     classListApp unloadedClassesColor:clr.
 20406     classListApp unloadedClassesColor:clr.
 20388     "/ classListApp updateList.
 20407     "/ classListApp updateList.
 20389     classListApp invalidateList.
 20408     classListApp invalidateList.
 20390 
 20409 
 20391     "Modified: / 31.10.2001 / 11:14:50 / cg"
 20410     "Modified: / 31.10.2001 / 11:14:50 / cg"
       
 20411 !
       
 20412 
       
 20413 groupVariablesByInheritance
       
 20414     ^ builder valueAspectFor:#groupVariablesByInheritance initialValue:true
 20392 !
 20415 !
 20393 
 20416 
 20394 hidePrivateClasses
 20417 hidePrivateClasses
 20395     ^ self navigationState hidePrivateClasses
 20418     ^ self navigationState hidePrivateClasses
 20396 
 20419 
 24937 
 24960 
 24938 flyByHelpSpec
 24961 flyByHelpSpec
 24939     |changeSet spec|
 24962     |changeSet spec|
 24940 
 24963 
 24941     spec := super flyByHelpSpec.
 24964     spec := super flyByHelpSpec.
       
 24965 
 24942     changeSet := ChangeSet current.
 24966     changeSet := ChangeSet current.
       
 24967     "/ (changeSet contains:[:chg | chg isMethodChange and:[chg changeClass notNil]]) ifTrue:[
 24943     (changeSet findLast:[:chg | chg isMethodChange and:[chg changeClass notNil]]) ~~ 0 ifTrue:[
 24968     (changeSet findLast:[:chg | chg isMethodChange and:[chg changeClass notNil]]) ~~ 0 ifTrue:[
 24944         spec at:#recentChanges put:(spec at:#recentlyChangedMethods).
 24969         spec at:#recentChanges put:(spec at:#recentlyChangedMethods).
 24945     ] ifFalse:[
 24970     ] ifFalse:[
 24946 "/        (changeSet contains:[:chg | chg isClassChange and:[chg changeClass notNil]]) ifTrue:[
 24971 "/        (changeSet contains:[:chg | chg isClassChange and:[chg changeClass notNil]]) ifTrue:[
 24947 "/            spec at:#recentChanges put:(spec at:#recentlyChangedClasses).
 24972 "/            spec at:#recentChanges put:(spec at:#recentlyChangedClasses).
 24952     ^ spec.
 24977     ^ spec.
 24953 
 24978 
 24954     "Modified: / 08-09-2011 / 05:05:06 / cg"
 24979     "Modified: / 08-09-2011 / 05:05:06 / cg"
 24955 !
 24980 !
 24956 
 24981 
 24957 flyByHelpTextFor:aComponent
 24982 flyByHelpTextFor:aWidget at:aPoint
 24958 "/    (aComponent == builder componentAt:) ifTrue:[
 24983     |action info label|
 24959 "/    ].
 24984     
 24960     ^ super flyByHelpTextFor:aComponent
 24985     aWidget = (navigationState canvas builder componentAt:'InfoLabel') ifTrue:[
       
 24986         action := aWidget actionAt:aPoint.
       
 24987         Transcript showCR:action.
       
 24988         info := action perform:#info ifNotUnderstood:nil.
       
 24989         info notNil ifTrue:[
       
 24990             ^ info value
       
 24991         ].
       
 24992         (label := aWidget label) notNil ifTrue:[
       
 24993             (label widthOn:aWidget) > aWidget width ifTrue:[
       
 24994                 ^ label
       
 24995             ]    
       
 24996         ]    
       
 24997     ].
       
 24998     ^ nil
 24961 ! !
 24999 ! !
 24962 
 25000 
 24963 !NewSystemBrowser methodsFor:'history'!
 25001 !NewSystemBrowser methodsFor:'history'!
 24964 
 25002 
 24965 addToFindHistory:class selector:selector
 25003 addToFindHistory:class selector:selector
 39382                                         ]
 39420                                         ]
 39383                                     ].
 39421                                     ].
 39384                                 ].
 39422                                 ].
 39385                                 iconifiedOrNot := ''.
 39423                                 iconifiedOrNot := ''.
 39386                                 topView isCollapsed ifTrue:[
 39424                                 topView isCollapsed ifTrue:[
 39387                                     iconifiedOrNot := ' iconified' colorizeAllWith:Color blue.
 39425                                     iconifiedOrNot := ' iconified' withColor:Color blue.
 39388                                 ].
 39426                                 ].
 39389                                 busyOrNot notEmptyOrNil ifTrue:[
 39427                                 busyOrNot notEmptyOrNil ifTrue:[
 39390                                     busyOrNot := busyOrNot allBold colorizeAllWith:Color red
 39428                                     busyOrNot := busyOrNot allBold withColor:Color red
 39391                                 ].
 39429                                 ].
 39392                                 winLabel := '  ("' , topLabel , '"',busyOrNot,iconifiedOrNot, ')'
 39430                                 winLabel := '  ("' , topLabel , '"',busyOrNot,iconifiedOrNot, ')'
 39393                             ].
 39431                             ].
 39394                         ] ifFalse:[
 39432                         ] ifFalse:[
 39395                             (aProcess isDebugged) ifTrue:[
 39433                             (aProcess isDebugged) ifTrue:[
 39396                                 winLabel := ' (debug)' allBold colorizeAllWith:Color red
 39434                                 winLabel := ' (debug)' allBold withColor:Color red
 39397                             ].
 39435                             ].
 39398                         ].
 39436                         ].
 39399                         aProcess id printString , ' [' , pName , ']' , winLabel
 39437                         aProcess id printString , ' [' , pName , ']' , winLabel
 39400                     ].
 39438                     ].
 39401 
 39439 
 46651 
 46689 
 46652 selectorMenuBrowseRepositoryVersionsUsingManager: manager
 46690 selectorMenuBrowseRepositoryVersionsUsingManager: manager
 46653 
 46691 
 46654     |method mclass mselector className mgr revisions previousMethods browser
 46692     |method mclass mselector className mgr revisions previousMethods browser
 46655      lastSource currentSource lastRevision lastDate lastChange lastAuthor thisIsAnExtensionMethod
 46693      lastSource currentSource lastRevision lastDate lastChange lastAuthor thisIsAnExtensionMethod
 46656      packageId directory module|
 46694      packageId directory module currentVersion newestVersion|
 46657 
 46695 
 46658     method := self theSingleSelectedMethod.
 46696     method := self theSingleSelectedMethod.
 46659     method isNil ifTrue:[^ self].
 46697     method isNil ifTrue:[^ self].
 46660 
 46698 
 46661     mclass := method mclass.
 46699     mclass := method mclass.
 46666 
 46704 
 46667         set := ChangeSet forExistingMethods:(Array with:method).
 46705         set := ChangeSet forExistingMethods:(Array with:method).
 46668         set := set select:[:c | c isMethodChange].
 46706         set := set select:[:c | c isMethodChange].
 46669         lastChange := set first.
 46707         lastChange := set first.
 46670     ] value.
 46708     ] value.
 46671 
 46709     currentVersion := mclass revisionOfManager:manager.
       
 46710     
 46672     thisIsAnExtensionMethod := (method isExtension).
 46711     thisIsAnExtensionMethod := (method isExtension).
 46673     thisIsAnExtensionMethod ifTrue:[
 46712     thisIsAnExtensionMethod ifTrue:[
 46674         packageId := method package asPackageId.
 46713         packageId := method package asPackageId.
 46675         mgr := manager
 46714         mgr := manager
 46676     ] ifFalse:[
 46715     ] ifFalse:[
 46681     ].
 46720     ].
 46682     directory := packageId directory.
 46721     directory := packageId directory.
 46683     module := packageId module.
 46722     module := packageId module.
 46684 
 46723 
 46685     self withWaitCursorDo:[
 46724     self withWaitCursorDo:[
 46686         |revisionLog start stop answer t tS list msg first|
 46725         |revisionLog numRevisions stop answer t tS list msg first|
 46687 
 46726 
 46688         thisIsAnExtensionMethod ifTrue:[
 46727         thisIsAnExtensionMethod ifTrue:[
 46689             revisionLog := mgr
 46728             revisionLog := mgr
 46690                 revisionLogOf:nil
 46729                 revisionLogOf:nil
 46691                 fromRevision:nil
 46730                 fromRevision:nil
 46697         ] ifFalse:[
 46736         ] ifFalse:[
 46698             revisionLog := mgr revisionLogOf:mclass.
 46737             revisionLog := mgr revisionLogOf:mclass.
 46699         ].
 46738         ].
 46700         revisions := revisionLog at:#revisions.
 46739         revisions := revisionLog at:#revisions.
 46701 
 46740 
 46702         start := 1.
 46741         stop := numRevisions := revisions size.
 46703         stop := revisions size.
       
 46704         stop > 20 ifTrue:[
 46742         stop > 20 ifTrue:[
 46705             thisIsAnExtensionMethod ifTrue:[
 46743             thisIsAnExtensionMethod ifTrue:[
 46706                 t := 500.   "/ fake time
 46744                 t := 500.   "/ fake time
 46707             ] ifFalse:[
 46745             ] ifFalse:[
 46708                 "/ measure the time it takes to checkout a version...
 46746                 "/ measure the time it takes to checkout a version...
 46712                     revSourceStream := mgr getSourceStreamFor:mclass revision:((revisions at:10) at:#revision).
 46750                     revSourceStream := mgr getSourceStreamFor:mclass revision:((revisions at:10) at:#revision).
 46713                     ChangeSet fromStream:revSourceStream.
 46751                     ChangeSet fromStream:revSourceStream.
 46714                     revSourceStream close.
 46752                     revSourceStream close.
 46715                 ].
 46753                 ].
 46716             ].
 46754             ].
       
 46755             newestVersion := revisions first at:#revision.
 46717 
 46756 
 46718             list := revisions collect:[:entry |
 46757             list := revisions collect:[:entry |
 46719                                         |rev author dateString date msg|
 46758                                         |rev author dateString date msg|
 46720 
 46759 
 46721                                         rev := entry at:#revision.
 46760                                         rev := entry at:#revision.
 46726                                         entry at:#date put:dateString.
 46765                                         entry at:#date put:dateString.
 46727                                         msg := ((entry at:#logMessage) asStringCollection firstIfEmpty:'') asString.
 46766                                         msg := ((entry at:#logMessage) asStringCollection firstIfEmpty:'') asString.
 46728                                         rev,' ',author,' ',dateString,' ',msg
 46767                                         rev,' ',author,' ',dateString,' ',msg
 46729                                       ].
 46768                                       ].
 46730             msg := 'There are %1 revisions to extract from the repository'.
 46769             msg := 'There are %1 revisions to extract from the repository'.
 46731             t := (t * revisions size / 1000) rounded.
 46770             t := (t * numRevisions / 1000) rounded.
 46732             t < 10 ifTrue:[
 46771             t < 10 ifTrue:[
 46733                 msg := msg,'\(this will take a few seconds).'.
 46772                 msg := msg,'\(this will take a few seconds).'.
 46734                 tS := t.
 46773                 tS := t.
 46735             ] ifFalse:[
 46774             ] ifFalse:[
 46736                 t := t * revisions size // 1000 // 10 * 10.
 46775                 t := t * numRevisions // 1000 // 10 * 10.
 46737                 tS := (TimeDuration fromSeconds:t) printStringForApproximation.
 46776                 tS := (TimeDuration fromSeconds:t) printStringForApproximation.
 46738                 msg := msg,'\(this will take roughly %2).'
 46777                 msg := msg,'\(this will take roughly %2).'
 46739             ].
 46778             ].
 46740             msg := msg,'\\Do you want to see all or only some of the revisions ?'.
 46779             msg := msg,'\\Do you want to see all or only some of the revisions ?'.
 46741 
 46780 
 46742             answer := Dialog
 46781             answer := Dialog
 46743                 choose:(resources stringWithCRs:msg
 46782                 choose:(resources stringWithCRs:msg with:numRevisions with:tS)
 46744                                     with:revisions size
       
 46745                                     with:tS)
       
 46746                 fromList:list values:revisions initialSelection:nil
 46783                 fromList:list values:revisions initialSelection:nil
 46747                 buttons:nil
 46784                 buttons:nil
 46748                 values:nil
 46785                 values:nil
 46749                 default:nil
 46786                 default:nil
 46750                 lines:20
 46787                 lines:20
 46751                 cancel:[^ self]
 46788                 cancel:[^ self]
 46752                 multiple:false
 46789                 multiple:false
 46753                 title:(resources string:'Confirmation')
 46790                 title:(resources string:'Confirmation')
 46754                 postBuildBlock:[:dialog |
 46791                 postBuildBlock:
 46755                             |b|
 46792                     [:dialog |
 46756 
 46793                         |b|
 46757                             b := Button label:(resources string:'Browse Newer than Selected').
 46794 
 46758                             b action:[ stop := (dialog componentAt:#ListView) selection. dialog okPressed].
 46795                         b := Button label:(resources string:'Browse Newer than Selected').
 46759                             b := dialog addButton:b before:dialog okButton.
 46796                         b action:[ stop := (dialog componentAt:#ListView) selection. dialog okPressed].
 46760 
 46797                         b := dialog addButton:b before:dialog okButton.
 46761                             dialog okButton label:(resources string:'Browse All').
 46798 
 46762                             dialog okButton action:[ stop := revisions size. dialog okPressed].
 46799                         dialog okButton label:(resources string:'Browse All').
 46763                         ].
 46800                         dialog okButton action:[ stop := revisions size. dialog okPressed].
       
 46801                     ].
 46764 
 46802 
 46765             stop isNil ifTrue:[^ self ].
 46803             stop isNil ifTrue:[^ self ].
 46766         ].
 46804         ].
 46767 
 46805 
 46768 t := Time millisecondsToRun:[
 46806 t := Time millisecondsToRun:[
 46769 
 46807 
 46770         previousMethods := ChangeSet new.
 46808         previousMethods := ChangeSet new.
 46771         lastSource := currentSource := method source.
 46809         currentSource := method source.
       
 46810         currentVersion = newestVersion ifTrue:[
       
 46811             lastSource := currentSource.
       
 46812         ].    
 46772         lastRevision := lastDate := lastAuthor := nil.
 46813         lastRevision := lastDate := lastAuthor := nil.
 46773         first := true.
 46814         first := true.
 46774 
 46815 self halt.
 46775         revisions from:start to:stop do:[:eachLogEntry |
 46816         "/ revisions at:1 is now the newest (may be newer than current!!)         
       
 46817         revisions from:1 to:stop do:[:eachLogEntry |
 46776             |revision date author revSourceStream|
 46818             |revision date author revSourceStream|
 46777 
 46819 
 46778             revision := eachLogEntry at:#revision.
 46820             revision := eachLogEntry at:#revision.
 46779             date := eachLogEntry at:#date.
 46821             date := eachLogEntry at:#date.
 46780             author := eachLogEntry at:#author ifAbsent:'?'.      
 46822             author := eachLogEntry at:#author ifAbsent:'?'.      
 46781 
 46823 
 46782             [
 46824             [
 46783                 |chg nChg classChangeSet changeSource changeName|
 46825                 |chg nChg classChangeSet changeSource changeName|
 46784 
 46826 
 46785                 self activityNotification:('Fetching revision ',revision,'...').
 46827                 self activityNotification:(resources string:'Fetching revision %1...' with:revision).
 46786                 thisIsAnExtensionMethod ifTrue:[
 46828                 thisIsAnExtensionMethod ifTrue:[
 46787                     revSourceStream := mgr
 46829                     revSourceStream := mgr
 46788                                             streamForClass:nil
 46830                                             streamForClass:nil
 46789                                             fileName:'extensions.st'
 46831                                             fileName:'extensions.st'
 46790                                             revision:revision
 46832                                             revision:revision
 46793                                             cache:true.
 46835                                             cache:true.
 46794                 ] ifFalse:[
 46836                 ] ifFalse:[
 46795                     revSourceStream := mgr getSourceStreamFor:mclass revision:revision.
 46837                     revSourceStream := mgr getSourceStreamFor:mclass revision:revision.
 46796                 ].
 46838                 ].
 46797                 revSourceStream isNil ifTrue:[
 46839                 revSourceStream isNil ifTrue:[
 46798                     self warn:'could not load source for ' , mclass name , ' revision ', revision,  ' from repository'.
 46840                     self warn:(resources string:'Could not load source for %1 revision %2 from repository' with:mclass name with:revision).
 46799                     chg := nil.
 46841                     chg := nil.
 46800                 ] ifFalse:[
 46842                 ] ifFalse:[
 46801                     classChangeSet := ChangeSet fromStream:revSourceStream.
 46843                     classChangeSet := ChangeSet fromStream:revSourceStream.
 46802 
 46844 
 46803                     chg := classChangeSet
 46845                     chg := classChangeSet
 46804                                 detect:[:chg | chg isMethodChange
 46846                                 detect:[:chg | chg isMethodChange
 46805                                                and:[chg selector = mselector
 46847                                                and:[chg selector = mselector
 46806                                                and:[chg className = className]]]
 46848                                                and:[chg fullClassName = className]]]
 46807                                 ifNone:nil.
 46849                                 ifNone:nil.
       
 46850                     chg isNil ifTrue:[
       
 46851                         "/ maybe the class was renamed!!
       
 46852                         (classChangeSet contains:[:chg | chg isMethodChange and:[chg selector = mselector]]) ifTrue:[
       
 46853                             self halt:'check for renamed class'.
       
 46854                         ]     
       
 46855                     ].            
 46808                 ].
 46856                 ].
 46809 
 46857 
 46810                 chg isNil ifTrue:[
 46858                 chg isNil ifTrue:[
 46811                     "the method was created in the next version (previous one processed)"
 46859                     "the method was created in the next version (previous one processed)"
 46812                 ] ifFalse:[
 46860                 ] ifFalse:[
 46819                         "/ mhm - was not in the previous version
 46867                         "/ mhm - was not in the previous version
 46820                     ] ifFalse:[
 46868                     ] ifFalse:[
 46821                         nChg := lastChange asNamedMethodChange
 46869                         nChg := lastChange asNamedMethodChange
 46822                     ].
 46870                     ].
 46823                     lastRevision isNil ifTrue:[
 46871                     lastRevision isNil ifTrue:[
       
 46872                         
 46824                         (stop = revisions size) ifTrue:[
 46873                         (stop = revisions size) ifTrue:[
 46825                             changeName := 'current (not in the repository)'.
 46874                             changeName := 'current (not in the repository)'.
 46826                         ] ifFalse:[
 46875                         ] ifFalse:[
 46827                             "/ not showing all - dont really know
 46876                             "/ not showing all - don't really know
 46828                             changeName := 'current'.
 46877                             changeName := 'current'.
 46829                         ].
 46878                         ].
 46830                     ] ifFalse:[
 46879                     ] ifFalse:[
 46831                         changeName := lastRevision,' [',lastDate,' by ',lastAuthor,']'.
 46880                         changeName := lastRevision,' [',lastDate,' by ',lastAuthor,']'.
 46832                         first ifTrue:[
 46881                         first ifTrue:[
 46833                             changeName := changeName,' (= current)'.
 46882                             (newestVersion compareAsVersionNumberWith:lastRevision) >= 0 ifTrue:[
       
 46883                                 changeName := changeName,' (= current)'.
       
 46884                             ].    
 46834                         ]
 46885                         ]
 46835                     ].
 46886                     ].
 46836                     nChg notNil ifTrue:[
 46887                     nChg notNil ifTrue:[
 46837                         nChg changeName:changeName.
 46888                         nChg changeName:changeName.
 46838                         previousMethods add:nChg.
 46889                         previousMethods add:nChg.
 46852 ].
 46903 ].
 46853 "/ Transcript showCR:('it took %1 seconds' bindWith:(t /1000)printString).
 46904 "/ Transcript showCR:('it took %1 seconds' bindWith:(t /1000)printString).
 46854 
 46905 
 46855         self activityNotification:nil.
 46906         self activityNotification:nil.
 46856         browser := (UserPreferences current changeSetBrowserClass) openOn:previousMethods.
 46907         browser := (UserPreferences current changeSetBrowserClass) openOn:previousMethods.
 46857         browser window label:('Revisions of ' , mclass name , ' ' , mselector).
 46908         browser window label:(resources string:'Revisions of %1  %2' with:mclass name with:mselector).
 46858         browser readOnly:true.
 46909         browser readOnly:true.
 46859     ].
 46910     ].
 46860 
 46911 
 46861     "Modified: / 01-07-2011 / 16:34:29 / cg"
 46912     "Modified: / 01-07-2011 / 16:34:29 / cg"
 46862     "Created: / 18-11-2011 / 18:19:50 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 46913     "Created: / 18-11-2011 / 18:19:50 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 52846 
 52897 
 52847     item := menu menuItemWithKey:#SCM.
 52898     item := menu menuItemWithKey:#SCM.
 52848     (item notNil) ifTrue:[
 52899     (item notNil) ifTrue:[
 52849         manager notNil ifTrue:[
 52900         manager notNil ifTrue:[
 52850             manager := managers anyOne.
 52901             manager := managers anyOne.
 52851             item label:(resources string:'Repository') , '  ' , (manager managerTypeName asText colorizeAllWith:Color gray).
 52902             item label:(resources string:'Repository') , '  ' , (manager managerTypeName withColor:Color gray).
 52852         ] ifFalse:[
 52903         ] ifFalse:[
 52853             item label:(resources string:'Repository').
 52904             item label:(resources string:'Repository').
 52854             item enabled: false.
 52905             item enabled: false.
 52855         ].
 52906         ].
 52856     ].
 52907     ].
 52857     self replaceSourceCodeManagerPlaceholderWith: manager in: menu.
 52908     self replaceSourceCodeManagerPlaceholderWith: manager in: menu.
 52858     (layout = 'inline') ifTrue:[
 52909     (layout = 'inline') ifTrue:[
 52859         menu itemsDo:[:item|
 52910         menu itemsDo:[:item|
 52860             manager notNil ifTrue:[
 52911             manager notNil ifTrue:[
 52861                 item argument == manager name ifTrue:[
 52912                 item argument == manager name ifTrue:[
 52862                     item label: (item label , '  ' , ((resources string: '(default)') asText colorizeAllWith: Color gray)).
 52913                     item label: (item label , '  ' , ((resources string: '(default)') withColor: Color gray)).
 52863                 ]
 52914                 ]
 52864             ] ifFalse:[
 52915             ] ifFalse:[
 52865                 item enabled: false
 52916                 item enabled: false
 52866             ].
 52917             ].
 52867         ]
 52918         ]
 53959                                                       , (classesMatchingCaseless size == 1 ifTrue:['class'] ifFalse:['classes'])
 54010                                                       , (classesMatchingCaseless size == 1 ifTrue:['class'] ifFalse:['classes'])
 53960                                                       ,' with a similar name.\\Goto one of them ?'
 54011                                                       ,' with a similar name.\\Goto one of them ?'
 53961                                         with:aMatchString allBold
 54012                                         with:aMatchString allBold
 53962                                         with:implementors size
 54013                                         with:implementors size
 53963                                         with:classesMatchingCaseless size)
 54014                                         with:classesMatchingCaseless size)
 53964                         fromList:({'Implementors:' colorizeAllWith:Color gray}
 54015                         fromList:({'Implementors:' withColor:Color gray}
 53965                                   ,(implementors collect:[:m | m mclass name])
 54016                                   ,(implementors collect:[:m | m mclass name])
 53966                                   ,'-'
 54017                                   ,'-'
 53967                                   ,{'Classes:' colorizeAllWith:Color gray}
 54018                                   ,{'Classes:' withColor:Color gray}
 53968                                   ,classesMatchingCaseless)
 54019                                   ,classesMatchingCaseless)
 53969                         values:(#(nil),implementors,#(nil nil),classesMatchingCaseless)
 54020                         values:(#(nil),implementors,#(nil nil),classesMatchingCaseless)
 53970                         buttons:#('No, Search for a Class' 'Show all Implementors') 
 54021                         buttons:#('No, Search for a Class' 'Show all Implementors') 
 53971                         values:{ searchClassToken . browseAllImplementorsToken}
 54022                         values:{ searchClassToken . browseAllImplementorsToken}
 53972                         lines:10 cancel:nil
 54023                         lines:10 cancel:nil
 56043                 numFound == 0 ifTrue:[
 56094                 numFound == 0 ifTrue:[
 56044                     question := resources 
 56095                     question := resources 
 56045                                     stringWithCRs:label,extraStringMsg 
 56096                                     stringWithCRs:label,extraStringMsg 
 56046                                     with:((string ? '') 
 56097                                     with:((string ? '') 
 56047                                             allBold 
 56098                                             allBold 
 56048                                                 colorizeAllWith:Color red darkened).
 56099                                                 withColor:Color red darkened).
 56049                     question := question , (resources string:' - none found.').
 56100                     question := question , (resources string:' - none found.').
 56050 
 56101 
 56051                     ((selector == #findImplementors:in:ignoreCase:match:)
 56102                     ((selector == #findImplementors:in:ignoreCase:match:)
 56052                     and:[ (arguments first numArgs == 0)
 56103                     and:[ (arguments first numArgs == 0)
 56053                     and:[
 56104                     and:[
 56123                 newBrowser windowGroup notNil ifTrue:[
 56174                 newBrowser windowGroup notNil ifTrue:[
 56124                     t > 5 seconds ifTrue:[
 56175                     t > 5 seconds ifTrue:[
 56125                         newBrowser methodListApp autoUpdateOnChange: false.
 56176                         newBrowser methodListApp autoUpdateOnChange: false.
 56126                     ].
 56177                     ].
 56127                 ].
 56178                 ].
       
 56179                 Transcript show:'search time: '; showCR:t.
 56128                 ^ newBrowser.
 56180                 ^ newBrowser.
 56129             ].
 56181             ].
 56130         ].
 56182         ].
 56131     ] valueWithRestart.
 56183     ] valueWithRestart.
 56132 
 56184 
 58432     ].
 58484     ].
 58433     msg := (msg ? '').
 58485     msg := (msg ? '').
 58434 
 58486 
 58435     method isInstrumented ifTrue:[
 58487     method isInstrumented ifTrue:[
 58436         msg isEmpty ifTrue:[
 58488         msg isEmpty ifTrue:[
 58437             msg := 'Instrumented.' colorizeAllWith:(Color green darkened).
 58489             msg := 'Instrumented.' withColor:(Color green darkened).
 58438         ] ifFalse:[
 58490         ] ifFalse:[
 58439             msg := ('Instrumented.' colorizeAllWith:(Color green darkened)),' ',msg.
 58491             msg := ('Instrumented.' withColor:(Color green darkened)),' ',msg.
 58440         ].
 58492         ].
 58441         self showCoverageInformation value ifFalse:[
 58493         self showCoverageInformation value ifFalse:[
 58442             msg := msg , ' (coverage display is turned off - see "view"-menu)'
 58494             msg := msg , ' (coverage display is turned off - see "view"-menu)'
 58443         ].
 58495         ].
 58444         msg := msg , '.'.
 58496         msg := msg , '.'.
 59054                                         errMsg := ex description asStringCollection first asString.
 59106                                         errMsg := ex description asStringCollection first asString.
 59055 
 59107 
 59056                                         "/ Transcript topView raiseDeiconified.
 59108                                         "/ Transcript topView raiseDeiconified.
 59057                                         "/ Transcript showCR:'ParseError: ', ex description.
 59109                                         "/ Transcript showCR:'ParseError: ', ex description.
 59058     "/ self halt.
 59110     "/ self halt.
 59059                                         self showInfo:(errMsg colorizeAllWith:Color red).
 59111                                         self showInfo:(errMsg withColor:Color red).
 59060                                         self navigationState showingParseError:true.
 59112                                         self navigationState showingParseError:true.
 59061                                         newCode := nil.
 59113                                         newCode := nil.
 59062                                     ] do:[
 59114                                     ] do:[
 59063                                         |codeAspect|
 59115                                         |codeAspect|
 59064 
 59116