|
|
IntelliJ is an IDE for Java development. Pulse provides a Java SDK that can be used instantiate and control a Pulse engine over a JNI bridge. The test suite is also written in Java and may be debugged or developed in this environment.
|
|
|
|
|
|
Note that as part of the Pulse build, a Pulse.jar file was built to `<pulse/bin>` and is available for you to use in your Java projects. All dependent jars are located in the `<pulse/source/jar>` folder.
|
|
|
|
|
|
Configuration
|
|
|
-------------
|
|
|
Pulse provides an IntelliJ project. To open it, select 'File->Open Project' and navigate to the root of your Pulse source directory. Next, follow the following steps :
|
|
|
|
|
|
### Create a protobuf Module
|
|
|
You will need to create a protobuf module to compile the java files associated with th google protocol buffer library downloaded by the Pulse superbuild.
|
|
|
|
|
|
* Select 'File->New->Module From Existing Sources'
|
|
|
* Navigate to `<pulse/build>/protobuf/src/protobuf/java/core/src/main` directory
|
|
|
* Continue through the wizard, you can rename the module from 'main' to 'protobuf' if you wish for clarity.
|
|
|
|
|
|
### Create a schema Module
|
|
|
You will need to create a schema module to compile the java code generated from compiling the Pulse proto files
|
|
|
|
|
|
* Select 'File->New->Module From Existing Sources'
|
|
|
* Navigate to `<pulse/build>/Pulse/schema` directory
|
|
|
* Continue through the wizard, the module will be named 'schema'
|
|
|
|
|
|
### Configure the project dependencies
|
|
|
The following module dependencies need to be reflected in the Project Structure :
|
|
|
* schema depends on protobuf
|
|
|
* cdm depends on schema
|
|
|
* engine depends on cdm
|
|
|
* howto depends on engine
|
|
|
|
|
|
To set these dependencies, follow these instructions :
|
|
|
|
|
|
* Select 'File->Project Structure'
|
|
|
* Select 'Modules'
|
|
|
* Select the each Module and add a 'Module Dependency' via the + button on the right of the dialog.
|
|
|
|
|
|
![IntelliJ_Settings](/uploads/2754d550012b259ef53abb7732782a61/IntelliJ_Settings.png)
|
|
|
|
|
|
### Run the SDK examples
|
|
|
|
|
|
We provide 2 examples for controlling the Pulse engine through Java.
|
|
|
|
|
|
* HowTo_EngineUse - Shows how to dynamically control the engine via the API
|
|
|
* HowTo_RunScenarios - Shows how to run static scenarios through the engine to get a csv results file.
|
|
|
|
|
|
To run these, right click the java file of your choice, and select the 'Debug HowTo_XXX.java.main()' option. The executable drop down will be populated and you will need to select the 'Edit Configurations...' option on the drop down.
|
|
|
|
|
|
![IntelliJ_Run_Settings](/uploads/94c8657fda10d8497f344eb16cd321ab/IntelliJ_Run_Settings.png)
|
|
|
|
|
|
Next set the Working directory to your `<pulse/bin>` directory
|
|
|
|
|
|
![IntelliJ-HowTo-Settings](/uploads/046d7c11eb76793be240e99879711181/IntelliJ-HowTo-Settings.png)
|
|
|
|
|
|
You may then set break points in your HowTo file and run to through the debugger exploring the Pulse code!
|
|
|
|
|
|
![IntelliJ-debugging](/uploads/9c7c312f3a83a6667c73b59e2aa37f34/IntelliJ-debugging.png)
|
|
|
|