Skip to content

Commit 62482f5

Browse files
RandomBytematz3
andauthored
[INTERNAL] Resource#getProject: Add notice for extensions (#451)
Co-authored-by: Matthias Oßwald <[email protected]>
1 parent 66c6f75 commit 62482f5

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

lib/Resource.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -330,6 +330,13 @@ class Resource {
330330

331331
/**
332332
* Retrieve the project assigned to the resource
333+
* <br/>
334+
* <b>Note for UI5 Tooling extensions (i.e. custom tasks, custom middleware):</b>
335+
* In order to ensure compatibility across UI5 Tooling versions, consider using the
336+
* <code>getProject(resource)</code> method provided by
337+
* [TaskUtil]{@link module:@ui5/project/build/helpers/TaskUtil} and
338+
* [MiddlewareUtil]{@link module:@ui5/server.middleware.MiddlewareUtil}, which will
339+
* return a Specification Version-compatible Project interface.
333340
*
334341
* @public
335342
* @returns {@ui5/project/specifications/Project} Project this resource is associated with

lib/ResourceFacade.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -187,6 +187,13 @@ class ResourceFacade {
187187

188188
/**
189189
* Retrieve the project assigned to the resource
190+
* <br/>
191+
* <b>Note for UI5 Tooling extensions (i.e. custom tasks, custom middleware):</b>
192+
* In order to ensure compatibility across UI5 Tooling versions, consider using the
193+
* <code>getProject(resource)</code> method provided by
194+
* [TaskUtil]{@link module:@ui5/project/build/helpers/TaskUtil} and
195+
* [MiddlewareUtil]{@link module:@ui5/server.middleware.MiddlewareUtil}, which will
196+
* return a Specification Version-compatible Project interface.
190197
*
191198
* @public
192199
* @returns {@ui5/project/specifications/Project} Project this resource is associated with

0 commit comments

Comments
 (0)