--- a/Class.st Sun Jan 22 23:07:15 2012 +0000
+++ b/Class.st Mon Jan 23 20:41:24 2012 +0000
@@ -1692,7 +1692,10 @@
"Returns the source code manager that should be used for
source code access based in class's binary revision.
If not binary revision is available, then configured source
- code manager is returned.
+ code manager is returned. If source code management
+ is disabled or particular source code manager is not enabled,
+ return nil.
+
Source code manager for source access may differ from
configured source code manager:
@@ -1712,12 +1715,15 @@
are used so this code should work
"
+
+
+
revision ifNil:[^self sourceCodeManager].
- AbstractSourceCodeManager availableManagers do:[:mgr|
- (revision endsWith: mgr managerTypeNameShort) ifTrue:[
- ^mgr
- ]
+ AbstractSourceCodeManager enabledManagers do:[:mgr|
+ (revision endsWith: mgr managerTypeNameShort) ifTrue:[
+ ^mgr
+ ]
].
"binary revision is not nil and we haven't found source code manager.
@@ -1735,11 +1741,11 @@
"
- Object sourceCodeManager
- Object sourceCodeManagerForSourceAccess
-
- JavaVM sourceCodeManager
- JavaVM sourceCodeManagerForSourceAccess
+ Object sourceCodeManager
+ Object sourceCodeManagerForSourceAccess
+
+ JavaVM sourceCodeManager
+ JavaVM sourceCodeManagerForSourceAccess
"
"Created: / 06-10-2011 / 09:33:33 / Jan Vrany <jan.vrany@fit.cvut.cz>"
@@ -4172,20 +4178,23 @@
If a classes binary is up-to-date w.r.t. the source repository,
the returned string is the same as the one returned by #revision."
- |owner info c|
+ |owner manager info c|
(owner := self owningClass) notNil ifTrue:[^ owner binaryRevision].
revision notNil ifTrue:[
- c := revision first.
- c == $$ ifTrue:[
- info := self sourceCodeManagerFromBinaryRevision revisionInfoFromString:revision.
- info isNil ifTrue:[^ '0'].
- ^ (info revision) ? '0'.
- ].
- c isDigit ifFalse:[
- ^ '0'
- ].
+ c := revision first.
+ c == $$ ifTrue:[
+ manager := self sourceCodeManagerFromBinaryRevision.
+ manager notNil ifTrue:[
+ info := manager revisionInfoFromString:revision.
+ ].
+ info isNil ifTrue:[^ '0'].
+ ^ (info revision) ? '0'.
+ ].
+ c isDigit ifFalse:[
+ ^ '0'
+ ].
].
^ revision
@@ -4201,14 +4210,14 @@
|classes|
classes := Smalltalk allClasses
- select:[:cls | cls binaryRevision notNil and:[cls binaryRevision ~= cls revision]].
+ select:[:cls | cls binaryRevision notNil and:[cls binaryRevision ~= cls revision]].
SystemBrowser browseClasses:classes title:'classes which are not up-to-date'
"
"Created: / 07-12-1995 / 10:58:47 / cg"
"Modified: / 01-04-1997 / 23:33:01 / stefan"
"Modified: / 22-10-2008 / 20:37:05 / cg"
- "Modified: / 06-10-2011 / 09:33:51 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+ "Modified: / 23-01-2012 / 19:38:50 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!
binaryRevisionString
@@ -5503,16 +5512,13 @@
!Class class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libbasic/Class.st,v 1.600 2011/12/06 15:21:38 cg Exp $'
+ ^ '$Id: Class.st 10764 2012-01-23 20:41:24Z vranyj1 $'
!
version_CVS
- ^ '§Header: /cvs/stx/stx/libbasic/Class.st,v 1.600 2011/12/06 15:21:38 cg Exp §'
+ ^ '§Â§Header: /cvs/stx/stx/libbasic/Class.st,v 1.600 2011/12/06 15:21:38 cg Exp §§'
!
version_SVN
- ^ '$Id: Class.st 10761 2012-01-19 11:46:00Z vranyj1 $'
+ ^ '$Id: Class.st 10764 2012-01-23 20:41:24Z vranyj1 $'
! !
-
-
-