contributing CDT marker help [message #125531] |
Mon, 01 November 2004 04:24  |
Eclipse User |
|
|
|
Originally posted by: Frank_van_den_Beuken.programmingresearch.com
Hi all,
I'm integrating a static code analysis tool into Eclipse/CDT.
I'm launching code analysis using an analysis make target and use the VC
error parser to present the analysis messages in the Problems View and to
get markers in the margin of the editor.
I also succeeded in integrating the online help for the analysis messages in
the Eclipse help system.
What I'd like to do now, is to provide a link from an analysis message in
the problems view to the online prohelp for that message, i.e. if I select
an occurrence of message 3625 in the view and then press F1, I want the help
browser to open with the help for that message loaded.
As I use the VC error parser, the analysis messages are
org.eclipse.cdt.core.problem markers, so I can only use the attributes
defined by that type to specify my marker help, so I tried:
<extension point="org.eclipse.ui.ide.markerHelp">
<markerHelp
markerType="org.eclipse.cdt.core.problem"
helpContextId="com.programmingresearch.qa.c.help_message_3684 "
>
<attribute name="org.eclipse.core.resources.problemmarker.message"
value="warning QC3684: Array declared with unknown size." />
</markerHelp>
</extension>
and in HelpContexts.xml:
<context id="help_message_3684" >
<description>Marker <b>Help</b> id = 3684 </description>
</context>
This does not show the expected help for the message, though.
Is it possible to check attributes of supertype markers as I'm trying to do?
If yes, what am I doing wrong?
If no, how can I achieve the desired effect?
I would prefer to define my own marker type,
com.programmingresearch.qa.c.message as a subtype of problem, with an
additional message id attribute, but how would I make the VC error parser
generate these instead of the default CDT problems?
I tried to define my own error parser to do that by extending VCErrorParser
and overriding method processLine.
The problem there, however, is that these error parsers use the method
generateMarker of the ErrorParserManager to generate the marker, and I see
no way to make this generate my type of marker instead of the default CDT
problem.
Can anyone help me further with this?
Thanks in advance,
Frank
--
dr. Frank van den Beuken, Programming Research BV
http://www.programmingresearch.com
|
|
|
|
|
|
Re: contributing CDT marker help [message #127237 is a reply to message #127186] |
Tue, 16 November 2004 09:05  |
Eclipse User |
|
|
|
This article may help;
http://www.eclipse.org/articles/Article-Mark%20My%20Words/Ma rk%20My%20Words.html
Dave.
Frank van den Beuken wrote:
> Thanks for your response Alain.
> As you can see in my original posting, I am aware of the extension point and
> also succeeded in implementing an error parser myself.
> However, this parser produces plain CDT problem markers of type
> org.eclipse.cdt.core.resources.problemmarker, whereas I'd like to produce
> markers of my own defined com.programmingresearch.qa.c.message subtype, for
> which I define an additional ID attribute to provide the required help
> functionality.
> Looking at the VCErrorParser source, I see that it uses the generateMarker
> method from the ErrorParserManager that is passed into processLine.
> So how do I override this behavior of the manager so that it produces
> messages of my subtype instead of default CDT markers?
>
> Thanks in advance for any further help,
> Frank
>
>
|
|
|
Powered by
FUDForum. Page generated in 0.04785 seconds