Implementing a structure tree

The SideKickParser has one abstract method that all subclasses must implement:

public SideKickParsedData parse( buffer,
  buffer,
  errorSource);

The errorSource is an instance of a class provided by the ErrorList plugin; consult its documentation for details.

The method is called from a thread, so care must be taken to access the buffer in a thread-safe manner; the API documentation for the Buffer class describes how this is done.

Your implementation of the parse() method should create and return an instance of SideKickParsedData . Its constructor of the takes one parameter, which is the file name (to be shown at the root of the structure tree). Your method should add structure elements to the root field of the instance. root is an instance of Java's DefaultMutableTreeNode class, and is given an initial value by the SideKickParsedData constructor.