The excel-importer is an Eclipse RCP extension, contributing to the Axon Ivy Designer featureset. This guide explains the steps to setup the development environment for it.
It was written for LTS10 and EclipseRCP 2024-03.
To start with, we need an Eclipse IDE for development.
- Download the latest EclipseRCP IDE from the official site.
- Unpack the ZIP to a location of your choice
- Run the Eclipse binary in it; and pick a yet empty workspace for development
Now you are ready to import the "excel-importer" extension
- Click on the Menu "File" -> "Import" -> "General" > Existing projects into workspace"
- Select the "excel-importer-modules" and "excel-importer" project within your local clone of this repo.
- The extension will not yet compile; until we have a valid target-platform
Here's how you can setup your eclipseRCP to build upon the AxonIvyDesigner platform.
- Navigate to "Window" > "Preferences" > "Plug-in Development" > "Target Platform" Select the 'ivy.target' file from your local workspace.
- Press "Apply and Close" ... wait for the platform fetching (south east progress bar of eclipse main windows)
- Compile the 'excel-connector' extension. You may have to do this manually after loading the platform: Menu "Project" > "Clean"
- Now all projects in the workspace should be without errors.
Now we are building a launcher to start the Designer from the Dev environment.
-
Click on the Menu "Run" > "Run Configurations ..."
-
Right click on "Eclipse Application" and opt for "New Configuration"
-
Give the Configuration a name e.g. "DevDesigner"
-
In the Main tab, select the product to run to be "ch.ivyteam.ivy.designer.branding.product"
-
In the Arguments tab, in the Working Directory section, choose "Other" and pass a file path to an official AxonIvyDesigner, matching your development train.
-
In the "VM arguments" section: add the following:
-Dorg.eclipse.swt.graphics.Resource.reportNonDisposed=true -Xmx2g --add-modules=ALL-SYSTEM --add-exports=java.desktop/com.sun.java.swing.plaf.windows=ALL-UNNAMED --add-opens=java.base/java.io=ALL-UNNAMED --add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=java.base/java.lang.reflect=ALL-UNNAMED --add-opens=java.base/java.time=ALL-UNNAMED --add-opens=java.base/java.text=ALL-UNNAMED --add-opens=java.base/java.util=ALL-UNNAMED --add-opens=java.base/java.net=ALL-UNNAMED --add-opens=java.desktop/java.awt.font=ALL-UNNAMED --add-exports=java.xml/com.sun.org.apache.xpath.internal=ALL-UNNAMED --add-exports=java.xml/com.sun.org.apache.xpath.internal.objects=ALL-UNNAMED --add-exports=java.xml/com.sun.org.apache.xml.internal.utils=ALL-UNNAMED --add-exports=java.base/sun.security.provider.certpath=ALL-UNNAMED -Dosgi.requiredJavaVersion=17
-
Hit the "Run" button ... and the Designer should start
In the Dev-Designer you can access the extension.
- Create an empty playground Project as your "target" for demo imports.
- Run the extension via Menu "File" -> "Import". If you run it, you will execute the code in your Eclipse RCP environment.
You can also debug through the extension code; though most of the code life in the consumed Ivy Platform.
- Close any running DevDesigner instances
- Click on the "Debug" (bug icon) in the Eclipse RCP main toolbar
- Select the "DevDesigner" launch config
- Add debug breakpoints into the "excel-importer" extension code
- Trigger the import in the DevDesigner, and the execution will halt on breakpoints.
The most important transformations when importing Excel sheets to Dialogs are tested with classical @IvyTest cases. Here's how to use them:
- Import all projects of your local 'excel-importer' clone into the Designer workspace (yes, also the extension itself)
- you'll probably see two false-positive compile errors; just delete them in the Problem section.
- Go into the Test project and select a Unit Test of your choice
- Right click and Run it to verify your code.
These tests are of course also executed in the actions build pipeline, using Maven.