Package trackers

Class EyeTracker

java.lang.Object
trackers.EyeTracker
All Implemented Interfaces:
com.intellij.openapi.Disposable

public class EyeTracker extends Object implements com.intellij.openapi.Disposable
This class is the eye tracker.
  • Field Details

    • dataOutputPath

      String dataOutputPath
    • sampleFrequency

      double sampleFrequency
      This variable indicates the sample frequency of the eye tracker.
    • psiDocumentManager

      com.intellij.psi.PsiDocumentManager psiDocumentManager
    • editor

      public com.intellij.openapi.editor.Editor editor
    • eyeTracking

      Document eyeTracking
      This variable is the XML document for storing the eye tracking data.
    • root

      Element root
    • setting

      Element setting
    • gazes

      Element gazes
    • isTracking

      boolean isTracking
      This variable indicates whether the tracking is started.
    • screenWidth

      double screenWidth
    • screenHeight

      double screenHeight
    • projectPath

      String projectPath
    • filePath

      String filePath
    • lastElement

      com.intellij.psi.PsiElement lastElement
    • visibleArea

      Rectangle visibleArea
    • pythonProcess

      Process pythonProcess
    • pythonOutputThread

      Thread pythonOutputThread
    • pythonInterpreter

      String pythonInterpreter
    • pythonScriptTobii

      String pythonScriptTobii
    • pythonScriptMouse

      String pythonScriptMouse
    • deviceIndex

      int deviceIndex
    • isRealTimeDataTransmitting

      private static boolean isRealTimeDataTransmitting
      This variable indicates whether the real-time data is transmitting.
    • eyeTrackerDataHandler

      private Consumer<Element> eyeTrackerDataHandler
      This variable is the handler for eye tracking data.
    • visibleAreaListener

      com.intellij.openapi.editor.event.VisibleAreaListener visibleAreaListener
      The listener for the visible area used for filtering the eye tracking data.
  • Constructor Details

  • Method Details

    • startTracking

      public void startTracking(com.intellij.openapi.project.Project project) throws IOException
      This method starts the eye tracking.
      Parameters:
      project - The project.
      Throws:
      IOException - The exception.
    • stopTracking

      public void stopTracking() throws TransformerException
      This method stops the eye tracking.
      Throws:
      TransformerException - The exception.
    • pauseTracking

      public void pauseTracking()
      This method pauses the eye tracking. The isTracking variable will be set to false.
    • resumeTracking

      public void resumeTracking()
      This method resumes the eye tracking. The isTracking variable will be set to true.
    • processRawData

      public void processRawData(String message)
      This method processes the raw data message from the eye tracker. It will filter the data, map the data to the specific source code element, and perform the upward traversal in the AST.
      Parameters:
      message - The raw data.
    • track

      public void track()
      This method builds the Python process and redirects the output to the pythonOutputThread to process.
    • setProjectPath

      public void setProjectPath(String projectPath)
      This method sets the project path.
      Parameters:
      projectPath - The project path.
    • dispose

      public void dispose()
      Specified by:
      dispose in interface com.intellij.openapi.Disposable
    • getRawGazeElement

      public Element getRawGazeElement(String message)
      This method gets the raw gaze xml element from the raw gaze data.
      Parameters:
      message - The raw gaze data.
      Returns:
      The raw gaze element.
    • getASTStructureElement

      public Element getASTStructureElement(com.intellij.psi.PsiElement psiElement)
      This method gets the AST structure element from the PSI element. It performs the upward traversal in the AST.
      Parameters:
      psiElement - The PSI element.
      Returns:
      The AST structure element.
    • handleElement

      private void handleElement(Element element)
      This method handles the element.
      Parameters:
      element - The element.
    • setIsRealTimeDataTransmitting

      public static void setIsRealTimeDataTransmitting(boolean isRealTimeDataTransmitting)
    • setEyeTrackerDataHandler

      public void setEyeTrackerDataHandler(Consumer<Element> eyeTrackerDataHandler)
    • setPythonInterpreter

      public void setPythonInterpreter(String pythonInterpreter)
    • setDataOutputPath

      public void setDataOutputPath(String dataOutputPath)
    • setSampleFrequency

      public void setSampleFrequency(double sampleFrequency)
    • setPythonScriptTobii

      public void setPythonScriptTobii()
      This method sets the Python script for the Tobii eye tracker.
    • setPythonScriptMouse

      public void setPythonScriptMouse()
      This method sets the Python script for the mouse eye tracker.
    • setDeviceIndex

      public void setDeviceIndex(int deviceIndex)
      This method sets the device index.
      Parameters:
      deviceIndex - The device index.