@@ -38,6 +38,13 @@ We provide a real-time data API for future JetBrains plugin developers and resea
3838IDE tracker and eye tracker separately. The API is based on the [ IDE Tracker] ( #ide-tracker )
3939and [ Eye Tracker] ( #eye-tracker ) .
4040
41+ #### Example Project
42+
43+ 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.
47+
4148### Configuration
4249
4350Before using the API, you first need to build CodeGRITS from source
@@ -52,6 +59,13 @@ intellij {
5259}
5360```
5461
62+ You also need to add the following to ` ./src/main/resources/META-INF/plugin.xml ` .
63+
64+ ``` xml
65+
66+ <depends >com.nd.codegrits</depends >
67+ ```
68+
5569### Quick Start
5670
5771To use the API, simply call the ` getInstance() ` method to get the instance of the IDE Tracker or Eye Tracker. Then, set
@@ -60,13 +74,13 @@ the `ideTrackerDataHandler` or `eyeTrackerDataHandler` to handle the real-time d
6074method to start tracking.
6175
6276``` java
63- IDETracker ideTracker = IDETracker . getInstance();
64- ideTracker. setIsRealTimeDataTransmitting(true );
65- ideTracker. setIdeTrackerDataHandler(element - > {
66- String formattedStr = " Event: " + element. getAttribute(" id" );
67- System . out. println(formattedStr);
68- });
69- ideTracker. startTracking(currentProject);
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);
7084```
7185
7286!!!
0 commit comments