Hi Teo,
Thanks for the support. Now I am able to create markers on external file by setting the attribute ICModelMarker.C_MODEL_MARKER_EXTERNAL_LOCATION
Regards,
Srirekha
From: "teodor.madan@xxxxxxxxxxxxx" <teodor.madan@xxxxxxxxxxxxx>
To: CDT General developers list. <cdt-dev@xxxxxxxxxxx>
Subject: Re: [cdt-dev] Regarding marker in the external file
Message-ID:
<1b80299039294d8d900800d5da85f66e@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx>
Content-Type: text/plain; charset="us-ascii"
Generally speaking, marker persistence (aka resource on which it is created) is not necessary tied to annotation displayed in an editor.
You can create a marker on a project/workspace resource with a special attribute recognized by your model. And then attach to editors a custom annotation model that would search through existing markers and display annotations for the
relevant ones.
One example of such annotation model is org.eclipse.cdt.internal.ui.editor.ExternalSearchAnnotationModel . If you create a marker on any resource with an attribute ICModelMarker.C_MODEL_MARKER_EXTERNAL_LOCATION with value of external
file path, an annotation will be displayed in editor for that path.
Another example with breakpoints is org.eclipse.cdt.dsf.mi.service.MIBreakpointsManager.addBreakpointProblemMarker. You can attempt to set a breakpoint on external file and follow how the new problem marker is set.
Teo
From: cdt-dev-bounces@xxxxxxxxxxx [mailto:cdt-dev-bounces@xxxxxxxxxxx] On Behalf Of Srirekha P. K.
Sent: Tuesday, June 17, 2014 14:35
To: cdt-dev@xxxxxxxxxxx
Subject: [cdt-dev] Regarding marker in the external file
Hi,
How can I add markers in an external file opened in eclipse editor?
When I tried to create marker, I am getting null for the resource, since the file is not in the workspace. But it is possible to add breakpoint in the external file. Could anyone help me?
Regards,
Srirekha
________________________________