Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 319387 - Jar file appears as source folder in Servlet wizard
Summary: Jar file appears as source folder in Servlet wizard
Status: RESOLVED FIXED
Alias: None
Product: WTP Java EE Tools
Classification: WebTools
Component: jst.j2ee (show other bugs)
Version: 3.2   Edit
Hardware: PC Windows XP
: P3 normal with 1 vote (vote)
Target Milestone: 3.6.3   Edit
Assignee: Roberto Sanchez Herrera CLA
QA Contact: Chuck Bridgham CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-07-09 09:33 EDT by Alexander Silgidjian CLA
Modified: 2015-01-14 12:17 EST (History)
3 users (show)

See Also:
cbridgha: review+


Attachments
Proposed patch (1.45 KB, patch)
2014-12-29 15:54 EST, Roberto Sanchez Herrera CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Alexander Silgidjian CLA 2010-07-09 09:33:50 EDT
Build Identifier: 20100617-1415

If a JAR file is selected in Project Explorer and I select File -> New -> Servlet menu, the JAR is set by default as source folder for the Servlet. However this is not a valid selection.

The same is valid for EJB case also.

Reproducible: Always

Steps to Reproduce:
1. Create Dynamic Web 2.5 Project
2. Expand the project and select any JAR under JRE System Library container
3. Select File -> New -> Servlet menu

Result: The JAR is set a source folder by default.

The same is valid for EJB case also.
Comment 1 Roberto Sanchez Herrera CLA 2014-12-29 15:54:08 EST
Created attachment 249651 [details]
Proposed patch

In the proposed patch, we check if the selection is binary. If it is, a default src folder is selected instead. 
NewJavaClassWizardPage is used for servlets and EJBs, therefore the change fixes both cases.
Comment 2 Chuck Bridgham CLA 2015-01-14 07:25:45 EST
Thanks for the patch.
Comment 3 Roberto Sanchez Herrera CLA 2015-01-14 12:17:25 EST
Committed to master for WTP 3.6.3 and 3.7. 
I changed a little bit the patch to update the year in the copyright header to be 2015, and increased the version of the plugin (the feature was already updated in another bug)

http://git.eclipse.org/c/jeetools/webtools.javaee.git/commit/?id=4de6ea8d237762cca22b6c96b2482e61c517a75d