Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 356873 - New HTML File wizard ignores multiple web content roots.
Summary: New HTML File wizard ignores multiple web content roots.
Status: RESOLVED FIXED
Alias: None
Product: WTP Source Editing
Classification: WebTools
Component: wst.html (show other bugs)
Version: unspecified   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: 3.3.2   Edit
Assignee: Nitin Dahyabhai CLA
QA Contact: Nick Sandonato CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-09-06 19:42 EDT by Slava Kabanovich CLA
Modified: 2012-01-31 11:12 EST (History)
3 users (show)

See Also:
nsand.dev: review+


Attachments
proposed patch (7.04 KB, patch)
2011-09-06 22:38 EDT, Nitin Dahyabhai CLA
no flags Details | Diff
proposed patch (15.10 KB, patch)
2011-09-06 23:00 EDT, Nitin Dahyabhai CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Slava Kabanovich CLA 2011-09-06 19:42:07 EDT
Build Identifier: I20110613-1736

This happens, because method NewHTMLFileWizardPage.initialPopulateContainerNameField() overrides WizardNewFileCreationPage.initialPopulateContainerNameField() so that if the selected path is not located inside the default web content path then the former is replaced by the latter.
The check should be improved to accept the selected path if it is located inside any of web content root resources.

Reproducible: Always

Steps to Reproduce:
1. Create new Dynamic Web Project.
2. Create folder WebContent2 and modify file /.settings/org.eclipse.wst.common.component
by adding a line <wb-resource deploy-path="/" source-path="/WebContent2"/>
before line <wb-resource deploy-path="/" source-path="/WebContent"/>
3. Select folder WebContent in Package Explorer and invoke New HTML File wizard.
4. Make sure that container is initialized with WebContent2, not with WebContent - that is a bug.
Comment 1 Nitin Dahyabhai CLA 2011-09-06 22:38:00 EDT
Created attachment 202851 [details]
proposed patch
Comment 2 Nitin Dahyabhai CLA 2011-09-06 23:00:31 EDT
Created attachment 202852 [details]
proposed patch
Comment 3 Nick Sandonato CLA 2011-09-07 13:28:22 EDT
Looks good to me.
Comment 4 Nick Sandonato CLA 2011-11-18 14:34:34 EST
Code checked into 3_3_Maintenance and HEAD.