I'm doing a python plug-in to GNAT GPS IDE.
It uses the Locations window to shows a messages to the user, therefore highlighting a file line, like errors do. I use GPS.Locations.parse()
to add such information, the (somewhat hazy) documentation is here.
The user then could select the line from the code or the Locations window to perform an action.
Get the line from the opened file is a piece of cake.
But one thing that still eludes me, is how I can know which line from the Locations window the user is selecting.
I tried the GPS.MDI.get("Locations")
which lead me to a maze of children windows objects. I got lost.
So how can I retrieve the text from the currently selected line in Locations?
Edit
Apparently there MessageContext that would give me what I want, but I get an error message saying there's not such class, even when the window has focus. So I recon that the class wasn't instantiated.
AttributeError: 'module' object has no attribute 'MessageContext'