iljapostnovs / VSCodeUI5Plugin

Visual Studio Code Extension for UI5 Development
Apache License 2.0
61 stars 6 forks source link

Support CAP projects #300

Closed sebbi08 closed 1 year ago

sebbi08 commented 1 year ago

Hi cap projects are currently not rightly connection the view with the controller.

In cap projects, there is a ".tsconf" at the root level and an in the app folder there are one or many ui5 apps.

Here is an example

bookshop.zip

I also did some debugging, it looks like the main problem is that in the ui5plugin-parser https://github.com/iljapostnovs/ui5plugin-parser/blob/e36742c9ffd706f27cc34592af6ab7ffd9332c83/src/UI5TSParser.ts#L102 ts-morph will create a project with root folder /src and the app files are then not inside this folder.

I also added the root src folder to the excluded files, but it did not work.

One suggestion would be to search for the ui5.yaml files and start from there one. And maybe fallback to root of the project if no ui5.yamls were found.

sebbi08 commented 1 year ago

Current workaround for me is to work in two windows, one for the ui5 app and one for the server. Just in case someone across this

iljapostnovs commented 1 year ago

Hi,

Thanks for another bug report, however searching for ui5.yaml will not work for sure. Not every UI5 project is UI5 tooling based. I will think about other solutions.

iljapostnovs commented 1 year ago

Try proxyWorkspaces configuration of ui5parser in v1.0.0.

sebbi08 commented 1 year ago

working better now

but somehow the excludeFolderPatterns is not working

image

iljapostnovs commented 1 year ago

The proxyWorkspaces basically proxies the whole initialization and makes another folder as CWD. It means that excludeFolderPatterns should be defined e.g. in ub-frontend/termination/package.json. Please try it and let me know if it works.

sebbi08 commented 1 year ago

Now it's working awesome :)