The tasklist SPI provides convenience classes making it simple to write suggestion window clients which are managed by the SuggestionManager. This means the clients are created lazily, editor document tracking is performed by the super class, etc.

What you need to do is subclass one of the SuggestionProvider classes in the SPI, and then register it to your module's layer XML file as follows:

<folder name="Services">
   <folder name="SuggestionProviders">
      <file name="org-foo-bar-YourSuggestionProvider.instance">
         <attr name="instanceOf" stringvalue="org.netbeans.api.tasklist.SuggestionProvider"/>
         <attr name="instanceClass" stringvalue="org.foo.bar.YourSuggestionProvider"/>
      </file>
   </folder>
</folder>

You'll override one or more of the methods in the class you're subclassing, and when appropriate add suggestion to the SuggestionManager. Follow the API documentation on how to create Suggestion objects, register a SuggestionType, and add the Suggestion to the SuggestionManager.