Chapter 16. Test Failures as Markers

In this chapter, we want to transform test failures into markers, just like the markers used to indicate compile errors. In this chapter, we will

  • Explore the structure of markers

  • Attach markers to resources

  • Define a new marker type as an variation of an existing type

  • Delete markers from resources

Test for a Marker

Our first test will

  • Write a failing test

  • Run it

  • Ensure a marker was created

As good little monkeys, our first task is to see what a compile error looks like as a marker (see Figure 16.1).

Marker Attributes Stored in a Compact Map

Figure 16.1. Marker Attributes Stored in a Compact Map

Markers have types, represented by a field.[1] Other than type, each ...

Get Contributing to Eclipse: Principles, Patterns, and Plug-Ins now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.