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 the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.