dbalek commented on pull request #2948:
URL: https://github.com/apache/netbeans/pull/2948#issuecomment-840583806


   > The `ConfigurationAware` approach is modeled based on 
[ContextAwareAction](https://bits.netbeans.org/12.3/javadoc/org-openide-util-ui/org/openide/util/ContextAwareAction.html).
 That is a fine concept, especially when one needs to observe _enablement_ 
state of such actions. Without cloning the action one cannot get 
`addPropertyChangeListener` & co. working properly.
   > 
   > 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.
   > 
   > True, one can never be sure the passed in configuration is/isn't used, but 
we can certainly make sure Maven and Gradle projects extract it from the 
`Lookup`. Documentation of the existing methods as well as 
`ProjectConfiguration` interface shall be extended to mention the mutual 
interaction.
   
   I don't quite understand what is the problem with the `ConfigurationAware` 
approach. Passing configurations via Lookup represents a hidden API contract 
anyway so why not make it official via public API?


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