--- a/Tools__NewClassWizardDialog.st Fri Nov 06 12:15:29 2009 +0100
+++ b/Tools__NewClassWizardDialog.st Fri Nov 06 12:27:16 2009 +0100
@@ -666,54 +666,61 @@
newClassName := self classNameHolder value.
newClassName isEmptyOrNil ifTrue:[
- Dialog warn:'No Classname entered'.
- ^ self.
+ Dialog warn:'No Classname entered'.
+ ^ self.
].
newClassName isValidSmalltalkIdentifier ifFalse:[
- Dialog warn:'No valid Classname entered (must be alphaNumeric)'.
- ^ self.
+ Dialog warn:'No valid Classname entered (must be alphaNumeric)'.
+ ^ self.
].
newClassName first isUppercase ifFalse:[
- Dialog warn:'No valid Classname entered (first Character must be uppercase)'.
- ^ self.
+ Dialog warn:'No valid Classname entered (first Character must be uppercase)'.
+ ^ self.
].
superclassName := self superclassNameHolder value.
superclass := Smalltalk classNamed:superclassName.
superclass isNil ifTrue:[
- (superclassName knownAsSymbol and:[Smalltalk includesKey:superclassName asSymbol]) ifFalse:[
- Dialog warn:'No such Superclass'.
- ^ self.
- ].
- (Smalltalk at:superclassName asSymbol) isBehavior ifFalse:[
- Dialog warn:('"%1" refers to a global which is not a class (%2)'
- bindWith:superclassName
- with:superclass className).
- ^ self.
- ].
+ (superclassName knownAsSymbol and:[Smalltalk includesKey:superclassName asSymbol]) ifFalse:[
+ Dialog warn:'No such Superclass'.
+ ^ self.
+ ].
+ (Smalltalk at:superclassName asSymbol) isBehavior ifFalse:[
+ Dialog warn:('"%1" refers to a global which is not a class (%2)'
+ bindWith:superclassName
+ with:superclass className).
+ ^ self.
+ ].
].
package := self packageHolder value.
+ (package asPackageId module isEmptyOrNil
+ or:[ package asPackageId directory isEmptyOrNil ]) ifTrue:[
+ Dialog warn:('The packageID "%1" must be of the form "module:directory" (for the source repository management)'
+ bindWith:package).
+ ^ self.
+ ].
+
package notEmptyOrNil ifTrue:[
- (ProjectDefinition definitionClassForPackage:package) isNil ifTrue:[
- answer := Dialog
- choose:('Create a new ProjectDefinition for "%1" ?
+ (ProjectDefinition definitionClassForPackage:package) isNil ifTrue:[
+ answer := Dialog
+ choose:('Create a new ProjectDefinition for "%1" ?
This can also be done later.
Create the definition as:
' bindWith:package)
- fromList:nil values:nil
- buttons:#('GUI Application' 'non-GUI Application' 'Library')
- values:#(guiApplicationType #nonGuiApplicationType #libraryType)
- lines:nil cancel:false.
+ fromList:nil values:nil
+ buttons:#('GUI Application' 'non-GUI Application' 'Library')
+ values:#(guiApplicationType #nonGuiApplicationType #libraryType)
+ lines:nil cancel:false.
- answer == false ifTrue:[^ self].
+ answer == false ifTrue:[^ self].
- ProjectDefinition
- definitionClassForPackage:package
- projectType: (ProjectDefinition perform:answer)
- createIfAbsent:true.
- ].
+ ProjectDefinition
+ definitionClassForPackage:package
+ projectType: (ProjectDefinition perform:answer)
+ createIfAbsent:true.
+ ].
].
"/ done in caller (for future undo handling...)
@@ -934,5 +941,5 @@
!NewClassWizardDialog class methodsFor:'documentation'!
version_CVS
- ^ '$Header: /cvs/stx/stx/libtool/Tools__NewClassWizardDialog.st,v 1.2 2009-11-05 22:00:30 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libtool/Tools__NewClassWizardDialog.st,v 1.3 2009-11-06 11:27:16 cg Exp $'
! !