Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[cdt-dev] Adding new resource types to CDT


Hi,
I was wondering how it is possible to add new resource types to the C/C++ Projects View. A bit of background:

Resources in the can be of several types:
  • Sources and directories that are build configuration invariant
  • Binaries and files that are build configuration dependant. They are stored in a configuration dependant directory. Because of this, they behave as if they were configuration invariant.
  • Resources which are dynamically created on demand, for example the Includesresource or fragments of source files. These are “virtual” resources that do not necessarily map onto entities that exist in the file system and are implemented by CDT itself.

We need to support some source files - DEF files - that depend on the build configuration. The background is that DEF files contain mangled names of C++ symbols, which depend on the toolchain that is being used. So what one ends up with is typically several build configurations sharing one DEF file. There are two ways how to integrate this from a users point of view:
(a) Add all source files as separate entities to the project and let the builder ignore the ones that are not applicable for a particular configuration. That should be straightforward.
(b) Add one source file and link it to the correct source file whenever the build configuration changes

I have only just started looking at the packages org.eclipse.cdt.internal.ui.cview and the CDT core model (CoreModel and CModelManager). What is the best way to achieve (b) and which places should I start to look at for a more detailed investigation? Is this possible at all without changing the CDT core model (via extension points or by deriving a specialised C/C++ Project View from CDT classes and the CDT core model)?

Any help would be appreciated.

Best Regards
Lars Kurth
P.S.: This seems to be a similar problem to the one described in the thread "[cdt-dev] Towards a more language neutral CDT"


********************************************************************** Symbian Software Ltd is a company registered in England and Wales with registered number 4190020 and registered office at 2-6 Boundary Row, Southwark, London, SE1 8HP, UK. This message is intended only for use by the named addressee and may contain privileged and/or confidential information. If you are not the named addressee you should not disseminate, copy or take any action in reliance on it. If you have received this message in error please notify postmaster@xxxxxxxxxxx and delete the message and any attachments accompanying it immediately. Neither Symbian nor any of its subsidiaries accepts liability for any corruption, interception, amendment, tampering or viruses occurring to this message in transit or for any message sent by its employees which is not in compliance with Symbian corporate policy. **********************************************************************


Back to the top