[squeak-dev] The Trunk: Tools-ul.254.mcz
commits at source.squeak.org
commits at source.squeak.org
Thu Jul 22 02:51:42 UTC 2010
Levente Uzonyi uploaded a new version of Tools to project The Trunk:
http://source.squeak.org/trunk/Tools-ul.254.mcz
==================== Summary ====================
Name: Tools-ul.254
Author: ul
Time: 22 July 2010, 4:48:03.666 am
UUID: 121fcb55-f89d-6c48-aff7-ea6ca051e747
Ancestors: Tools-eem.253, Tools-topa.246
Merged.
=============== Diff against Tools-eem.253 ===============
Item was added:
+ ----- Method: CodeHolder>>informPossiblyCorruptSource (in category 'misc') -----
+ informPossiblyCorruptSource
+
+ | sourcesName |
+ sourcesName := FileDirectory localNameFor: SmalltalkImage current sourcesName.
+ self inform: 'There may be a problem with your sources file!!
+
+ The source code for every method should (usually) start with the
+ method selector but this is not the case with this method!! You may
+ proceed with caution but it is recommended that you get a new source file.
+
+ This can happen if you download the "' , sourcesName , '" file,
+ or the ".changes" file you use, as TEXT. It must be transfered
+ in BINARY mode, even if it looks like a text file,
+ to preserve the CR line ends.
+
+ Mac users: This may have been caused by Stuffit Expander.
+ To prevent the files above to be converted to Mac line ends
+ when they are expanded, do this: Start the program, then
+ from Preferences... in the File menu, choose the Cross
+ Platform panel, then select "Never" and press OK.
+ Then expand the compressed archive again.
+
+ (Occasionally, the source code for a method may legitimately
+ start with a non-alphabetic character -- for example, Behavior
+ method #formalHeaderPartsFor:. In such rare cases, you can
+ happily disregard this warning.)'!
Item was added:
+ ----- Method: CodeHolder>>validateMessageSource:forSelector:inClass: (in category 'message list') -----
+ validateMessageSource: sourceString forSelector: aSelector inClass: theClass
+ "Check whether there is evidence that method source is invalid"
+
+ (theClass parserClass new parseSelector: sourceString asString) = aSelector
+ ifFalse: [self informPossiblyCorruptSource].!
Item was changed:
----- Method: CodeHolder>>sourceStringPrettifiedAndDiffed (in category 'message list') -----
sourceStringPrettifiedAndDiffed
"Answer a copy of the source code for the selected message, transformed by diffing and pretty-printing exigencies"
| class selector sourceString |
class := self selectedClassOrMetaClass.
selector := self selectedMessageName.
(class isNil or: [selector isNil]) ifTrue: [^'missing'].
sourceString := class ultimateSourceCodeAt: selector ifAbsent: [^'error'].
+ self validateMessageSource: sourceString forSelector: selector inClass: class.
- self validateMessageSource: sourceString forSelector: selector.
(#(#prettyPrint #prettyDiffs)
includes: contentsSymbol)
ifTrue:
[sourceString := class prettyPrinterClass
format: sourceString
in: class
notifying: nil].
self showingAnyKindOfDiffs
ifTrue: [sourceString := self diffFromPriorSourceFor: sourceString].
^sourceString!
Item was removed:
- ----- Method: CodeHolder>>validateMessageSource:forSelector: (in category 'message list') -----
- validateMessageSource: sourceString forSelector: aSelector
- "Check whether there is evidence that method source is invalid"
-
- | sourcesName |
- (self selectedClass parserClass new parseSelector: sourceString asString) = aSelector
- ifFalse: [sourcesName := FileDirectory localNameFor: SmalltalkImage current sourcesName.
- self inform: 'There may be a problem with your sources file!!
-
- The source code for every method should (usually) start with the
- method selector but this is not the case with this method!! You may
- proceed with caution but it is recommended that you get a new source file.
-
- This can happen if you download the "' , sourcesName , '" file,
- or the ".changes" file you use, as TEXT. It must be transfered
- in BINARY mode, even if it looks like a text file,
- to preserve the CR line ends.
-
- Mac users: This may have been caused by Stuffit Expander.
- To prevent the files above to be converted to Mac line ends
- when they are expanded, do this: Start the program, then
- from Preferences... in the File menu, choose the Cross
- Platform panel, then select "Never" and press OK.
- Then expand the compressed archive again.
-
- (Occasionally, the source code for a method may legitimately
- start with a non-alphabetic character -- for example, Behavior
- method #formalHeaderPartsFor:. In such rare cases, you can
- happily disregard this warning.)'].!
More information about the Squeak-dev
mailing list
|