Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [cdt-dev] [Launch] Why do CDT launch configs map the project?

I think it is a good idea.

Christian W. Damus wrote:
Hi, John,

Thanks for your response. It's interesting that you raised that bug only three days ago! The planets must be aligned ... :-) In any case, that is the same kind of problem that is facing my users.

Yes, I see that the platform has a resource listener that purges launches on resource deletion. Somehow, JDT cleans up on project deletion, too, despite that it doesn't use the mapped resources. I think they use a delete refactoring participant, which is actually a nicer approach than the back-door listener, as it avoids your bug 273005.

Perhaps the CDT committer team would be interested in a contribution of a delete participant to supersede the mapped-resource setting? I might just throw in a rename participant that updates the project-name attribute, too :-)

Cheers,

Christian


On Thu, 2009-04-23 at 09:49 -0500, John Cortell wrote:
The mappings are helpful for cleanup. If you delete a project, then the launch configuration is removed with it. This cleanup is provided automatically by the platform, that's why you don't see CDT using the mappings.

The CDT launch config code should remove the resource mapping if the CDT project the user sets in the config is non-existent.

There remains the issue of launch configs "going away" when the project is renamed. I recently opened up

   https://bugs.eclipse.org/bugs/show_bug.cgi?id=273005

against the platform hoping that they will add support to automatically handle updating the mapped resources, since they are the main (only?) consumer of that mechanism. However, because the project reference exists not only in the mapped resource but in a CDT attribute in the launch config, both need to be updated. I've developed a solution in our commercial products--a startup plugin which listens to resource change events and updates the launch config. I just recently added this (a few days ago). I can contribute it, but will want to let it cook for a while and see if there are any problems with it.

John

At 09:37 AM 4/23/2009, Christian W. Damus wrote:
Hello, CDT launch experts,

Why do the CDT launch configurations commonly set the context project as the "mapped resource" for the config? I ask for two reasons:

    * this is different from JDT, which never sets mapped resources
      in its launch configs (bad JDT, perhaps?)
    * it results in launch configs being filtered out of the dialog
      if either the user sets the project name to a non-existent
      project or the project is temporarily unavailable (it is
surprising to users to see them disappear) One can argue that users should not be permitted to type non-existent project names into these configs, but JDT allows it (you just can't launch) and a validation problem is shown, so it's nice to let users save their bad data anyway. Besides that there are any number of ways to get a bad project name after the fact.

Anyhow, the real gist of my question is what would be the impact of omitting the resource mapping either

    * always (to what extent does CDT rely on it?  CDT never queries
      the mapped resources of a config), or
    * when the user enters a non-existent project name (some call
      sites in the CDT code already check for project existence
before setting the mapped resources, but not all) What is the committers' opinion of changing how the resource mappings are set? Any preference?

Thanks,

Christian





Christian W. Damus
Software Developer, IDE Team
QNX Software Systems <http://www.qnx.com/>
_______________________________________________
cdt-dev mailing list
cdt-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/cdt-dev
_______________________________________________
cdt-dev mailing list
cdt-dev@xxxxxxxxxxx <mailto:cdt-dev@xxxxxxxxxxx>
https://dev.eclipse.org/mailman/listinfo/cdt-dev
------------------------------------------------------------------------


Christian W. Damus
Software Developer, IDE Team
QNX Software Systems <http://www.qnx.com/>


------------------------------------------------------------------------

_______________________________________________
cdt-dev mailing list
cdt-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/cdt-dev


Back to the top