#REFACTORING by cg
class: ProgrammingLanguage
added: #methodTemplateForVersionMethodCVS
comment/format in:
#compilerWithBreakpointSupportClass
#isGroovy
changed:
#methodTemplate
#methodTemplateForDocumentation
#versionMethodTemplateForCVS
category of: #toolboxClass
--- a/ProgrammingLanguage.st Fri Apr 29 11:46:44 2016 +0200
+++ b/ProgrammingLanguage.st Fri Apr 29 11:47:43 2016 +0200
@@ -266,7 +266,6 @@
"Created: / 16-08-2009 / 10:42:40 / Jan Vrany <vranyj1@fel.cvut.cz>"
! !
-
!ProgrammingLanguage methodsFor:'accessing-classes'!
codeGeneratorClass
@@ -296,7 +295,7 @@
compilerWithBreakpointSupportClass
"Answer a class suitable for compiling a source code with breakpoints
- in 'my' language. If there is non, return nil."
+ in 'my' language. If there is none, return nil."
^ nil
@@ -480,7 +479,7 @@
!ProgrammingLanguage methodsFor:'testing'!
isGroovy
- "true iff this is a Groovy language"
+ "true iff this is the Groovy language"
^ false
@@ -552,11 +551,16 @@
methodTemplate
"return a method definition template string (or nil)"
- |writerClass|
+ "/ cg: I think this should be the codeGeneratorClass - not the writer
+"/ |writerClass|
+"/
+"/ (writerClass := self sourceFileWriterClass) isNil ifTrue:[^ nil].
+"/ ^ writerClass methodTemplate
- "/ cg: I think this should be the codeGeneratorClass - not the writer
- (writerClass := self sourceFileWriterClass) isNil ifTrue:[^ nil].
- ^ writerClass methodTemplate
+ |generatorClass|
+
+ (generatorClass := self codeGeneratorClass) isNil ifTrue:[^ nil].
+ ^ generatorClass methodTemplate
"Modified: / 21-08-2012 / 19:44:41 / cg"
!
@@ -564,11 +568,17 @@
methodTemplateForDocumentation
"return a method definition template string (or nil)"
- |writerClass|
+ |generatorClass|
+
+ (generatorClass := self codeGeneratorClass) isNil ifTrue:[^ nil].
+ ^ generatorClass methodTemplateForDocumentation
+!
- "/ cg: I think this should be the codeGeneratorClass - not the writer
- (writerClass := self sourceFileWriterClass) isNil ifTrue:[^ nil].
- ^ writerClass methodTemplateForDocumentation
+methodTemplateForVersionMethodCVS
+ |generatorClass|
+
+ (generatorClass := self codeGeneratorClass) isNil ifTrue:[^ nil].
+ ^ generatorClass methodTemplateForVersionMethodCVS
!
parenthesisSpecificationForEditor
@@ -578,10 +588,12 @@
!
versionMethodTemplateForCVS
+ <resource: #obsolete>
"raise an error: must be redefined in concrete subclass(es)"
|writerClass|
+ self obsoleteMethodWarning:'use methodTemplateForVersionMethodCVS'.
(writerClass := self sourceFileWriterClass) isNil ifTrue:[^ nil].
^ writerClass versionMethodTemplateForCVS