If I have an IConnectionProfile, is there any way I can discern what plug-in provided the "enablement" implementation? That is, how can I tie a particular connection model back to the plug-in extension that produced it?
I would like to determine the plug-in because different plug-ins can treat the same database differently. For example, the DTP-provided Sybase enablement plug-in's model supplies the database's catalogs and schemas; while a third-party enablement plug-in may supply only the database's schemas.
Look for Plug-in Spy directions and when you create the new connection profile, figure out what plug-in is providing the driver UI on the New Connection Profile wizard when you specify driver details (URL, uid/pwd, etc.).
So far as I know, you really don't have a way to programmatically determine that in DTP. And since the model is spread across multiple plug-ins (EMF + SQL Model + Enablement extensions), I don't know that it would get you what you were looking for anyway.
Things are so spread out between profiles and driver implementations, catalog loaders, and model additions that it would be tough to come up with any way to do this that wasn't extremely time and resource intensive.
The only route I can think to go here would be to look for the driver associated with the profile and get the driver template ID from that. You might be able to then use the TemplateDescriptor class to get the TemplateDescriptor for the driver (public static TemplateDescriptor getDriverTemplateDescriptor(String id)) and then use the element associated with it (getElement() returns IConfigurationElement) and work your way out to the namespace of the element from there...
The issue with that, as I said earlier, is that typically these enablement extensions are split up across more than one plug-in, so that may or may not be reliable.
Honestly I'm not even sure that getting the namespace would get you what you want, but that's the avenue that I'd try...