Improve support for filing-out packages to Tonel repositories
When filing-out package to Tonel repo, pre-select last directory
or directory returned by `TonelRepository discoverPackage:`. This
should be what user wants most of the time. Will see, though :-)
--- a/Tools__NewSystemBrowser.st Thu Aug 27 15:27:10 2020 +0100
+++ b/Tools__NewSystemBrowser.st Tue Sep 08 11:20:32 2020 +0100
@@ -54,7 +54,7 @@
LastClassSearchBoxShowedJavaOnly LastRemoteRepository
LastClassDocDirectory DefaultShowCoverage LastLintedPackage
LastSearchedImplementors LastSearchedSenders
- LastComparedClassName LastTonelDirectory'
+ LastComparedClassName LastTonelDirectories'
poolDictionaries:''
category:'Interface-Browsers-New'
!
@@ -23754,7 +23754,7 @@
methodIsSubclassResponsibility
self selectedMethodsDo:[:eachMethod |
- (eachMethod sends:#subclassResponsibility) ifTrue:[^ true].
+ (eachMethod sendsSelector:#subclassResponsibility) ifTrue:[^ true].
].
^ false.
!
@@ -23849,7 +23849,7 @@
m := self theSingleSelectedMethod.
m isNil ifTrue:[^ false].
- ^ (m sends:#subclassResponsibility)
+ ^ (m sendsSelector:#subclassResponsibility)
!
smallTeamAvailable
@@ -26799,7 +26799,7 @@
"/ - source to access its sourceCode
"/ - messagesSent a collection of sent messages (all)
"/ - messagesSentToSuper a collection of super messages
- "/ - sends: query a particular message
+ "/ - sendsSelector: query a particular message
"/ - referencesLiteral: query for direct literal access
"/ - refersToLiteral: query for direct or indirect literal access
"/ - literals the methods literal-array
@@ -26811,7 +26811,7 @@
"/ "/ example: search for methods which contain a string AND send a particular message
"/ "/
"/ (method source includesString:''Useful'')
-"/ and:[ method sends:#for: ]
+"/ and:[ method sendsSelector:#for: ]
"/ "/
"/ "/ example: search for methods which send #foo AND #bar
@@ -32190,7 +32190,7 @@
].
dialog createInitializer ifTrue:[
inheritedInitializeMethod := cls theMetaclass responseTo:#new.
- (inheritedInitializeMethod isNil or:[ (inheritedInitializeMethod sends:#initialize) not ]) ifTrue:[
+ (inheritedInitializeMethod isNil or:[ (inheritedInitializeMethod sendsSelector:#initialize) not ]) ifTrue:[
generator createInitializedInstanceCreationMethodsIn:theNonMetaclass
] ifFalse:[
generator createInitializationMethodIn:theNonMetaclass
@@ -33918,7 +33918,7 @@
compile :=
[:cls :sel :mthd |
- (mthd sendsAny:#( #subclassResponsibility #subclassResponsibility:)) ifFalse:[
+ (mthd sendsAnySelector:#( #subclassResponsibility #subclassResponsibility:)) ifFalse:[
mthd hasPrimitiveCode ifFalse:[
firstMethod ifTrue:[
self showInfo:('Instrumenting ',aClass name,'...').
@@ -33957,7 +33957,7 @@
!
recompileMethodWithInstrumentation:aMethod
- (aMethod sends:#subclassResponsibility) ifFalse:[
+ (aMethod sendsSelector:#subclassResponsibility) ifFalse:[
aMethod hasPrimitiveCode ifFalse:[
aMethod mclass
recompile:aMethod selector
@@ -34381,12 +34381,12 @@
isReference := (usedGlobals includes:sym) or:[usedGlobals includes:fullNameSym].
isReference ifFalse:[
(mthd referencesLiteral:classesNameSpace name) ifTrue:[
- isReference := mthd sendsAny:#(#'at:' #'at:ifAbsent:' #'classNamed:')
+ isReference := mthd sendsAnySelector:#(#'at:' #'at:ifAbsent:' #'classNamed:')
].
isReference ifFalse:[
classesNameSpace ~= Smalltalk ifTrue:[
(mthd referencesLiteral:#Smalltalk) ifTrue:[
- isReference := mthd sendsAny:#(#'at:' #'at:ifAbsent:' #'classNamed:')
+ isReference := mthd sendsAnySelector:#(#'at:' #'at:ifAbsent:' #'classNamed:')
].
].
]
@@ -42693,9 +42693,15 @@
requestDirectoryName: (resources string:'Fileout %1 in:' with:(currentProject ? 'selected projects'))
default: LastCypressDirectory.
] ifFalse: [aFormatSymbolOrNil == #tonel ifTrue:[
+ | lastTonelDirectory |
+
+ currentProject notNil ifTrue: [
+ LastTonelDirectories isNil ifTrue: [LastTonelDirectories := Dictionary new].
+ lastTonelDirectory := LastTonelDirectories at: currentProject ifAbsent: [TonelRepository discoverPackage: currentProject ].
+ ].
saveName := Dialog
requestDirectoryName: (resources string:'Select Tonel repository to fileout %1' with:(currentProject ? 'selected projects'))
- default: LastTonelDirectory.
+ default: lastTonelDirectory.
] ifFalse:[
saveName := Dialog
requestFileNameForSave:(resources string:'Fileout %1 as:' with:(currentProject ? 'selected projects'))
@@ -42864,7 +42870,9 @@
mgr storeVersion:mcversion.
] ]
inBackground: true.
- LastTonelDirectory := saveName.
+ currentProject notNil ifTrue: [
+ LastTonelDirectories at: currentProject put: saveName.
+ ].
^ self
].
@@ -42872,7 +42880,7 @@
"Modified: / 27-10-2010 / 11:34:45 / cg"
"Modified: / 14-04-2015 / 14:12:00 / Jan Vrany <jan.vrany@fit.cvut.cz>"
- "Modified: / 10-08-2020 / 14:03:58 / Jan Vrany <jan.vrany@labware.com>"
+ "Modified: / 08-09-2020 / 11:12:52 / Jan Vrany <jan.vrany@labware.com>"
!
projectMenuFileOutBeeProjectSourceAs