Community
Participate
Working Groups
Build Identifier: I20110309-1800 When generating entities from tables, sometimes the list of tables can be long, couple hundreds or even more. To select tables faster, it would be nice to have a text field above the Tables list that would filter the tables based on a search pattern. Reproducible: Always Steps to Reproduce: 1. Create a Java project 2. Make it a faceted project (Project->Properties->Project Facets) 3. Add JPA facet and close the dialog 4. Right click on the project, JPA Tools->Generate Entities from Tables... 5. Either create a new connection or select an existing one 6. The list of tables should appear.
Moving JPA specific bugs to new JPA component in bugzilla.
Created attachment 220155 [details] proposed patch Find and cancel icons show up along with the search text field on Mac OS, but not on Windows since SWT.ICON_SEARCH and SWT.ICON_CANCEL are hints. Several bugs have been opened by others to address this issue, e.g. bug 293230. The patch still uses both styles instead of hacking around to make both icons show up for Windows assuming these bugs could be fixed someday. :)
A few comments: 1. I don't think the search field should be case sensitive. 2. Maybe for the message in the search text field use the wording 'type filter text' (not that I necessarily like it that much) since that's what is used elsewhere in Eclipse.
Created attachment 221254 [details] proposed patch This patch - ignored the case of the input for the search field - replaced the default text of the search field with "type filter text" to meet Eclipse convention This patch is based on the following commit: 40909c9 Reworked properties files Tran Le
I have some more functional feedback that needs input from others on the team. 1. Nan currently has the search field set up such that it essentially has an automatic * at the beginning. This could be useful for the case where the user has quoted tables. But for other cases it might be confusing. So if you have table EMPLOYEE and table ADDRESS and you type E in the filter text neither table will be filtered out because both have an E in them. Potentially we should work like the Java type selection dialog search field and support both * and ?. 2. type * as the first character in the search field and an exception is logged. We either just need to support this case, or give an error/warning in the dialog instead of logging an exception. 3. If you use the filter to find one table, select it, and then use the filter to find another table your original selected table gets unselected if it no longer matches the filter. I think we should display all selected tables + those that match the filter.
Created attachment 221422 [details] proposed patch This patch supports - using "*" and "?" wildcards to do table search - showing previous selected tables along with those that match the filter
This patch is based on the following commit: 2f1e42e Deleted unused properties Tran Le
reviewed and committed with: http://git.eclipse.org/c/dali/webtools.dali.git/commit/?id=48e3be26113e3e07ab30435d52ac78f42bab3e67 The one change I made was to copy the internal StringMatcher class into our org.eclipse.jpt.common.utility.internal. Also moved our existing StringMatcher interface into org.eclipse.jpt.common.utility.internal.swing since it was only used by the swing FilteringListPanel.
Verified in build I-3.5.0-20121003040013 that Tables field appears on the Generate Custom Entities dialog and you can search for tables. To view steps to verify this issue go to http://wiki.eclipse.org/Dali_3.3_M2_Release