ALL HOW TOs





Run Raven through Eclipse

Install Eclipse

NOTE: It is critical that Eclipse NOT be installed in Program Files. Raven writes files when it launches and will not be able to write those files if it is in Program Files. The symptom you will see if Raven can't write the files is Raven failing to start with a Null Pointer Exception.


Add Raven plugins into Eclipse dropins


Extract Raven Code

In Windows Explorer (requires Tortoise SVN)


Import Raven Project

In Eclipse

  • Set workspace to be the new Raven workspace (File->Switch Workspace->Other... browse to Raven workspace)
  • File -> Import...
    • General->Existing Projects into Workspace – Next
    • Select root directory: Browse... to the Raven Code directory (e.g. RAVEN_WORKSPACE/trunk OR RAVEN_WORKAPCE/Raven_1.5.0.0012-alpha1)
    • Finish


Setup Run Configuration

NOTE: I had one project have errors, so I simply closed the project. Offending Project: clo.brp.signal.io.device.filesequence.test

In Eclipse (first time only)

  • Run -> Run Configurations...
    • On Main tab
      • Name: Raven_VERSION (e.g. Raven_1.5)
      • Run a product: select clo.brp.raven.RavenProduct
    • On Arguments tab
      • Update VM argument -Xmx512m to -Xmx1024m (gives Raven more memory to work with)
    • On Plug-ins tab
      • Uncheck clo.brp.minotaur.startup (makes Raven launch as Raven instead of Minotaur)
    • Apply
    • Run

Raven should launch at this point. You can choose Run Demo, but this has limitations. You will need a license key to run full Raven. (See Dean or Tim for key.)


Run Configuration

  • After first time running Raven through Eclipse, you can now use the dropmenu beside the run icon on the toolbar and select Raven_VERSION name that you setup in the Setup Run Configuration step.
    • Select drop menu by run icon in toolbar
    • Select Raven_VERSION (e.g. Raven_1.5)



How to add a test item to the tools menu?

Code Locations:


Code Location


Example Code

Tool menu code:

clo.brp.raven/Source/clo.brp.raven.ui.menu/ToolsMenu.java

Example changes to ToolsMenu:

ToolsMenu.java (search for ELR to locate my changes)

Dialog code:

clo.brp.raven/Source/clo.brp.raven.ui.dialog/MyTestDialog.java

Example test dialog:

TEST_SendEchoMessageDialog.java

Panel code:

clo.brp.raven/Source/clo.brp.raven.ui.panel/MyTestPanel.java

Example panel used in test dialog:

TEST_SendEchoMessagePanel.java

Adding jars to Raven:

  • put in clo.brp.raven/lib
  • add to classpath
    • Rt-click project clo.brp.raven
    • Select Java Build Path -> Libraries
    • Add JARs...
      • Expand clo.brp.raven
      • Expand lib
      • Select jar you put into lib
      • OK



How to add an external jar to Raven at runtime?

NOTE: Raven uses a dynamic classpath at runtime. This means that code can compile properly in Eclipse which depends on Java Build Path -> Libraries list of jars, and fail to run when Raven is launched.

In Eclipse

  • Run -> Run Configurations...
    • Confirm that you are editing the Raven_VERSION (e.g. Raven_1.5) configuration
    • Switch to (x)=Arguments tab
      • add the following to VM arguments to append the jar to the path (multiple jars are separated by semicolons)
-Xbootclasspath/a:"FULL_PATH/MYJAR.jar;FULL_PATH/MYJAR2.jar"

Example

-Xbootclasspath/a:"${workspace_loc}/clo.brp.raven/lib/messageQueue-0.4.1-full.jar;${workspace_loc}/clo.brp.raven/lib/messageQueueRPC-0.1.1-full.jar"

NOTE: This works for me because my workspace is set to the plugins directory and clo.brp.raven is an immediately sub-directory.




  • No labels