STEP API Autocomplete

Distribution

Autocomplete for STEP API is available through the following maven dependency or npm dependency

Dependency version matrix

STEP versionDependency version
STEP 9.09.0.0
STEP 9.19.1.0
STEP 9.29.2.0
STEP 9.39.3.0
STEP 10.010.0.1
STEP 10.110.1.1
STEP 10.210.2.1
STEP 10.310.3.1
STEP 11.011.0.1
STEP 11.111.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": []
}

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.

Methods

STEP Java API documentation

Allows you to access and utilize the Java API within your JavaScript code with the help of detailed documentation.

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.

deprecared

Type checking

By leveraging the IDE's functionalities, you can conveniently display your code errors and easily identify and fix them.

img.png

Ensures that all required parameters are provided when one is missing. img_1.png

Ensures that the values being compared are of the same type. img_2.png

Ensures that the input parameter passed into a function or method is of the expected data type.

img_3.png

Last Updated: