26.16. Idea

26.16.1. Overview

The Idea sensor collects data regarding developer activities using the IntelliJ Idea interactive development environment. The Idea sensor represents this data using the DevEvent sensor data type (documented in Section 25.10, “DevEvent”), which represents both editing actions and the "state change" event.

26.16.2. Installation

26.16.2.1. Prerequisites

The Idea sensor requires Java 1.5.0 or later, and has been tested with IntelliJ Idea 6.0.

26.16.2.2. Download HackyInstaller and set your Hackystat Host and User Key

Follow the instructions in Chapter 2, Client-side configuration: Tool sensor installation to set your Hackystat host and user key.

26.16.2.3. Configure and install the Idea sensor

In the HackyInstaller main window, select the Idea sensor and press "Configure Selected Sensor". Figure 26.31, “ Idea sensor installer configuration window ” shows what the configuration window should look like after the path to Idea is set, the sensor is enabled, and the "Install" button has been pressed to install the sensor.

Figure 26.31.  Idea sensor installer configuration window


Idea sensor installer configuration window

This sensor supports the following properties and paths:

  • Enable Idea Sensor: This property controls whether the sensor is active or not. If not checked, the sensor will not collect or send data even if installed.

  • Idea home directory: This path specifies the top-level directory for Idea. The Idea sensor requires the placement of a sensor executable into Idea's plugins directory.

  • Enable status line monitoring: If checked, then a line will be printed to the status line each time the Hackystat sensor creates an event.

26.16.3. Installation verification

26.16.3.1. List Sensor Data

After editing a file in Idea for a couple of minutes,exit Idea (which will trigger a send of the data to the server). Then login to your account on the Hackystat server, and use the "List Sensor Data" command on the Extras page to verify that DevEvent data for today's date was received by the server for the "Idea" tool.

26.16.4. Installation troubleshooting

26.16.4. Installation troubleshooting

26.16.4.1. Troubleshooting general client-server problems

The first step in troubleshooting your sensor installation is to verify that your Hackystat host and key settings are valid and that you can contact the Hackystat server, as described in Section 2.4, “HackyInstaller GUI: Setting and verifying the Hackystat host and user key”

26.16.4.2. Using an incorrect version of Idea or Java

A common installation problem is attempting to install the sensor with an unsupported version of Idea or Java. Make sure you are using Java 1.5.0 or later and IntelliJ Idea 6.0.

26.16.4.3. Checking client-side logging

The Idea sensor writes out a file called IDEA.0.log to the .hackystat/logs directory that can be useful in debugging your installation. Under normal conditions, this file should look similar to Example 26.38, “IDEA.0.log file”.

Example 26.38. IDEA.0.log file

Hackystat Version: 6.5.310 (March 10 2005 10:43:06)
SensorShell started at: 03/10/2005 11:42:20
Type 'help' for a list of commands.
Host: http://hackystat.ics.hawaii.edu/ is available and key is valid.
Defined shell command: Activity
Defined shell command: DevEvent
Defined shell command: UnitTest
Defined shell command: BuffTrans
Defined shell command: Build
Defined shell command: FileMetric
Defined shell command: SampleSdt
#> AutoSend [10]
AutoSend OK (set to 10 minutes)
AutoSend enabled every 10 minutes.
Checking for offline data to recover.
No offline data found.
#> DevEvent [set, tool=IDEA]
set OK
#> DevEvent [add, type=Open Project, path=C:\Documents and Settings\johnson\IdeaProjects\foo\foo.ipr]
DevEvent add OK (1 total)
#> DevEvent [add, type=Open File, path=C:/Documents and Settings/johnson/IdeaProjects/foo/src/Foo.java]
DevEvent add OK (2 total)
#> DevEvent [edit, path=C:/Documents and Settings/johnson/IdeaProjects/foo/src/Foo.java, size=945, pMap=000600009className00004.Foo00012numOfMethods00001100015numOfStatements0000211]
DevEvent edit OK (initial path and size)
#> DevEvent [add, type=Save File, path=C:/Documents and Settings/johnson/IdeaProjects/foo/src/Foo.java, pMap=000600009className00004.Foo00012numOfMethods00001100015numOfStatements0000211]
DevEvent add OK (3 total)
#> DevEvent [edit, path=C:/Documents and Settings/johnson/IdeaProjects/foo/src/Foo.java, size=958, pMap=000600009className00004.Foo00012numOfMethods00001100015numOfStatements0000211]
DevEvent edit OK (added an Edit/StateChange event)
#> DevEvent [add, type=Save File, path=C:/Documents and Settings/johnson/IdeaProjects/foo/src/Foo.java, pMap=000600009className00004.Foo00012numOfMethods00001100015numOfStatements0000212]
DevEvent add OK (5 total)
#> DevEvent [edit, path=C:/Documents and Settings/johnson/IdeaProjects/foo/src/Foo.java, size=1021, pMap=000600009className00004.Foo00012numOfMethods00001100015numOfStatements0000212]
DevEvent edit OK (added an Edit/StateChange event)
#> DevEvent [add, type=Close Project, path=C:\Documents and Settings\johnson\IdeaProjects\foo\foo.ipr]
DevEvent add OK (7 total)
#> send
Sending sensor data (12/18 13:42:28)
  Activity: Send OK (No entries to send.)
  Ping: Ping OK (contacted server http://localhost:8080/ with valid key.)
  DevEvent: Send OK (7 entries)
  AutoSend: AutoSend OK ('send' command ignored)
  BuffTrans: Send OK (No entries to send.)
  UnitTest: Send OK (No entries to send.)
  Build: Send OK (No entries to send.)
  FileMetric: Send OK (No entries to send.)
  SampleSdt: Send OK (No entries to send.)
>> 

If none of the above troubleshooting activities solves your problem, then you should send an email to your Hackystat Administrator to request help. Please include in your email the following information:

  • The output from 'java -version'.

  • The output from 'java -jar sensorshell.jar -verify'.

  • The contents of your sensor.properties file.

  • The contents of the IDEA.0.log file.

  • A description of the problem you are having.

26.16.5. Uninstallation

To disable Idea data collection temporarily, invoke HackyInstaller, bring up the Idea configuration window, and uncheck the "Enable Idea sensor" property, and apply the setting. To permanently uninstall the Idea sensor, press the "Uninstall" button.