Question

What is the established way to pass some data — more than int, boolean, String because those can be handled as marker attributes — from the class that creates an IMarker to an IMarkerResolution so that the quick fix can be "smart" about what it displays/does?

Was it helpful?

Solution

This is now handled in the following way:

The plugin maintains a repository of the data that needs to be associated with the markers. Each data item gets a unique ID assigned and that ID is stored along with the marker. Later on the data can be retrieved from the repository by the ResolutionProviders that help the user and offer quick fixes.

The plugin could even persist the additional data along with the other data that is held by the plugin, but that's not necessary right now.

It's not even that ugly as a solution, you'll have to take care of incremental builds and cleans so as not to have a memory leak.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top