What APIs come with built-in background thread handling?

Apache NetBeans Wiki Index

Note: These pages are being reviewed.

A few APIs come with built in multi-threading - if you want your code to run on a background thread, you don’t have to do any special set up to do that.

Specifically they are

  • The Actions API - if you override asynchronous to return true (or don’t override it - for historical reasons this is the default), your action’s performAction method will run in the background

  • The Nodes API - to compute node children that are expensive to create, use ChildFactory and specify true as the boolean argument to Children.create()

  • Various parsing APIs - for syntax highlighting languages and so forth - usually you just provide a task to do, and it will automatically call you in the background when a reparse is being done

  • QuickSearch API - searchers are typically called in background thread by infrastructure in SearchProvider.evaluate(…​)