sdedic edited a comment on pull request #2948:
URL: https://github.com/apache/netbeans/pull/2948#issuecomment-840530530


   > However there is no change listener in 
[ActionProvider](https://bits.netbeans.org/12.3/javadoc/org-netbeans-modules-projectapi/org/netbeans/spi/project/ActionProvider.html)
 and there are no notifications of state changes. As such I'd prefer to just 
pass `ProjectConfiguration` in the `Lookup` when `invokeAction` or 
`isActionEnabled` is called.
   
   I don't quite understand why you expect stateful behaviour from just a 
context-bound accessor. The original interface acts on the **active** 
configuration, and it's free to change `enable` status of an action at any 
time: each `isActionEnabled` invocation may produce a different result, if 
i.e.g. active configuration changes, or for whatever other runtime reason - and 
the original interface does not provide any event source to report this change.
   
   Why is the statefulness/observable pattern required when a 
configuration-bound instance is created ? 
   
   Re. using context as a opaque bag: my reason was that a bag is acceptable 
for parameters that the API client knows, the SPI implementor may know (i.e. 
types from some specialized project support or a different service), but the 
project infrastructure does not and has to just pass them through. In this 
case, the configuration *is* a type known to the project infrastructure itself. 
A typed API should be preferrable to just documented content in bag-of-things, 
shouldn't it ?


-- 
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.

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

Reply via email to