Skip to content

Commit 6665742

Browse files
committed
api doc
1 parent d7a8424 commit 6665742

File tree

3 files changed

+17
-15
lines changed

3 files changed

+17
-15
lines changed

.idea/workspace.xml

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,10 @@ The data collected by CodeGRITS can be used by empirical SE researchers to under
2121
especially those related to eye gaze. CodeGRITS also provides a [real-time data API](developer.md)
2222
for future plugin developers and researchers to design context-aware programming support tools.
2323

24+
We provide an example project [DataStreamReceiver](https://github.com/codegrits/DataStreamReceiver) that builds on top
25+
of the real-time data API. It is designed to receive the IDE and eye tracking data and directly visualize them in two
26+
separate windows.
27+
2428
## Key Features
2529

2630
- :mag: **IDE Tracking**: CodeGRITS tracks developers’ IDE interactions, including mouse clicks, keyboard inputs, etc.

docs/developer.md

Lines changed: 11 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -38,12 +38,11 @@ We provide a real-time data API for future JetBrains plugin developers and resea
3838
IDE tracker and eye tracker separately. The API is based on the [IDE Tracker](#ide-tracker)
3939
and [Eye Tracker](#eye-tracker).
4040

41-
#### Example Project
42-
41+
!!! Example Project
4342
We provide an example project [DataStreamReceiver](https://github.com/codegrits/DataStreamReceiver)
44-
that builds on top of the real-time data API. It is designed to receive real-time IDE tracking and eye tracking data and
45-
directly visualize them in two separate windows. You could refer to the source code of the example project to learn how
46-
to use the API.
43+
that builds on top of the real-time data API. It is designed to receive the IDE and eye tracking data and directly
44+
visualize them in two separate windows. You could refer to its source code to learn how to use the API.
45+
!!!
4746

4847
### Configuration
4948

@@ -62,7 +61,6 @@ intellij {
6261
You also need to add the following to `./src/main/resources/META-INF/plugin.xml`.
6362

6463
```xml
65-
6664
<depends>com.nd.codegrits</depends>
6765
```
6866

@@ -74,13 +72,13 @@ the `ideTrackerDataHandler` or `eyeTrackerDataHandler` to handle the real-time d
7472
method to start tracking.
7573

7674
```java
77-
IDETracker ideTracker=IDETracker.getInstance();
78-
ideTracker.setIsRealTimeDataTransmitting(true);
79-
ideTracker.setIdeTrackerDataHandler(element->{
80-
String formattedStr="Event: "+element.getAttribute("id");
81-
System.out.println(formattedStr);
82-
});
83-
ideTracker.startTracking(currentProject);
75+
IDETracker ideTracker = IDETracker.getInstance();
76+
ideTracker.setIsRealTimeDataTransmitting(true);
77+
ideTracker.setIdeTrackerDataHandler(element -> {
78+
String formattedStr = "Event: " + element.getAttribute("id");
79+
System.out.println(formattedStr);
80+
});
81+
ideTracker.startTracking(currentProject);
8482
```
8583

8684
!!!

0 commit comments

Comments
 (0)