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 ! |
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 |
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:[ |