--- a/Tools__NewClassWizardDialog.st Sat Nov 07 01:32:57 2009 +0100
+++ b/Tools__NewClassWizardDialog.st Sat Nov 07 04:44:53 2009 +0100
@@ -14,17 +14,18 @@
"{ NameSpace: Tools }"
SimpleDialog subclass:#NewClassWizardDialog
- instanceVariableNames:'compilerProviderBlock createdClass languageHolder indexType
- packageHolder classNameHolder instVarNamesHolder openClassChooser
- superclassNameHolder createRequiredMethodsHolder
- createPrintMethodHolder createAccessorsHolder
- createUpdateMethodHolder createInitializerHolder
- createInitialGUICodeHolder classInstVarNamesHolder
- classVarNamesHolder nameSpaceHolder categoryHolder'
- classVariableNames:'LastLanguage LastSuperclass LastPackage LastNamespace
- LastCategory'
- poolDictionaries:''
- category:'Interface-Browsers-New'
+ instanceVariableNames:'compilerProviderBlock createdClass languageHolder indexType
+ packageHolder classNameHolder instVarNamesHolder openClassChooser
+ superclassNameHolder createRequiredMethodsHolder
+ createPrintMethodHolder createAccessorsHolder
+ createUpdateMethodHolder createInitializerHolder
+ createInitialGUICodeHolder classInstVarNamesHolder
+ classVarNamesHolder nameSpaceHolder categoryHolder
+ stereotypeHolder'
+ classVariableNames:'LastLanguage LastSuperclass LastPackage LastNamespace
+ LastCategory'
+ poolDictionaries:''
+ category:'Interface-Browsers-New'
!
!NewClassWizardDialog class methodsFor:'documentation'!
@@ -272,7 +273,7 @@
name: 'Tools::NewClassDialog'
min: (Point 10 10)
max: (Point 1024 768)
- bounds: (Rectangle 0 0 492 566)
+ bounds: (Rectangle 0 0 506 600)
)
component:
(SpecCollection
@@ -309,14 +310,14 @@
(LabelSpec
label: 'Class Name:'
name: 'Label1'
- layout: (LayoutFrame 10 0 120 0 180 0 142 0)
+ layout: (LayoutFrame 10 0 149 0 180 0 171 0)
activeHelpKey: className
translateLabel: true
adjust: right
)
(InputFieldSpec
name: 'EntryField1'
- layout: (LayoutFrame 190 0 120 0 -32 1 142 0)
+ layout: (LayoutFrame 190 0 149 0 -32 1 171 0)
activeHelpKey: className
model: classNameHolder
acceptOnReturn: true
@@ -327,14 +328,14 @@
(LabelSpec
label: 'Superclass:'
name: 'Label2'
- layout: (LayoutFrame 10 0 150 0 180 0 172 0)
+ layout: (LayoutFrame 10 0 179 0 180 0 201 0)
activeHelpKey: superclass
translateLabel: true
adjust: right
)
(ComboBoxSpec
name: 'ComboBox1'
- layout: (LayoutFrame 190 0 150 0 -32 1 172 0)
+ layout: (LayoutFrame 190 0 179 0 -32 1 201 0)
activeHelpKey: superclass
model: superclassNameHolder
acceptOnLostFocus: true
@@ -344,7 +345,7 @@
(ActionButtonSpec
label: '...'
name: 'Button1'
- layout: (LayoutFrame -22 1 150 0 -2 1 172 0)
+ layout: (LayoutFrame -22 1 179 0 -2 1 201 0)
activeHelpKey: chooseSuperclass
translateLabel: true
model: openClassChooser
@@ -352,14 +353,14 @@
(LabelSpec
label: 'Package ID:'
name: 'Label3'
- layout: (LayoutFrame 10 0 190 0 180 0 212 0)
+ layout: (LayoutFrame 10 0 220 0 180 0 242 0)
activeHelpKey: package
translateLabel: true
adjust: right
)
(ComboBoxSpec
name: 'ComboBox2'
- layout: (LayoutFrame 190 0 190 0 -32 1 212 0)
+ layout: (LayoutFrame 190 0 219 0 -32 1 241 0)
activeHelpKey: package
model: packageHolder
acceptOnReturn: true
@@ -371,7 +372,7 @@
(ActionButtonSpec
label: '...'
name: 'Button4'
- layout: (LayoutFrame -22 1 190 0 -2 1 212 0)
+ layout: (LayoutFrame -22 1 219 0 -2 1 241 0)
activeHelpKey: packageChooser
translateLabel: true
model: openPackageChooser
@@ -379,14 +380,14 @@
(LabelSpec
label: 'Namespace:'
name: 'Label4'
- layout: (LayoutFrame 10 0 220 0 180 0 242 0)
+ layout: (LayoutFrame 10 0 249 0 180 0 271 0)
activeHelpKey: namespace
translateLabel: true
adjust: right
)
(ComboListSpec
name: 'ComboList2'
- layout: (LayoutFrame 190 0 220 0 -32 1 242 0)
+ layout: (LayoutFrame 190 0 249 0 -32 1 271 0)
activeHelpKey: namespace
model: nameSpaceHolder
comboList: listOfNamespaces
@@ -394,7 +395,7 @@
(ActionButtonSpec
label: '...'
name: 'Button5'
- layout: (LayoutFrame -22 1 220 0 -2 1 242 0)
+ layout: (LayoutFrame -22 1 249 0 -2 1 271 0)
activeHelpKey: namespaceChooser
translateLabel: true
model: openNamespaceChooser
@@ -402,13 +403,13 @@
(LabelSpec
label: 'Category:'
name: 'Label12'
- layout: (LayoutFrame 10 0 249 0 180 0 271 0)
+ layout: (LayoutFrame 10 0 279 0 180 0 301 0)
translateLabel: true
adjust: right
)
(ComboBoxSpec
name: 'ComboBox3'
- layout: (LayoutFrame 190 0 250 0 -32 1 272 0)
+ layout: (LayoutFrame 190 0 279 0 -32 1 301 0)
activeHelpKey: namespace
model: categoryHolder
acceptOnLostFocus: true
@@ -417,7 +418,7 @@
(ActionButtonSpec
label: '...'
name: 'Button6'
- layout: (LayoutFrame -22 1 249 0 -2 1 271 0)
+ layout: (LayoutFrame -22 1 279 0 -2 1 301 0)
activeHelpKey: namespaceChooser
translateLabel: true
model: openCategoryChooser
@@ -425,14 +426,14 @@
(LabelSpec
label: 'Instance Variables:'
name: 'Label5'
- layout: (LayoutFrame 10 0 289 0 180 0 311 0)
+ layout: (LayoutFrame 10 0 319 0 180 0 341 0)
activeHelpKey: instanceVariableNames
translateLabel: true
adjust: right
)
(InputFieldSpec
name: 'EntryField4'
- layout: (LayoutFrame 190 0 289 0 -32 1 311 0)
+ layout: (LayoutFrame 190 0 319 0 -32 1 341 0)
activeHelpKey: instanceVariableNames
model: instVarNamesHolder
acceptOnReturn: true
@@ -443,14 +444,14 @@
(LabelSpec
label: 'Class Variables:'
name: 'Label6'
- layout: (LayoutFrame 10 0 319 0 180 0 341 0)
+ layout: (LayoutFrame 10 0 349 0 180 0 371 0)
activeHelpKey: classVariableNames
translateLabel: true
adjust: right
)
(InputFieldSpec
name: 'EntryField5'
- layout: (LayoutFrame 190 0 319 0 -32 1 341 0)
+ layout: (LayoutFrame 190 0 349 0 -32 1 371 0)
activeHelpKey: classVariableNames
model: classVarNamesHolder
acceptOnReturn: true
@@ -461,14 +462,14 @@
(LabelSpec
label: 'Class Instance Variables:'
name: 'Label7'
- layout: (LayoutFrame 10 0 349 0 180 0 371 0)
+ layout: (LayoutFrame 10 0 379 0 180 0 401 0)
activeHelpKey: classInstVariableNames
translateLabel: true
adjust: right
)
(InputFieldSpec
name: 'EntryField6'
- layout: (LayoutFrame 190 0 349 0 -32 1 371 0)
+ layout: (LayoutFrame 190 0 379 0 -32 1 401 0)
activeHelpKey: classInstVariableNames
model: classInstVarNamesHolder
acceptOnReturn: true
@@ -479,29 +480,29 @@
(LabelSpec
label: 'Create:'
name: 'Label8'
- layout: (LayoutFrame 10 0 389 0 110 0 411 0)
+ layout: (LayoutFrame 10 0 419 0 110 0 441 0)
translateLabel: true
adjust: right
)
(CheckBoxSpec
label: 'Accessors'
name: 'CheckBox1'
- layout: (LayoutFrame 120 0 389 0 280 0 411 0)
+ layout: (LayoutFrame 120 0 419 0 280 0 441 0)
activeHelpKey: createAccessors
model: createAccessorsHolder
translateLabel: true
)
(CheckBoxSpec
- label: 'Initial GUI Code'
+ label: 'Initial Template Code'
name: 'CheckBox6'
- layout: (LayoutFrame 310 0 390 0 470 0 412 0)
+ layout: (LayoutFrame 310 0 419 0 470 0 441 0)
model: createInitialGUICodeHolder
translateLabel: true
)
(CheckBoxSpec
label: 'Initializer'
name: 'CheckBox2'
- layout: (LayoutFrame 120 0 419 0 280 0 441 0)
+ layout: (LayoutFrame 120 0 449 0 280 0 471 0)
activeHelpKey: createInitializer
model: createInitializerHolder
translateLabel: true
@@ -509,7 +510,7 @@
(CheckBoxSpec
label: 'Update Method'
name: 'CheckBox5'
- layout: (LayoutFrame 120 0 449 0 280 0 471 0)
+ layout: (LayoutFrame 120 0 479 0 280 0 501 0)
activeHelpKey: createUpdateMethod
model: createUpdateMethodHolder
translateLabel: true
@@ -517,7 +518,7 @@
(CheckBoxSpec
label: 'Required Methods (Subclass responsibilities)'
name: 'CheckBox3'
- layout: (LayoutFrame 120 0 480 0 400 0 502 0)
+ layout: (LayoutFrame 120 0 509 0 400 0 531 0)
activeHelpKey: createRequiredMethods
model: createRequiredMethodsHolder
translateLabel: true
@@ -525,7 +526,7 @@
(CheckBoxSpec
label: 'Print Method'
name: 'CheckBox4'
- layout: (LayoutFrame 120 0 509 0 280 0 531 0)
+ layout: (LayoutFrame 120 0 539 0 280 0 561 0)
activeHelpKey: createPrintMethod
visibilityChannel: false
model: createPrintMethodHolder
@@ -560,6 +561,22 @@
)
)
+ (LabelSpec
+ label: 'Stereotype:'
+ name: 'Label13'
+ layout: (LayoutFrame 10 0 120 0 180 0 142 0)
+ activeHelpKey: className
+ translateLabel: true
+ adjust: right
+ )
+ (ComboListSpec
+ name: 'ComboList3'
+ layout: (LayoutFrame 190 0 119 0 -32 1 141 0)
+ activeHelpKey: programmingLanguage
+ model: stereotypeHolder
+ comboList: listOfStereotypes
+ useIndex: true
+ )
)
)
@@ -778,6 +795,25 @@
openPackageChooser
self halt.
+!
+
+stereotypeChanged
+ |stereoType|
+
+ stereoType := self listOfStereotypes at:(self stereotypeHolder value).
+
+ stereoType = 'GUIApplication' ifTrue:[
+ self superclassNameHolder value:'ApplicationModel'
+ ].
+ stereoType = 'Widget' ifTrue:[
+ self superclassNameHolder value:'View'
+ ].
+ stereoType = 'WebService' ifTrue:[
+ self superclassNameHolder value:'HTTPService'
+ ].
+ stereoType = 'TestCase' ifTrue:[
+ self superclassNameHolder value:'TestCase'
+ ].
! !
!NewClassWizardDialog methodsFor:'aspects'!
@@ -941,6 +977,17 @@
^ Smalltalk allProjectIDs copy sort
!
+listOfStereotypes
+ ^ #(
+ ''
+ GUIApplication
+ Widget
+ WebService
+ TestCase
+ "/ Enumeration
+ )
+!
+
nameSpaceHolder
<resource: #uiAspect>
@@ -967,6 +1014,16 @@
^ SystemBrowser visitedClassNamesHistory
!
+stereotypeHolder
+ <resource: #uiAspect>
+
+ stereotypeHolder isNil ifTrue:[
+ stereotypeHolder := ValueHolder new.
+ stereotypeHolder onChangeSend:#stereotypeChanged to:self.
+ ].
+ ^ stereotypeHolder.
+!
+
superclassNameHolder
<resource: #uiAspect>
@@ -979,5 +1036,5 @@
!NewClassWizardDialog class methodsFor:'documentation'!
version_CVS
- ^ '$Header: /cvs/stx/stx/libtool/Tools__NewClassWizardDialog.st,v 1.5 2009-11-06 19:04:51 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libtool/Tools__NewClassWizardDialog.st,v 1.6 2009-11-07 03:44:53 cg Exp $'
! !