Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[cdt-dev] Proposal on toolchain extensibility

Hi all,

First I'd like to congratulate the CDT team for the great work! CDT is
getting better with each release.

While trying to integrate tools into CDT, we have discovered that it's not
possible to add a new tool into an existing toolchain*: one has to subclass
from it in the plugin.xml to be able to add new tools. Is this intentional?
Is there some strong reason for that?

	* When I tried it, I got "Managed Build system manifest file error:
      Duplicate identifier cdt.managedbuild.toolchain.gnu.mingw.base
      for element type ToolChain", and further NPE in the "New C++
      Project" wizard -- I assume this is either a bug or the extension
	point wait was not meant to be used in the way I tried...
	
It poses the following problem: It is currently not really possible to write
3rd party plug-ins that extend CDT toolchains with new tools. I mean tools
like bison, flex, swig, and other code generation tools. Independent plug-in
providers would have to extend (subclass from) CDT toolchains into different
directions, resulting in a proliferation of slightly different and
incompatible toolchains.

If contributing tools to existing CDT toolchains was possible, an
independent plug-in could just contribute the "bison" and "flex" tools to
the root of the toolchain hierarchy, and they would appear in all
toolchains. 

We are currently developing a product which relies on CDT for C++
development, and hit by the same issue. We wanted to integrate our tool that
generates C++ source code ("message compiler"), and we were startled that we
had to subclass from all existing toolchains to do that. The resulting
plugin.xml would have been very bloated, in addition to not combining well
with other 3rd party extensions to CDT.

As an analogy, most aspects of the Eclipse platform can be extended without
"subclassing" too, i.e. one can add actions to perspectives, views etc
without having to create a new perspective or view with a different ID.
 
I have also submitted this as a bug
(https://bugs.eclipse.org/bugs/show_bug.cgi?id=212127), but I thought it was
significant enough to be discussed on the mailing list as well...

Looking forward to hear your comments.

Best regards,
Andras Varga



Back to the top