Chapter 20. Plugin Tips and Techniques

Table of Contents

20.1. Utility Classes
20.2. Bundling Additional Class Libraries
20.3. Bundling Additional Non-Java Libraries
20.4. Storing plugin data
20.5. Plugin colors

20.1.  Utility Classes

If you need to check what the current running platform is, see org.gjt.sp.jedit.OperatingSystem.

If you need to compare file names and don't want to worry about whether you are on a case-sensitive file system or not, use MiscUtilities.pathsEqual(). See that class for other useful path manipulation routines.

There are other helpful classes in org.gjt.sp.util, such as HtmlUtilities, StandardUtilities, IOUtilities, and Log. In particular, the Log class is recommended for reporting errors and also logging debug information.

If your plugin needs to "find a word" (using word boundaries) somewhere in the buffer, you might want to reuse the org.gjt.sp.jedit.TextUtilities class.