Skip to main content

Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

Papyrus/customizations/manufacturing/aas/jdt

JDT Integration

In order to edit the behavior of the submodel operations in CanvAAS, we have developed an integration functionality between CanvAAS modeling editors and the Eclipse Java development tools (JDT) . This integration is closely linked to the code generation and synchronization task. In fact, after defining a submodel operation, the user is able to specify the implementation of the operation in Java code. However, it is more intuitive for the user to edit the implementation of the operation in a JDT Editor and not directly in the model. Thus, the user can benefits from the completion and the automatic compilation of the java code provided by the JDT Editor.

In order to keep both possibilities of defining an implementation of a submodel operation (1) Directly in a Java Editor and (2) in the AAS model itself, AAS Designer offers the JDT synchronization functionality that consist in synchronizing this implementation in both direction from the model to the java code and from the java code to the model.

Editing operations code

After generating Basyx code from an AAS using the menu:

AAS -> Generate Basyx code, you can edit the JAVA code of submodel operations using the Eclipse JDT editor.

This java code, if edited, will update the AAS model content (operation's name and parameters) and will be stored inside the model.

To launch the JDT editor, right click on the operation in the model Explorer and click on Designer -> launch JDT editor:

AAS48.png

The user can edit there the method implementation and save the Java file. (see Figure below).

AAS70 01.png

This will trigger the AAS Designer JDT synchronization to include this new implementation in the model (see Figure below).

AAS70 02.png

Each time the user regenerate the code from its AAS, this implementation will be automatically generated. At the other hand, the user can modify the implementation of the operation in the model, and again thanks to the JDT synchronization functionality, this will trigger the change of the method implementation in the generated java file.

It is worth to note that the synchronization functionality only concerns the method implementation update: the user is not allowed to modify the method signature since this can cause compilation errors in the whole Java project generated by BaSyx.

For connected submodelElements (Property, SEC and File) the user can get the value of those dynamic properties from the server. Thus, a “get” Operation is generated for each dynamic connected submodelElement. The synchronization functionality is also available for “get” Operations generated from the connected submodelElements. Thus, the user can edit in the generated java file the implementation of a generated “get” Operation and its implementation will be synchronized in the AAS Designer model.

AAS70 04.png

Back to the top