Bug 264520 - Need to filter Driver Templates
Summary: Need to filter Driver Templates
Status: REOPENED
Alias: None
Product: Data Tools
Classification: Tools
Component: Driver Mgt Framework (show other bugs)
Version: 1.6.1   Edit
Hardware: PC Windows Vista
: P3 enhancement (vote)
Target Milestone: future   Edit
Assignee: Brian Fitzpatrick CLA
QA Contact:
URL:
Whiteboard:
Keywords: noteworthy
Depends on:
Blocks:
 
Reported: 2009-02-11 09:32 EST by Jeremy Lindop CLA
Modified: 2009-04-17 10:37 EDT (History)
0 users

See Also:


Attachments
Possible solution (10.15 KB, patch)
2009-02-11 14:39 EST, Brian Fitzpatrick CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jeremy Lindop CLA 2009-02-11 09:32:43 EST
Build ID: I20080617-2000

Steps To Reproduce:
We would like to be able to filter the DTP driver templates so that only a subset of the templates are shown. The use case is that in a product, only a subset of databases may be supported and it would therefore be very useful to show only the driver templates for the supported databases in the DTP Connection Profile / Drivers dialogs.

More information:
Comment 1 Brian Fitzpatrick CLA 2009-02-11 14:39:47 EST
Created attachment 125439 [details]
Possible solution

This patch provides a possibility for how to handle removing a driver template via the driver override extension. Low impact and optional for implementers, but an easy way for extenders to remove unneeded driver templates if they're already paring down the # of enablement plug-ins and such. I'll provide an XML example in another comment.
Comment 2 Brian Fitzpatrick CLA 2009-02-11 14:40:57 EST
An example snippet of plugin.xml code would look like this:

 <extension
       point="org.eclipse.datatools.connectivity.driverExtension">
    <driverTemplateOverride
          priority="1"
          remove="true"
          targetId="the.id.of.the.template.to.remove">
    </driverTemplateOverride>
 </extension>
Comment 3 Brian Fitzpatrick CLA 2009-02-11 14:42:16 EST
My only concern with this approach is that it would be very painful to implement a remove for every template this way. This should only be used if the DTP enablement plug-ins were pared down ahead of time and you knew which templates were left that you wanted to remove.
Comment 4 Brian Fitzpatrick CLA 2009-03-06 12:05:53 EST
delivered to o.e.d.connectivity as tag v200903070105
Comment 5 Brian Fitzpatrick CLA 2009-03-06 12:07:45 EST
Noteworthy -
Developers now have a method of removing specific driver templates from the list via their own driverTemplateOverride extensions. This allows much more granular removal of templates if they are replacing driver templates with their own versions, or if they're not supporting particular drivers at all but don't want to remove entire sets of enablement plug-ins.
Comment 6 Jeremy Lindop CLA 2009-03-09 11:25:29 EDT
I’ve tried this out this morning and it works very well.
  
Having seen the ability to remove driver templates in action, I realise that it would be good if the facility to hide enablement extensions went further. It would be helpful to hide vendors from driver and driver template dialogs if the vendor doesn’t have any driver templates. For example, when you launch the New Connection Profile wizard, the first page lists all the vendors, even if all their driver templates have been removed. If you were to remove the driver templates for all except MySQL, PostgreSQL and SQL Server, this dialog should just show MySQL, PostgreSQL and SQL Server.  I think this makes sense anyway because having removed the driver templates, if you hit Next for a vendor whose templates have been removed, you can’t go any further in defining a driver and connection profile because the vendor has no driver templates. 
  
There are also a couple of other places in the Data Management -> Connectivity -> Driver Definitions preference pages where vendors are listed - the Filter or Vendor-Filter drop down lists in the preference pages. There may also be some other places these crop up that I haven’t noticed. 
Comment 7 Brian Fitzpatrick CLA 2009-03-09 11:40:56 EDT
Setting for M7 and reopening for additional work
Comment 8 Brian Fitzpatrick CLA 2009-04-17 10:37:25 EDT
Jeremy, as much as I'd like to get this into this release, I don't think it's going to happen. Too much going on. We'll have to revisit it for the next major release.