Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [cdt-dev] Acquiring an IBinaryParser

Hi Pete,

2009/6/29 Pete Vidler <p.vidler@xxxxxxxxxxxxxxx>:
> Can anyone please tell me the best way to get an IBinaryParser from an
> IProject?
> I've been using an old way that I found in a wiki somewhere, but in CDT 6.0
> it appears to be deprecated (it used ICDescriptor and ICExtensionReference).
>  I'm having trouble with my Eclipse 3.5 installation, so I can't seem to
> find what the replacement is.

Short answer: the same way as you used to.  The binary parsers
(+scanner discovery) settings are currently stored by the cdescriptor
mechanism. This has no knowledge of Configurations which causes all
sorts of issues. My hope is that in the future these will be migrated
to the ConfigurationDescription. However this isn't going to change in
CDT 6, and there likely won't be any breakage here in 7.

To be honest, I'd advocate using
IBinaryParser[] CCorePlugin#getBinaryParser(IProject)
as this isn't tied to a particular storage type.  I know this is
deprecated, but there seems to be no good reason for it.  Most
call-sites with CDT call the getBinaryParserExtensions() then iterate
over the ICExtensionReference[] calling #createExtension() which is
exactly what getBinaryParser(IProject) does.


Back to the top