--- a/BrowserView.st Sun Feb 01 16:18:14 1998 +0100
+++ b/BrowserView.st Sun Feb 01 17:58:00 1998 +0100
@@ -3378,8 +3378,8 @@
y component info project nm mgr creatingNew msg|
aClass isLoaded ifFalse:[
- self warn:'please load the class first'.
- ^ false.
+ self warn:'please load the class first'.
+ ^ false.
].
className := aClass name.
@@ -3388,27 +3388,27 @@
"/ defaults, if nothing at all is known
"/
(module := lastModule) isNil ifTrue:[
- module := (OperatingSystem getLoginName).
+ module := (OperatingSystem getLoginName).
].
(package := lastPackage) isNil ifTrue:[
- package := 'private'.
+ package := 'private'.
].
"/
"/ try to extract some useful defaults from the current project
"/
(Project notNil and:[(project := Project current) notNil]) ifTrue:[
- package isNil ifTrue:[
- (nm := project repositoryDirectory) isNil ifTrue:[
- nm := project name
- ].
- package := nm.
- ].
- module isNil ifTrue:[
- (nm := project repositoryModule) notNil ifTrue:[
- module := nm
- ]
- ].
+ package isNil ifTrue:[
+ (nm := project repositoryDirectory) isNil ifTrue:[
+ nm := project name
+ ].
+ package := nm.
+ ].
+ module isNil ifTrue:[
+ (nm := project repositoryModule) notNil ifTrue:[
+ module := nm
+ ]
+ ].
].
"/
@@ -3417,13 +3417,13 @@
"/
info := (mgr := aClass sourceCodeManager) sourceInfoOfClass:aClass.
info notNil ifTrue:[
- (info includesKey:#module) ifTrue:[
- module := (info at:#module).
- ].
- (info includesKey:#directory) ifTrue:[
- package := (info at:#directory).
- ].
- fileName := mgr containerFromSourceInfo:info.
+ (info includesKey:#module) ifTrue:[
+ module := (info at:#module).
+ ].
+ (info includesKey:#directory) ifTrue:[
+ package := (info at:#directory).
+ ].
+ fileName := mgr containerFromSourceInfo:info.
"/ (info includesKey:#fileName) ifTrue:[
"/ fileName := (info at:#fileName).
"/ ] ifFalse:[
@@ -3438,7 +3438,11 @@
].
fileName isNil ifTrue:[
- fileName := (Smalltalk fileNameForClass:aClass) , '.st'.
+ aClass nameSpace ~~ Smalltalk ifTrue:[
+ fileName := aClass nameWithoutPrefix , '.st'.
+ ] ifFalse:[
+ fileName := (Smalltalk fileNameForClass:aClass) , '.st'.
+ ]
].
fileNameHolder := fileName asValue.
@@ -3449,9 +3453,9 @@
"/ should check for conflicts (i.e. if such a container already exists) ...
"/
(mgr checkForExistingContainerInModule:module
- package:package
- container:fileName) ifTrue:[
- "/ for now - this needs more work.
+ package:package
+ container:fileName) ifTrue:[
+ "/ for now - this needs more work.
"/ self information:(resources
"/ string:'%1 is already contained in the container:
@@ -3463,24 +3467,24 @@
"/ with:fileName).
"/ ^ false.
"/
- (Dialog confirm:(resources
- string:'Notice: there already is a container for %1 in:
+ (Dialog confirm:(resources
+ string:'Notice: there already is a container for %1 in:
%2 / %3 / %4
To change it, press continue.'
- with:className
- with:module
- with:package
- with:fileName)
- yesLabel:(resources string:'continue')
- noLabel:(resources string:'cancel'))
- ifFalse:[
- ^ false
- ].
- oldModule := module.
- oldPackage := package.
- oldFileName := fileName
+ with:className
+ with:module
+ with:package
+ with:fileName)
+ yesLabel:(resources string:'continue')
+ noLabel:(resources string:'cancel'))
+ ifFalse:[
+ ^ false
+ ].
+ oldModule := module.
+ oldPackage := package.
+ oldFileName := fileName
].
"/
@@ -3520,13 +3524,13 @@
box addVerticalSpace.
(mgr checkForExistingContainerInModule:module
- package:package
- container:fileName) ifFalse:[
- component := box addTextLabel:'Notice: class seems to have no container yet.'.
- component adjust:#left; borderWidth:0.
- creatingNew := true.
+ package:package
+ container:fileName) ifFalse:[
+ component := box addTextLabel:'Notice: class seems to have no container yet.'.
+ component adjust:#left; borderWidth:0.
+ creatingNew := true.
] ifTrue:[
- creatingNew := false.
+ creatingNew := false.
].
box addVerticalSpace.
@@ -3536,87 +3540,87 @@
box showAtPointer.
box accepted ifTrue:[
- module := moduleHolder value withoutSpaces.
- package := packageHolder value withoutSpaces.
-
- fileName := fileNameHolder value withoutSpaces.
-
- (fileName endsWith:',v') ifTrue:[
- fileName := fileName copyWithoutLast:2
- ].
- (fileName endsWith:'.st') ifFalse:[
- fileName := fileName , '.st'
- ].
-
- info := aClass revisionInfo.
- info notNil ifTrue:[
- (info includesKey:#repositoryPathName) ifFalse:[
- info := nil
- ]
- ].
- info isNil ifTrue:[
- creatingNew ifFalse:[
- (self confirm:(resources string:'The repository already contains a container named "%3" in "%1/%2" !!\\Checkin %4 anyway ? (DANGER - be careful)'
- withArgs:(Array with:module with:package with:fileName with:className)) withCRs)
- ifFalse:[
- ^ false
- ].
- ].
-
- (self confirm:(resources string:'%1 does not have any (usable) revision info (#version method)\\Shall I create one ?' with:className) withCRs)
- ifFalse:[
- ^ false
- ].
- aClass updateVersionMethodFor:(mgr initialRevisionStringFor:aClass
- inModule:module
- package:package
- container:fileName).
- ].
-
- "/
- "/ check for the module
- "/
- (mgr checkForExistingModule:module) ifFalse:[
- (createDirs or:[creatingNew]) ifFalse:[
- self warn:(resources string:'a module named %1 does not exist in the source code management' with:module).
- ^ false
- ].
- (self confirm:(resources string:'%1 is a new module.\\create it ?' with:module) withCRs) ifFalse:[
- ^ false.
- ].
- (mgr createModule:module) ifFalse:[
- self warn:(resources string:'cannot create new module: %1' with:module).
- ^ false.
- ]
- ].
- lastModule := module.
-
-
- "/
- "/ check for the package
- "/
- (mgr checkForExistingModule:module package:package) ifFalse:[
- (createDirs or:[creatingNew]) ifFalse:[
- self warn:(resources string:'a package named %1 does not exist module %2' with:module with:package).
- ^ false
- ].
- (self confirm:(resources string:'%1 is a new package (in module %2).\\create it ?' with:package with:module) withCRs) ifFalse:[
- ^ false.
- ].
- (mgr createModule:module package:package) ifFalse:[
- self warn:(resources string:'cannot create new package: %1 (in module %2)' with:package with:module).
- ^ false.
- ]
- ].
- lastPackage := package.
-
- "/
- "/ check for the container itself
- "/
- (mgr checkForExistingContainerInModule:module package:package container:fileName) ifTrue:[
- creatingNew ifTrue:[
- self warn:(resources string:'container for %1 already exists in %2/%3.' with:fileName with:module with:package) withCRs.
- ].
+ module := moduleHolder value withoutSpaces.
+ package := packageHolder value withoutSpaces.
+
+ fileName := fileNameHolder value withoutSpaces.
+
+ (fileName endsWith:',v') ifTrue:[
+ fileName := fileName copyWithoutLast:2
+ ].
+ (fileName endsWith:'.st') ifFalse:[
+ fileName := fileName , '.st'
+ ].
+
+ info := aClass revisionInfo.
+ info notNil ifTrue:[
+ (info includesKey:#repositoryPathName) ifFalse:[
+ info := nil
+ ]
+ ].
+ info isNil ifTrue:[
+ creatingNew ifFalse:[
+ (self confirm:(resources string:'The repository already contains a container named "%3" in "%1/%2" !!\\Checkin %4 anyway ? (DANGER - be careful)'
+ withArgs:(Array with:module with:package with:fileName with:className)) withCRs)
+ ifFalse:[
+ ^ false
+ ].
+ ].
+
+ (self confirm:(resources string:'%1 does not have any (usable) revision info (#version method)\\Shall I create one ?' with:className) withCRs)
+ ifFalse:[
+ ^ false
+ ].
+ aClass updateVersionMethodFor:(mgr initialRevisionStringFor:aClass
+ inModule:module
+ package:package
+ container:fileName).
+ ].
+
+ "/
+ "/ check for the module
+ "/
+ (mgr checkForExistingModule:module) ifFalse:[
+ (createDirs or:[creatingNew]) ifFalse:[
+ self warn:(resources string:'a module named %1 does not exist in the source code management' with:module).
+ ^ false
+ ].
+ (self confirm:(resources string:'%1 is a new module.\\create it ?' with:module) withCRs) ifFalse:[
+ ^ false.
+ ].
+ (mgr createModule:module) ifFalse:[
+ self warn:(resources string:'cannot create new module: %1' with:module).
+ ^ false.
+ ]
+ ].
+ lastModule := module.
+
+
+ "/
+ "/ check for the package
+ "/
+ (mgr checkForExistingModule:module package:package) ifFalse:[
+ (createDirs or:[creatingNew]) ifFalse:[
+ self warn:(resources string:'a package named %1 does not exist module %2' with:module with:package).
+ ^ false
+ ].
+ (self confirm:(resources string:'%1 is a new package (in module %2).\\create it ?' with:package with:module) withCRs) ifFalse:[
+ ^ false.
+ ].
+ (mgr createModule:module package:package) ifFalse:[
+ self warn:(resources string:'cannot create new package: %1 (in module %2)' with:package with:module).
+ ^ false.
+ ]
+ ].
+ lastPackage := package.
+
+ "/
+ "/ check for the container itself
+ "/
+ (mgr checkForExistingContainerInModule:module package:package container:fileName) ifTrue:[
+ creatingNew ifTrue:[
+ self warn:(resources string:'container for %1 already exists in %2/%3.' with:fileName with:module with:package) withCRs.
+ ].
"/ (oldModule notNil
"/ and:[(oldModule ~= module)
@@ -3627,77 +3631,77 @@
"/ ^ false.
"/ ].
- (self confirm:(resources string:'check %1 into the existing container
+ (self confirm:(resources string:'check %1 into the existing container
%2 / %3 / %4 ?'
- with:className
- with:module
- with:package
- with:fileName) withCRs)
- ifFalse:[
- ^ false.
- ].
-
- aClass updateVersionMethodFor:'$' , 'Header' , '$'. "/ concatenated to avoid RCS-expansion
-
- oldFileName notNil ifTrue:[
- msg := ('forced checkin / source container change from ' , oldFileName).
- ] ifFalse:[
- msg := 'defined source container'
- ].
-
- (mgr
- checkinClass:aClass
- fileName:fileName
- directory:package
- module:module
- logMessage:msg)
- ifFalse:[
- (self confirm:'no easy merge seems possible; force checkin (no merge) ?') ifFalse:[
- self normalLabel.
- ^ false.
- ].
- (mgr
- checkinClass:aClass
- fileName:fileName
- directory:package
- module:module
- logMessage:msg
- force:true)
- ifFalse:[
- self warn:(resources string:'failed to check into existing container.').
- self normalLabel.
- ^ false.
- ].
- ].
-
- self normalLabel.
- ^ true
- ] ifFalse:[
- (createContainer or:[creatingNew]) ifFalse:[
- (self confirm:(resources string:'no container exists for %1 in %2/%3\\create ?'
- with:fileName with:module with:package) withCRs) ifFalse:[
- ^ false
- ]
- ]
- ].
-
- (mgr
- createContainerFor:aClass
- inModule:module
- package:package
- container:fileName) ifFalse:[
- self warn:(resources string:'failed to create container.').
- self normalLabel.
- ^ false.
- ].
- self normalLabel.
- ^ true
+ with:className
+ with:module
+ with:package
+ with:fileName) withCRs)
+ ifFalse:[
+ ^ false.
+ ].
+
+ aClass updateVersionMethodFor:'$' , 'Header' , '$'. "/ concatenated to avoid RCS-expansion
+
+ oldFileName notNil ifTrue:[
+ msg := ('forced checkin / source container change from ' , oldFileName).
+ ] ifFalse:[
+ msg := 'defined source container'
+ ].
+
+ (mgr
+ checkinClass:aClass
+ fileName:fileName
+ directory:package
+ module:module
+ logMessage:msg)
+ ifFalse:[
+ (self confirm:'no easy merge seems possible; force checkin (no merge) ?') ifFalse:[
+ self normalLabel.
+ ^ false.
+ ].
+ (mgr
+ checkinClass:aClass
+ fileName:fileName
+ directory:package
+ module:module
+ logMessage:msg
+ force:true)
+ ifFalse:[
+ self warn:(resources string:'failed to check into existing container.').
+ self normalLabel.
+ ^ false.
+ ].
+ ].
+
+ self normalLabel.
+ ^ true
+ ] ifFalse:[
+ (createContainer or:[creatingNew]) ifFalse:[
+ (self confirm:(resources string:'no container exists for %1 in %2/%3\\create ?'
+ with:fileName with:module with:package) withCRs) ifFalse:[
+ ^ false
+ ]
+ ]
+ ].
+
+ (mgr
+ createContainerFor:aClass
+ inModule:module
+ package:package
+ container:fileName) ifFalse:[
+ self warn:(resources string:'failed to create container.').
+ self normalLabel.
+ ^ false.
+ ].
+ self normalLabel.
+ ^ true
].
box destroy.
^ false
- "Modified: 26.3.1997 / 18:15:55 / cg"
+ "Modified: / 1.2.1998 / 17:55:45 / cg"
!
classLoadNewRevision
@@ -11276,6 +11280,6 @@
!BrowserView class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libtool/BrowserView.st,v 1.361 1998-02-01 15:12:08 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libtool/BrowserView.st,v 1.362 1998-02-01 16:58:00 cg Exp $'
! !
BrowserView initialize!