Skip to content

Commit

Permalink
[INTERNAL] Resource#getProject: Add notice for extensions (#451)
Browse files Browse the repository at this point in the history
Co-authored-by: Matthias Oßwald <1410947+matz3@users.noreply.github.com>
  • Loading branch information
RandomByte and matz3 authored Dec 12, 2022
1 parent 66c6f75 commit 62482f5
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
7 changes: 7 additions & 0 deletions lib/Resource.js
Original file line number Diff line number Diff line change
Expand Up @@ -330,6 +330,13 @@ class Resource {

/**
* Retrieve the project assigned to the resource
* <br/>
* <b>Note for UI5 Tooling extensions (i.e. custom tasks, custom middleware):</b>
* In order to ensure compatibility across UI5 Tooling versions, consider using the
* <code>getProject(resource)</code> method provided by
* [TaskUtil]{@link module:@ui5/project/build/helpers/TaskUtil} and
* [MiddlewareUtil]{@link module:@ui5/server.middleware.MiddlewareUtil}, which will
* return a Specification Version-compatible Project interface.
*
* @public
* @returns {@ui5/project/specifications/Project} Project this resource is associated with
Expand Down
7 changes: 7 additions & 0 deletions lib/ResourceFacade.js
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,13 @@ class ResourceFacade {

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

0 comments on commit 62482f5

Please sign in to comment.