Which set of Pascal sources to refer to from the IDE?

I have TMS Web Core on Delphi 10.4.1. I see at least 2 directories with more or less identical WEB Core Pascal sources
1 - C:\Users...\Documents\tmssoftware\TMS WEB Core RSXE13\Component Library Source
2 - C:\Users...\Documents\tmssoftware\TMS WEB Core RSXE13\Core Source
Both have e.g. WEBLib.JSON.pas.
The IDE is confused and most of the time code insight/completion does not work. Also, sometimes the pas2js compiler seems to use other sources than the Delphi IDE, such that the new language server sees something as wrong while pas2js happily compiles.
So the question is: Why are there two sets of sources installed and which one is the one to reference through the IDE? Which set of sources should be added to Tools/Options in the IDE?

Your IDE should look at sources in folder
"Component Library Source" as this is the design-time source code.

Your IDE should NOT look at sources in folder
"Core Source"
as this is the runtime framework code and has specific syntax extensions for mapping on JavaScript.

Here is what I did:

  • Uninstalled TMS Web Core and wiped remaining TMS directories
  • Close Delphi IDE
  • Installed TMS Web Core
  • Added the "Component Library Source" path (and only this) to Tools/Options/Language/Delphi/Library/SearchPath.
  • Loaded Web Core sample "Simple Service"

Still Code Insight does not work for Web Core related sources, in particular <ctrl><left click>.
Code Insight does work for any other regular non Web Core project.

Does Code Insight work on your side? Anything else to setup in the IDE? Wouldn't normally the setup program do the required IDE setting?

The installer should have preset everything correct (If you run our installer from the same Windows user account as the one with which you run Delphi).
It should have add the folder "Component Library Source" to your Win32 library path.

(Remark: I'm on a German system, so I have to translate the IDE)

I did run the installer from the same user account (wweyers) as the one in which I run Delphi. After that, Tools/Options/Language/Delphi/Library/Windows 32 Bit/SearchPath shows no reference to TMS sources. Therefore I added them manually, as discussed above. In Tools/Options/Language/Delphi/Library/Windows 32 Bit/Library Path I find two references as you can see in the screen shot. But these refer to the DCUs only.

It is in the "Bibliothekspfad" you need to look.

The content of "Bibliothekspfad" with respect to TMS is shown in the screen shot. Are you saying I should add the "Component Library Source" path that contains the sources to the "Bibliothekspfad"?


Thank you Bruno, this one did it. Still leaves the question open why the installer did not do that automatically. And if I may suggest: Some words to explain the differences between the 2 sets of sources and why it is necessary to have 2 sets would be nice to find in the documentation PDF.

It is not clear. The installer is supposed to do this automatically via setting the registry.
Perhaps something did interfere with registry updating.

There is a design-time to using TMS WEB Core that has the requirement to be hosted in an IDE that isn't web based, hence, it needs to do all design-time behavior using VCL code.
The runtime is of course web based, hence the fact that all runtime code is targeted at running in a browser.