@@ -33,9 +33,6 @@ export class GeneratorContext {
3333 // The exported blocks for the current module.
3434 private exportedBlocks : Block [ ] = [ ] ;
3535
36- // Key is the mrc_class_method_def block's NAME field, value is the python method name.
37- private classMethodNames : { [ key : string ] : string } = Object . create ( null ) ;
38-
3936 // Has mechanisms (ie, needs in init)
4037 private hasMechanisms = false ;
4138
@@ -46,15 +43,14 @@ export class GeneratorContext {
4643
4744 clear ( ) : void {
4845 this . clearExportedBlocks ( ) ;
49- this . clearClassMethodNames ( ) ;
5046 this . hasMechanisms = false ;
5147 }
48+
5249 setHasMechanism ( ) :void {
5350 this . hasMechanisms = true ;
5451 }
5552 getHasMechanisms ( ) :boolean {
5653 return this . hasMechanisms ;
57- }
5854
5955 getClassName ( ) : string {
6056 if ( this . module . moduleType === commonStorage . MODULE_TYPE_PROJECT ) {
@@ -101,21 +97,4 @@ export class GeneratorContext {
10197 getExportedBlocks ( ) : Block [ ] {
10298 return this . exportedBlocks ;
10399 }
104-
105- clearClassMethodNames ( ) {
106- this . classMethodNames = Object . create ( null ) ;
107- }
108-
109- addClassMethodName ( nameFieldValue : string , methodName : string ) {
110- if ( nameFieldValue !== methodName ) {
111- this . classMethodNames [ nameFieldValue ] = methodName ;
112- }
113- }
114-
115- getClassMethodName ( nameFieldValue : string ) : string | null {
116- if ( this . classMethodNames [ nameFieldValue ] ) {
117- return this . classMethodNames [ nameFieldValue ] ;
118- }
119- return nameFieldValue ;
120- }
121100}
0 commit comments