diff -r 29e57d617edd -r 7b9622ce4fcc BrowserView.st --- a/BrowserView.st Sat Dec 09 21:10:18 1995 +0100 +++ b/BrowserView.st Sat Dec 09 22:13:16 1995 +0100 @@ -1663,7 +1663,7 @@ ] "Created: 23.11.1995 / 11:41:38 / cg" - "Modified: 9.12.1995 / 19:50:09 / cg" + "Modified: 9.12.1995 / 21:19:08 / cg" ! classCompareWithNewestInRepository @@ -1691,6 +1691,10 @@ aStream := mgr sourceStreamFor:currentClass revision:rev. revString := rev ]. + aStream isNil ifTrue:[ + self warn:'could not extract source from repository'. + ^ self + ]. comparedSource := aStream contents. aStream close. @@ -1711,7 +1715,7 @@ ] "Created: 14.11.1995 / 16:43:15 / cg" - "Modified: 9.12.1995 / 19:50:22 / cg" + "Modified: 9.12.1995 / 21:57:10 / cg" ! classCreateSourceContainerFor:aClass @@ -1729,7 +1733,7 @@ moduleHolder packageHolder fileNameHolder module package fileName specialFlags - check y component info fn project nm| + check y component info fn project nm mgr| aClass isLoaded ifFalse:[ self warn:'please load the class first'. @@ -1760,7 +1764,7 @@ "/ ask the sourceCodeManager if it knows anything about that class "/ if so, take that as a default. "/ - info := (aClass sourceCodeManager) sourceInfoOfClass:aClass. + info := (mgr := aClass sourceCodeManager) sourceInfoOfClass:aClass. info notNil ifTrue:[ (info includesKey:#module) ifTrue:[ moduleHolder value:(info at:#module). @@ -1827,6 +1831,14 @@ box showAtPointer. box accepted ifTrue:[ + aClass revisionString isNil ifTrue:[ + (self confirm:(resources string:'%1 does not have any revision info (#version method)\\Shall I create one ?' with:aClass name) withCRs) + ifFalse:[ + ^ self + ]. + aClass updateVersionMethodFor:(mgr initialRevisionStringFor:aClass). + ]. + module := moduleHolder value withoutSpaces. package := packageHolder value withoutSpaces. fileName := fileNameHolder value withoutSpaces. @@ -1834,12 +1846,11 @@ "/ "/ check for the module "/ - (SourceCodeManager - checkForExistingModule:module) ifFalse:[ + (mgr checkForExistingModule:module) ifFalse:[ (self confirm:(resources string:'%1 is a new module.\\create it ?' with:module) withCRs) ifFalse:[ ^ self. ]. - (SourceCodeManager createModule:module) ifFalse:[ + (mgr createModule:module) ifFalse:[ self warn:(resources string:'cannot create new module: %1' with:module). ^ self. ] @@ -1848,13 +1859,11 @@ "/ "/ check for the package "/ - (SourceCodeManager - checkForExistingModule:module - package:package) ifFalse:[ + (mgr checkForExistingModule:module package:package) ifFalse:[ (self confirm:(resources string:'%1 is a new package (in module %2).\\create it ?' with:package with:module) withCRs) ifFalse:[ ^ self. ]. - (SourceCodeManager createModule:module package:package) ifFalse:[ + (mgr createModule:module package:package) ifFalse:[ self warn:(resources string:'cannot create new package: %1 (in module %2)' with:package with:module). ^ self. ] @@ -1863,23 +1872,23 @@ "/ "/ check for the container itself "/ - (SourceCodeManager - checkForExistingContainerInModule:module - package:package - container:fileName) ifTrue:[ + (mgr checkForExistingContainerInModule:module package:package container:fileName) ifTrue:[ self warn:(resources string:'container for %1 already exists in %2/%3.\\You have to destroy the old one or use another name.' with:fileName with:module with:package) withCRs. ^ self ]. - SourceCodeManager + (mgr createContainerFor:aClass inModule:module package:package - container:fileName + container:fileName) ifFalse:[ + self warn:(resources string:'failed to create container.'). + ^ self. + ]. ]. box destroy - "Modified: 9.12.1995 / 19:55:59 / cg" + "Modified: 9.12.1995 / 21:51:54 / cg" ! classLoadRevision @@ -6148,5 +6157,6 @@ !BrowserView class methodsFor:'documentation'! version -^ '$Header: /cvs/stx/stx/libtool/BrowserView.st,v 1.64 1995-12-09 20:03:38 cg Exp $'! ! + ^ '$Header: /cvs/stx/stx/libtool/BrowserView.st,v 1.65 1995-12-09 21:13:16 cg Exp $' +! ! BrowserView initialize!