sdedic commented on a change in pull request #2948:
URL: https://github.com/apache/netbeans/pull/2948#discussion_r631838667
##########
File path: java/maven/src/org/netbeans/modules/maven/ActionProviderImpl.java
##########
@@ -156,15 +160,30 @@
public ActionProviderImpl(Project proj) {
this.proj = proj;
}
+
+ protected M2Configuration usedConfiguration(boolean useActive) {
+ if (!useActive) {
+ return null;
+ }
+ ProjectConfigurationProvider<MavenConfiguration> p =
proj.getLookup().lookup(ProjectConfigurationProvider.class);
+ return (M2Configuration)p.getActiveConfiguration();
+ }
@Override
public String[] getSupportedActions() {
Set<String> supp = new HashSet<String>();
- supp.addAll( Arrays.asList( supported));
- for (MavenActionsProvider add :
ActionToGoalUtils.actionProviders(proj)) {
- Set<String> added = add.getSupportedDefaultActions();
- if (added != null) {
- supp.addAll( added);
+ supp.addAll( Arrays.asList(supported));
+
+ MavenConfiguration c = usedConfiguration(false);
Review comment:
Good, but then if `isEnabled` or `invokeAction` is run with an
inappropriate configuration, it should return `false` or do nothing,
respectively, right ?
--
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