Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[cdt-dev] Towards a more language neutral CDT

We in the Parallel Tools Project (PTP) are interested in
supporting Fortran and so we have an interest in helping
to make CDT more language neutral.  This will make it
easier for us to leverage off from the very nice work in CDT.

As a first step, we would like to suggest a mechanism for
abstracting out access to the singleton CCorePlugin object.
There are roughly 170 calls to the static method,
CCorePlugin.getDefault(), which is the entry point into much
of the language model.

From our first experience with building FDT (Fortran Development
Tools), pretty much just a straight copy of CDT, we have
noticed that CCorePlugin.getDefault is a major stumbling block
for a language neutral layer.

So how about this for a straw dog proposal:

1. Create a language neutral CorePlugin class, (or LangCorePlugin)
that CCorePlugin and FortranCorePlugin can inherit from.

2. Add a static method, CorePlugin.setDefault(), that allows the default
to be changed at runtime, depending on context.  Or maybe a better
way would be to leave default alone (default is still CCorePlugin) and
add set/getCurrent().

This seems a straightforward way to generalize the language model.
The problem is to identify the right places to do a setDefault().

If we can arrive at a consensus on how to generalize CCorePlugin.getDefault(), we would like to implement it and see how it works in practice. If it holds up,
we would like to contribute it back to the CDT.

What think ye?


Back to the top