Hi Doug,
You would need to keep old definitions and
specify the “convertToId” attribute for old definitions elements
that would tell how those old elements are to be converted to the new ones.
The “convertToId” could be
specified at the project-type, tool-chain, tool and builder level and should
contain an ID of the element (project-type, tool-chain, tool or builder) the attribute
holder is to be converted to.
In addition to this you will need to
define a converter ( via the org.eclipse.cdt.managedbuilder.core.projectConverter
extension point) that is to be used for converting the old element to the new
one.
Elements specifying the “convertToId”
attribute are to be converted to the “convertTo” on the project
load.
Also elements specifying the “convertToId”
attribute should not be presented in UI, so user should not be able to view/select
them.
The above mechanism should work fine with
the pre-4.0 projects, however I’m not sure it will work for the 4.0
projects. I’ve made some testing now and am not seeing the converter
being invoked for the 4.0 projects. I’ll take a look into this ASAP.
Another potential problem with the 4.0 projects is that the current “convertTo”
ideology might not feet well enough for the customizable tool-chains functionality
(i.e. the ability to select multiple custom tool-chains on project creation and
modify tool-chain settings for existing projects), i.e. in the 3.x times a
tool-integrator might specify the “convertToId” attribute for the
project type only and be sure that the conversion mechanism covers all elements
defined within the project type (tool-chains, tools, builders) since the CDT
did not allow adding/removing custom elements (tool-chains, tools, builders) to
the project as well as adding the project type elements to some other projects.
With the CDT 4.0 this is no longer true since the project-type converter will
not be able to handle, e.g.
1. custom elements added to the project
2. project-type elements (e.g. tool-chains, tools, builder) added to
another project
We’re currently working on
debugging/enhancing the conversion and tool-chain modification mechanism to
make it more suitable and usable with the CDT 4.0 environment.
Feel free to raise any bugs/enhancements you
find regarding the conversion mechanism.
Regards,
Mikhail
From:
cdt-dev-bounces@xxxxxxxxxxx [mailto:cdt-dev-bounces@xxxxxxxxxxx] On Behalf Of Doug Schaefer
Sent: Tuesday, October 23, 2007
1:05 AM
To: CDT General developers list.
Subject: [cdt-dev] MBS Project
Conversion
Hey gang,
I have my QNX hat on right now and have a dumb ISV question
for the build guys J.
I did a managed build integration last year and in the end I
didn’t like it much. So I’ve redone it and really like the new one.
The question I have is how to convert old projects to use the new definitions.
I’d like to do remove the old one so no new projects get created with it
and do a conversion when the defs file gets loaded. Or do I need to keep the
old defs around. If so how can I hide them?
Thanks,
Doug Schaefer, QNX Software Systems
Eclipse CDT Project
Lead, http://cdtdoug.blogspot.com