Tools__NewSystemBrowser.st
branchjv
changeset 16717 814e3fa20205
parent 16709 ff5b5c8d8549
child 16733 4a33c1b47bc3
equal deleted inserted replaced
16716:12ac8455e023 16717:814e3fa20205
     1 "{ Encoding: utf8 }"
       
     2 
       
     3 "
     1 "
     4  COPYRIGHT (c) 2000 by eXept Software AG
     2  COPYRIGHT (c) 2000 by eXept Software AG
     5               All Rights Reserved
     3               All Rights Reserved
     6 
     4 
     7  This software is furnished under a license and may be used
     5  This software is furnished under a license and may be used
 30090 !
 30088 !
 30091 
 30089 
 30092 classMenuEditResourceFiles
 30090 classMenuEditResourceFiles
 30093     "fetch the class' package resource file for editing"
 30091     "fetch the class' package resource file for editing"
 30094 
 30092 
 30095     |files filename resources|
 30093     |files filename rsources|
 30096 
 30094 
 30097     files := Set new.
 30095     files := Set new.
 30098     self selectedClassesValue do:[:eachClass |
 30096     self selectedClassesValue do:[:eachClass |
 30099         |defClass directory|
 30097         |defClass directory|
 30100 
 30098 
 30101         (defClass := eachClass theNonMetaclass projectDefinitionClass) notNil ifTrue:[
 30099         (defClass := eachClass theNonMetaclass projectDefinitionClass) notNil ifTrue:[
 30102             resources := defClass classResources.
 30100             rsources := defClass classResources.
 30103         ].
 30101         ].
 30104         resources notNil ifTrue:[
 30102         rsources notNil ifTrue:[
 30105             resources := resources projectPack.
 30103             rsources := rsources projectPack.
 30106             resources notNil ifTrue:[
 30104             rsources notNil ifTrue:[
 30107                 filename := resources packsFileName.
 30105                 filename := rsources packsFileName.
 30108             ]
 30106             ]
 30109         ].
 30107         ].
 30110         filename isNil ifTrue:[
 30108         filename isNil ifTrue:[
 30111             directory := Smalltalk packageDirectoryForPackageId:(eachClass package).
 30109             directory := Smalltalk getPackageDirectoryForPackage:(eachClass package).
 30112             filename := directory asFilename / 'resources' / (Smalltalk language, '.rs').
 30110             filename := directory asFilename / 'resources' / (Smalltalk language, '.rs').
 30113         ].
 30111         ].
 30114         filename notNil ifTrue:[
 30112         filename notNil ifTrue:[
 30115             files add:filename.
 30113             files add:filename.
 30116         ].
 30114         ].
 30119         self warn:'No resource files'.
 30117         self warn:'No resource files'.
 30120     ].
 30118     ].
 30121     files do:[:eachFile |
 30119     files do:[:eachFile |
 30122         UserPreferences fileBrowserClass openOn:eachFile
 30120         UserPreferences fileBrowserClass openOn:eachFile
 30123     ].
 30121     ].
       
 30122 
       
 30123     "Modified: / 28-06-2016 / 07:52:17 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 30124 !
 30124 !
 30125 
 30125 
 30126 classMenuExcludeFromProject
 30126 classMenuExcludeFromProject
 30127     |projectDefinitionClasses|
 30127     |projectDefinitionClasses|
 30128 
 30128 
 40294     classes := self selectedMethodsClasses asOrderedCollection.
 40294     classes := self selectedMethodsClasses asOrderedCollection.
 40295     self methodListMenuSpawnFullBrowserForClasses:classes methods:methods in:where
 40295     self methodListMenuSpawnFullBrowserForClasses:classes methods:methods in:where
 40296 
 40296 
 40297     "Modified: / 28-02-2012 / 16:27:44 / cg"
 40297     "Modified: / 28-02-2012 / 16:27:44 / cg"
 40298 ! !
 40298 ! !
       
 40299 
 40299 
 40300 
 40300 !NewSystemBrowser methodsFor:'menu actions-namespace'!
 40301 !NewSystemBrowser methodsFor:'menu actions-namespace'!
 40301 
 40302 
 40302 nameSpaceMenuCheckOut
 40303 nameSpaceMenuCheckOut
 40303     "check-out all classes in the selected nameSpace from the source repository.
 40304     "check-out all classes in the selected nameSpace from the source repository.
 47078 ].
 47079 ].
 47079 "/ Transcript showCR:('it took %1 seconds' bindWith:(t /1000)printString).
 47080 "/ Transcript showCR:('it took %1 seconds' bindWith:(t /1000)printString).
 47080 
 47081 
 47081         self activityNotification:nil.
 47082         self activityNotification:nil.
 47082         browser := (UserPreferences current changeSetBrowserClass) openOn:previousMethods.
 47083         browser := (UserPreferences current changeSetBrowserClass) openOn:previousMethods.
 47083         browser window label:(resources string:'Revisions of %1 » %2' with:mclass name with:mselector).
 47084         browser window label:(resources string:'Revisions of %1 » %2' with:mclass name with:mselector).
 47084         browser readOnly:true.
 47085         browser readOnly:true.
 47085     ].
 47086     ].
 47086 
 47087 
 47087     "Modified: / 01-07-2011 / 16:34:29 / cg"
 47088     "Modified: / 01-07-2011 / 16:34:29 / cg"
 47088     "Created: / 18-11-2011 / 18:19:50 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 47089     "Created: / 18-11-2011 / 18:19:50 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 51656             itemClass:[:chg | chg changeClass]
 51657             itemClass:[:chg | chg changeClass]
 51657             itemSelector:[:chg | chg selector]
 51658             itemSelector:[:chg | chg selector]
 51658             label:[:chg | 
 51659             label:[:chg | 
 51659                 |lbl|
 51660                 |lbl|
 51660                 "/ lbl := chg printString
 51661                 "/ lbl := chg printString
 51661                 lbl := (chg className ? '???') , ' » ' , (chg selector  ? '???') allBold.
 51662                 lbl := (chg className ? '???') , ' » ' , (chg selector  ? '???') allBold.
 51662                 (chg isMethodChange and:[chg changeMethod isNil]) ifTrue:[
 51663                 (chg isMethodChange and:[chg changeMethod isNil]) ifTrue:[
 51663                     lbl := lbl asText allStrikedOut,' ','(removed)' allItalic.
 51664                     lbl := lbl asText allStrikedOut,' ','(removed)' allItalic.
 51664                 ].    
 51665                 ].    
 51665                 lbl
 51666                 lbl
 51666             ]
 51667             ]
 59017         ].    
 59018         ].    
 59018     ].
 59019     ].
 59019     ^ selectorCompletion
 59020     ^ selectorCompletion
 59020 ! !
 59021 ! !
 59021 
 59022 
       
 59023 
 59022 !NewSystemBrowser methodsFor:'private-semantic checks'!
 59024 !NewSystemBrowser methodsFor:'private-semantic checks'!
 59023 
 59025 
 59024 checkAcceptedMethod:aMethod inClass:aClass
 59026 checkAcceptedMethod:aMethod inClass:aClass
 59025     "do some semantic checks on the just accepted method:
 59027     "do some semantic checks on the just accepted method:
 59026         does new method redefine an inherited method, which does the same ?
 59028         does new method redefine an inherited method, which does the same ?