STEP API Autocomplete
Distribution
Autocomplete for STEP API is available through the following maven dependency or npm dependency
Dependency version matrix
STEP version | Dependency version |
---|---|
STEP 9.0 | 9.0.0 |
STEP 9.1 | 9.1.0 |
STEP 9.2 | 9.2.0 |
STEP 9.3 | 9.3.0 |
STEP 10.0 | 10.0.1 |
STEP 10.1 | 10.1.1 |
STEP 10.2 | 10.2.1 |
STEP 10.3 | 10.3.1 |
STEP 11.0 | 11.0.1 |
STEP 11.1 | 11.1.0 |
Maven
<repositories>
<repository>
<id>nexus.cantor.public</id>
<name>Cantor Public Repository</name>
<url>https://ccs-nexus.cantor.fr/content/groups/public</url>
</repository>
</repositories>
<dependencies>
<dependency>
<groupId>fr.cantor.companion.ext</groupId>
<artifactId>external-libs</artifactId>
<version>11.1.0</version>
</dependency>
</dependencies>
WARNING
Maven API autocomplete is only compatible with IntelliJ IDEA Ultimate
npm
Configure your access to the cantor node repository
You add the following line inside a .npmrc file
@cantor:registry=https://ccs-nexus.cantor.fr/repository/node/
Install npm package
Run the following command with STEP-VERSION (your STEP instance version)
npm install @cantor/external-libs@STEP-VERSION --save-exact
With STEP-VERSION=11.1.0 you should find the dependency inside your package.json
{
"name": "my-awesome-companion-project",
"version": "1.0.0",
"dependencies": {
"@cantor/external-libs": "11.1.0"
}
}
Visual Studio Code
To have STEP API autocompletion inside your Visual Studio Code IDE, you have to configure in the same folder the following files:
tsconfig.json
:
{
"compilerOptions": {
"module": "none",
"target": "ES2015",
"allowJs": true,
"checkJs": true
},
"include": ["node_modules/@cantor/external-libs/**/*", "**/*.js"],
"exclude": []
}
package.json
: see (Npm package)
Samples
Methods autocompletion
Provides autocompletion for Java API methods of STEP within JavaScript code, allowing developers to easily access and use Java API methods directly from their JavaScript code.
STEP Java API documentation
Allows you to access and utilize the Java API within your JavaScript code with the help of detailed documentation.
Deprecated methods
Companion display deprecated methods, you can use the appropriate API function or method and then inspect the documentation or code comments for the deprecated tag to identify and handle these methods accordingly.
Type checking
By leveraging the IDE's functionalities, you can conveniently display your code errors and easily identify and fix them.
Ensures that all required parameters are provided when one is missing.
Ensures that the values being compared are of the same type.
Ensures that the input parameter passed into a function or method is of the expected data type.