CodeGeneratorTool.st
branchjv
changeset 12123 4bde08cebd48
parent 11170 37e2d07378b9
child 12125 0c49a3b13e43
--- a/CodeGeneratorTool.st	Fri Jan 27 22:18:53 2012 +0100
+++ b/CodeGeneratorTool.st	Sun Jan 29 12:53:39 2012 +0000
@@ -13,7 +13,7 @@
 
 Object subclass:#CodeGeneratorTool
 	instanceVariableNames:'compositeChangeCollector compositeChangeNesting userPreferences
-		generateComments confirmChanges targetClass'
+		generateComments confirmChanges'
 	classVariableNames:'GenerateCommentsForGetters GenerateCommentsForSetters
 		CopyrightTemplate'
 	poolDictionaries:''
@@ -589,7 +589,6 @@
     "Do not manually edit this!! If it is corrupted,
      the MenuEditor may not be able to read the specification."
 
-
     "
      MenuEditor new openOnClass:CodeGeneratorTool andSelector:#initialToolbarMenuSpec
      (Menu new fromLiteralArrayEncoding:(CodeGeneratorTool initialToolbarMenuSpec)) startUp
@@ -604,7 +603,6 @@
             label: 'Reload'
             itemValue: menuReload
             translateLabel: true
-            isButton: true
             labelImage: (ResourceRetriever ToolbarIconLibrary reload24x24Icon)
           )
          )
@@ -1094,18 +1092,15 @@
 createStandaloneStartupCodeFor:aClass
     "create an empty console application framework"
 
-    |metaClass nonMetaclass className txt|
-
-    targetClass := aClass.
+    |metaClass className txt|
 
     self startCollectChanges.
 
     metaClass := aClass theMetaclass.
-    nonMetaclass := aClass theNonMetaclass.
-    className := nonMetaclass name.
+    className := aClass theNonMetaclass name.
 
     (metaClass includesSelector:#applicationRegistryPath) ifFalse:[
-        txt := self codeFor_standAloneApplicationRegistryPathFor:nonMetaclass.
+        txt := self codeFor_standAloneApplicationRegistryPath.
         self
             compile:(txt bindWith:className)
             forClass:metaClass 
@@ -1132,12 +1127,12 @@
             forClass:metaClass 
             inCategory:'startup'.
 
-        (metaClass includesSelector:#'realMain:') ifFalse:[
-            txt := self codeFor_standAloneRealMainMethodFor:nonMetaclass.
+        (metaClass includesSelector:#'doRealWork:') ifFalse:[
+            txt := self codeFor_standAloneDoRealWorkMethod.
             self
                 compile:(txt bindWith:className)
                 forClass:metaClass 
-                inCategory:'startup'.
+                inCategory:'operation'.
         ].
 
     ].
@@ -1520,15 +1515,9 @@
 !
 
 codeFor_standAloneApplicationRegistryPath
-    ^ self codeFor_standAloneApplicationRegistryPathFor:nil
-
-    "Created: / 19-08-2011 / 02:13:14 / cg"
-!
-
-codeFor_standAloneApplicationRegistryPathFor:aClass
     self subclassResponsibility
 
-    "Created: / 21-01-2012 / 11:23:47 / cg"
+    "Created: / 19-08-2011 / 02:12:59 / cg"
 !
 
 codeFor_standAloneApplicationUUID
@@ -1537,18 +1526,18 @@
     "Created: / 19-08-2011 / 02:12:51 / cg"
 !
 
+codeFor_standAloneDoRealWorkMethod
+    self subclassResponsibility
+
+    "Created: / 19-08-2011 / 02:20:23 / cg"
+!
+
 codeFor_standAloneMain
     self subclassResponsibility
 
     "Created: / 19-08-2011 / 02:12:44 / cg"
 !
 
-codeFor_standAloneRealMainMethodFor:aClass
-    self subclassResponsibility
-
-    "Created: / 21-01-2012 / 12:28:45 / cg"
-!
-
 codeFor_standAloneUsage
     self subclassResponsibility
 
@@ -1605,7 +1594,7 @@
         selector notNil ifTrue:[
             oldMthd := aClass compiledMethodAt:selector.
             isSame := (oldMthd notNil and:[oldMthd source = theCode]).
-            isSame ifTrue:[^ self ].
+            isSame ifTrue:[ ^ self ].
         ].
     ].
 
@@ -1626,7 +1615,6 @@
     ]
 
     "Modified: / 21-08-2006 / 18:39:06 / cg"
-    "Modified (format): / 21-01-2012 / 10:40:59 / cg"
 ! !
 
 !CodeGeneratorTool methodsFor:'initialization'!
@@ -1685,9 +1673,9 @@
 !CodeGeneratorTool class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libtool/CodeGeneratorTool.st,v 1.97 2012-01-22 10:10:57 cg Exp $'
+    ^ '$Id: CodeGeneratorTool.st 7819 2011-08-19 08:54:18Z vranyj1 $'
 !
 
 version_CVS
-    ^ '$Header: /cvs/stx/stx/libtool/CodeGeneratorTool.st,v 1.97 2012-01-22 10:10:57 cg Exp $'
-! !
+    ^ '§Header: /cvs/stx/stx/libtool/CodeGeneratorTool.st,v 1.95 2011/08/19 00:32:02 cg Exp §'
+! !
\ No newline at end of file