Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 313735 - Types from the schemas in the project are shown twice in the type selection dialog
Summary: Types from the schemas in the project are shown twice in the type selection d...
Status: NEW
Alias: None
Product: WTP Source Editing
Classification: WebTools
Component: wst.xsd (show other bugs)
Version: 3.1   Edit
Hardware: PC Windows Vista
: P3 normal (vote)
Target Milestone: Future   Edit
Assignee: wst.xsd-triaged CLA
QA Contact: Keith Chong CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-05-20 10:25 EDT by Stanislav Nichev CLA
Modified: 2010-09-16 14:35 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Stanislav Nichev CLA 2010-05-20 10:25:43 EDT
Build Identifier: 3.5.2.R35x_v20100119-7Q7bARBPWUHM_CSjz-8bF1f7_n8rLSyWHoiKoyxBQSGT4

In the set element type selection dialog, the XML schema types are shown twice - once from the source folder and once from the project output directory.

Reproducible: Always

Steps to Reproduce:
TC #1:
1. Create new XML schema somewhere in the source folder of a java project
2. Open the created schema in the XML Schema Editor
3. Add new structure type
4. Save the document
5. Add element
6. Right click on the created element -> Set Type -> Browse...
7. Select the "Eclosing Project" radio button from the "Search Scope" section
8. In the types list, you should see the created in step 3 structure type twice

TC #2:
1. Create new XML schema somewhere in the source folder of a java project
2. Open the created schema in the XML Schema Editor
3. Add new structure type
4. Save the document
5. Create new XML schema file and open it in the XML Schema Editor
6. Add element
7. Right click on the created element -> Set Type -> Browse...
8. Select the "Eclosing Project" radio button from the "Search Scope" section
9. In the types list, you should see the created in step 3 structure type twice
Comment 1 Valentin Baciu CLA 2010-07-20 15:33:50 EDT
Yes, the wst.common search infrastructure seems to search even in derived files. Should be relatively easy to fix, perhaps somewhere in org.eclipse.wst.common.core.search.scope.SearchScopeImpl.traverseContainer(IContainer) by checking the result of IResource#isDerived.