@@ -145,28 +145,37 @@ abstract class UI5BindingPath extends BindingPath {
145145 * Gets the `DataFlow::Node` that represents this binding path.
146146 */
147147 Node getNode ( ) {
148- /* Restrict search to the same webapp. */
148+ /* 1-1. Internal (Client-side) model, model hardcoded in JS code */
149+ exists ( Property p , JsonModel model |
150+ /* Get the property of an JS object bound to this binding path. */
151+ result .( DataFlow:: PropWrite ) .getPropertyNameExpr ( ) = p .getNameExpr ( ) and
152+ this .getAbsolutePath ( ) = model .getPathString ( p ) and
153+ /* Restrict search to inside the same webapp. */
154+ exists ( WebApp webApp |
155+ webApp .getAResource ( ) = this .getLocation ( ) .getFile ( ) and
156+ webApp .getAResource ( ) = result .getFile ( )
157+ )
158+ )
159+ or
160+ /* 1-2. Internal (Client-side) model, model loaded from JSON file */
161+ exists ( string propName , JsonModel model |
162+ /* Get the property of an JS object bound to this binding path. */
163+ result = model .getArgument ( 0 ) .getALocalSource ( ) and
164+ this .getPath ( ) = model .getPathStringPropName ( propName ) and
165+ exists ( JsonObject obj , JsonValue val | val = obj .getPropValue ( propName ) ) and
166+ /* Restrict search to inside the same webapp. */
167+ exists ( WebApp webApp |
168+ webApp .getAResource ( ) = this .getLocation ( ) .getFile ( ) and
169+ webApp .getAResource ( ) = result .getFile ( )
170+ )
171+ )
172+ or
173+ /* 2. External (Server-side) model */
174+ result = this .getModel ( ) .( UI5ExternalModel ) and
175+ /* Restrict search to inside the same webapp. */
149176 exists ( WebApp webApp |
150177 webApp .getAResource ( ) = this .getLocation ( ) .getFile ( ) and
151178 webApp .getAResource ( ) = result .getFile ( )
152- |
153- /* 1-1. Internal (Client-side) model, model hardcoded in JS code */
154- exists ( Property p , JsonModel model |
155- /* Get the property of an JS object bound to this binding path. */
156- result .( DataFlow:: PropWrite ) .getPropertyNameExpr ( ) = p .getNameExpr ( ) and
157- this .getAbsolutePath ( ) = model .getPathString ( p )
158- )
159- or
160- /* 1-2. Internal (Client-side) model, model loaded from JSON file */
161- exists ( string propName , JsonModel model |
162- /* Get the property of an JS object bound to this binding path. */
163- result = model .getArgument ( 0 ) .getALocalSource ( ) and
164- this .getPath ( ) = model .getPathStringPropName ( propName ) and
165- exists ( JsonObject obj , JsonValue val | val = obj .getPropValue ( propName ) )
166- )
167- or
168- /* 2. External (Server-side) model */
169- result = this .getModel ( ) .( UI5ExternalModel )
170179 )
171180 }
172181}
0 commit comments