You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@netbeans.apache.org by GitBox <gi...@apache.org> on 2021/05/13 14:04:43 UTC

[GitHub] [netbeans] dbalek edited a comment on pull request #2948: Support for Micronaut's automatic restarts (mn:run) for Maven

dbalek edited a comment 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:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists