| Summary: | Unable to install Web Fragment Module facet into existing project. | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Product: | [WebTools] WTP Java EE Tools | Reporter: | Alexey Kazakov <alkazako> | ||||||
| Component: | jst.j2ee | Assignee: | Roberto Sanchez Herrera <shr31223> | ||||||
| Status: | RESOLVED FIXED | QA Contact: | Chuck Bridgham <cbridgha> | ||||||
| Severity: | normal | ||||||||
| Priority: | P3 | CC: | cbridgha, evandro.pomatti, shr31223, thatnitind | ||||||
| Version: | unspecified | Flags: | cbridgha:
review+
|
||||||
| Target Milestone: | 3.6.3 | ||||||||
| Hardware: | PC | ||||||||
| OS: | Linux | ||||||||
| Whiteboard: | |||||||||
| Attachments: |
|
||||||||
|
Description
Alexey Kazakov
Created attachment 198986 [details]
Screenshot of Project Facets properties page.
The problem is in WebFragmentFacetInstallDataModelProvider: this class does not provide a default value for the CONFIG_FOLDER property, and the parent class (J2EEModuleFacetInstallDataModelProvider) validates that the CONFIG_FOLDER property is not null nor empty. So, when the data model is validated by the facets property page, the validation returns an error, and therefore the OK button is never enabled. The fix could be either override the validate method in WebFragmentFacetInstallDataModelProvider to always return an OK status for CONFIG_FOLDER, or provide a valid default value for CONFIG in WebFragmentFacetInstallDataModelProvider (could use something similar to the code in UtilityFacetInstallDataModelProvider, to get the first source folder defined by the java facet). Created attachment 249908 [details]
Proposed fix
I0m following the approach of setting the default value to the first src folder found, like in the case of utility facet.
I tested creating new web fragment projects using the wizard, and using the facets property page to add the web fragment facet, and works fine.
Fix looks good - I assume everything is ok is multiple src folders are defined? we don't actually generate any src in this action, so its just to satisfy the validation. Yes, multiple src folders behave correctly. Committed to master for WTP 3.6.3 and 3.7 http://git.eclipse.org/c/jeetools/webtools.javaee.git/commit/?id=68c0e1b5cfcf191245ca8ef5dcbf91b6648beb8d I did not update the version of the feature because it was increased by another bug. *** Bug 430843 has been marked as a duplicate of this bug. *** |