Installing the Code Editor and the TDB Editor
To use the TDB Editor, you install the Code Editor (Visual Studio Code (VSCode), JetBrains IntelliJ, or JetBrains PyCharm) and then in the editor you install the TDB Editor extension, which is included with your Thermo‑Calc installation.
In order to access the most-up-to-date version of the TDB editing functionality, it must be reinstalled every time a new version of Thermo-Calc is installed.
System Requirements
The same system requirements apply to the TDB Editor as to the Thermo‑Calc installation.
A full list of system requirements and program availability is found on the Thermo‑Calc website. You can also see the roadmap for platform support to use for planning purposes.
How to Install the TDB Editor Extension in VSCode
-
Navigate to the Thermo-Calc distribution directory based on your operating system. Locate the file
tdb-language-support.vsix
.- On Windows, the file is typically located under
C:\Program Files\Thermo-Calc-<version>
. - On Linux, the file is typically located under
<user>/Thermo-Calc/<version>
. - On macOS, the file is typically located under
/Applications/Thermo-Calc-<version>/Contents/Resources
.
- On Windows, the file is typically located under
- Copy the
tdb-language-support.vsix
file to your desktop. - Install VSCode for your platform from https://code.visualstudio.com/download.
- In VSCode, press Ctrl+Shift+X (or from the menu, select View→Extensions). The Extensions panel opens.
- In the upper right corner of the Extensions panel, click the three dots (...) Views and More Actions button. Select Install from VSIX and select the
tdb-language-support.vsix
file on your desktop. - Locate TDB Language Support in the Extensions panel. For example, click Filter Extensions → Installed and the file displays in the panel.
- Click TDB Language Support to see the README file, which includes current version information, known bugs, and limitations.
How to Install the TDB Editor Extension in JetBrains IntelliJ and PyCharm
- Open the File → Settings window (Ctrl+Alt+S). All the following settings are done in panels of this window:
- Open the Editor panel and select TextMate Bundles.
- Click + to add a new bundle. Select the bundle by navigating to the TDBLanguage.tmBundle located in the Thermo-Calc software distribution directory:
- On Windows, the distribution directory is typically
C:\Program Files\Thermo-Calc-<version>
. - On Linux, the distribution directory is typically
<user>/Thermo-Calc/<version>
. - On macOS, the distribution directory is typically
/Applications/Thermo-Calc-<version>/Contents/Resources
. You might need to copy the bundle from the installation directory to the desktop before being able to select it.
The editor supports syntax coloring of TDB files.
- On Windows, the distribution directory is typically
- Open the Plugins panel and download and install the LSP4IJ plugin. Restart the IDE if required.
- Open the Languages & Frameworks panel and select Language Servers. Click + to add a new server and set the following:
- Name: TDB Language Server
- Server / Command:
<Thermo-Calc’s distribution directory>TDBLanguageServer.<file extension>
where file extension is:- Windows:
.exe
- Linux:
.sh
- macOS:
.command
- Windows:
- Mappings / File name patterns:
*.tdb
-
Language id: tdb
- The editor supports syntax checking, clickable items with jumping and formatting of TDB files. Click the Language Servers icon in the left margin of the output pane at the bottom of the screen.
The TDB Language Server should now be listed.
- If you want to see details about the communication between the editor and the language server (which might require a restart of the editor), click the entry to configure verbose tracing in the Debug tab.
- Expand the TDB Language Server entry to show the server status. If a TDB file is loaded in the editor, the status should display the text started pid:<number>.
Notes about the TDB Editor Extension
- The syntax checker cannot resolve references to TDB files with partial database information and gives errors in such cases. Only databases contained in single files can be handled. For syntax checking of multi-file databases, use the stand-alone Database Checker tool. See About the Database Checker.
- If you encounter warning messages that do not match the content in the TDB Editor, a possible solution is to save the file to disk (press Ctrl+S on the keyboard), which reloads the file and restarts the syntax checker.
- Very large files can sometimes cause issues with the language support functionality although the actual editing should be unaffected by this.
- In VSCode, the default maximum file size can be changed in Preferences → Settings → Text Editor → Diff Editor → Max File Size.
- In IntelliJ and PyCharm, the default maximum size of 2.5 MB can be changed by setting the following custom property under Help:
idea.max.intellisense.filesize=<the filesize in kB>
.- For example enter
2500
for 2.5 MB,idea.max.intellisense.filesize=2500
.
- For example enter