Skip to main content

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


Leo,
thanks for the feedback. I thought that (b) may be hard ... I have a few more questions to (a) and the MBS:
  • Is it possible to install a listener which notifies when the current build configuration is changed?
  • Is it possible for a builder to add a resource to the workspace using CDT Core API's? And then manipulate the resource settings afterwards from within the builder? I guess the answer is yes, but I wanted to double check:
    • In initial look into the code shows that this should be possible, but I must admit that I don't understand the CDT core architecture well enough yet. The way I would have gone about creating a



    "Treggiari, Leo" <leo.treggiari@xxxxxxxxx>
    Sent by: cdt-dev-admin@xxxxxxxxxxx

    09/03/2005 20:00

    Please respond to
    cdt-dev@xxxxxxxxxxx

    To
    <cdt-dev@xxxxxxxxxxx>
    cc
    Subject
    RE: [cdt-dev] Adding new resource types to CDT





    Hi Lars,

    (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.

    The MBS supports this in CDT 2.1, but you may already be aware of this.
    If not, here is how:
    1. Select the file that you want to exclude from a configuration and
    display the properties.
    2. Select the C/C+ Build page and select the appropriate configuration.
    3. Check the "Exclude from build" box.

    (b) Add one source file and link it to the correct source file whenever
    the build configuration changes

    This might be very difficult to accomplish in the current CDT.  A "build
    configuration" is an MBS concept - I don't believe that it is a CDT-wide
    concept, and it is not an Eclipse concept.  A linked resource is an
    Eclipse concept.  So, it would seem that you would need to define a new
    kind of "linked resource".  I don't know where to start for that.

    Regards,
    Leo
    ________________________________________
    From: cdt-dev-admin@xxxxxxxxxxx [mailto:cdt-dev-admin@xxxxxxxxxxx] On
    Behalf Of Lars.Kurth@xxxxxxxxxxx
    Sent: Wednesday, March 09, 2005 4:48 AM
    To: cdt-dev@xxxxxxxxxxx
    Subject: [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.
    **********************************************************************
    _______________________________________________
    cdt-dev mailing list
    cdt-dev@xxxxxxxxxxx
    http://dev.eclipse.org/mailman/listinfo/cdt-dev


********************************************************************** 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