import { SAPNode } from "ui5plugin-parser/dist/classes/librarydata/SAPNode" ; import { SAPNodeDAO } from "ui5plugin-parser/dist/classes/librarydata/SAPNodeDAO" ; import { IPropertyGetterStrategy } from "../interfaces/IPropertyGetterStrategy" ; export class SAPNodePropertyGenerationStrategy implements IPropertyGetterStrategy { private static readonly _nodeDAO = new SAPNodeDAO ( ) ; private readonly _node : SAPNode ; constructor ( node ) { this . _node = node ; } getParent ( ) { let theParent ; if ( this . _node . node . extends ) { const parentNode = SAPNodePropertyGenerationStrategy . _nodeDAO . findNode ( this . _node . node . extends ) ; if ( parentNode ) { theParent = new SAPNodePropertyGenerationStrategy ( parentNode ) ; } } return theParent ; } getProperties ( ) { return this . _node . getProperties ( ) ; } getProperty ( property ) { return { name : property . name , defaultValue : property . defaultValue } ; } }