asbachb commented on code in PR #6096:
URL: https://github.com/apache/netbeans/pull/6096#discussion_r1245782160
##########
enterprise/web.jsf.editor/src/org/netbeans/modules/web/jsf/editor/JsfSupportImpl.java:
##########
@@ -58,6 +61,21 @@ public class JsfSupportImpl implements JsfSupport {
private static final Logger LOG =
Logger.getLogger(JsfSupportImpl.class.getSimpleName());
+ private static final Map<JSFVersion, JsfVersion> JSF_VERSION_MAPPING;
+ static {
+ Map<JSFVersion, JsfVersion> map = new HashMap<>();
+ map.put(JSFVersion.JSF_1_0, JsfVersion.JSF_1_0);
+ map.put(JSFVersion.JSF_1_1, JsfVersion.JSF_1_1);
+ map.put(JSFVersion.JSF_1_2, JsfVersion.JSF_1_2);
+ map.put(JSFVersion.JSF_2_0, JsfVersion.JSF_2_0);
+ map.put(JSFVersion.JSF_2_1, JsfVersion.JSF_2_1);
+ map.put(JSFVersion.JSF_2_2, JsfVersion.JSF_2_2);
+ map.put(JSFVersion.JSF_2_3, JsfVersion.JSF_2_3);
+ map.put(JSFVersion.JSF_3_0, JsfVersion.JSF_3_0);
+ map.put(JSFVersion.JSF_4_0, JsfVersion.JSF_4_0);
+ JSF_VERSION_MAPPING = Collections.unmodifiableMap(map);
Review Comment:
I'm not happy about that mapping as well.
Basically `JSFVersion` is not part of the api module but of implementation
module `web.jsf`. So reusing `JSFVersion` would have meant either to:
* Move it to `web.jsfapi`
or
* Add `web.jsf` as dependency
From my perspective it makes more sense to have it as part of the api, at
least the feature set which is currently implemented. On the other hand I did
not want to merge both classes as it would have created an even huger patchset
than already.
So basically the idea would be to eliminate `JSFVersion` and integrate it to
`JsfVersion` or somewhere else.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists