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/12 08:55:08 UTC

[GitHub] [netbeans] sdedic opened a new pull request #2948: Support for Micronaut's automatic restarts (mn:run) for Maven

sdedic opened a new pull request #2948:
URL: https://github.com/apache/netbeans/pull/2948


   


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


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

Posted by GitBox <gi...@apache.org>.
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


[GitHub] [netbeans] sdedic commented on a change in pull request #2948: Support for Micronaut's automatic restarts (mn:run) for Maven

Posted by GitBox <gi...@apache.org>.
sdedic commented on a change in pull request #2948:
URL: https://github.com/apache/netbeans/pull/2948#discussion_r631815652



##########
File path: java/maven/src/org/netbeans/modules/maven/configurations/M2Configuration.java
##########
@@ -44,54 +47,73 @@
 import org.netbeans.modules.maven.execute.model.NetbeansActionReader;
 import org.netbeans.modules.maven.execute.model.io.xpp3.NetbeansBuildActionXpp3Writer;
 import org.netbeans.modules.maven.spi.actions.AbstractMavenActionsProvider;
+import org.netbeans.modules.maven.spi.actions.MavenActionsProvider;
 import org.openide.filesystems.FileChangeAdapter;
 import org.openide.filesystems.FileChangeListener;
 import org.openide.filesystems.FileEvent;
 import org.openide.filesystems.FileObject;
 import org.openide.filesystems.FileRenameEvent;
 import org.openide.filesystems.FileUtil;
-import org.openide.util.Exceptions;
 import org.openide.util.NbBundle.Messages;
 
 /**
+ * Represents a configuration, Properties defined by {@link MavenConfiguration} plus list of action descriptions
+ * for that configuration. This class is used to represent:
+ * <ul>
+ * <li>default configurations, provided by Maven project.
+ * <li>profile-based configurations
+ * <li>user-customized configurations, that loads action configs from the project directory.
+ * </ul>
  *
  * @author mkleint
  */
 public class M2Configuration extends AbstractMavenActionsProvider implements MavenConfiguration, Comparable<M2Configuration> {
     private static final Logger LOG = Logger.getLogger(M2Configuration.class.getName());
 
     public static final String DEFAULT = "%%DEFAULT%%"; //NOI18N
+    public static final String FILENAME = "nbactions.xml"; //NOI18N
+    public static final String FILENAME_PREFIX = "nbactions-"; //NOI18N
+    public static final String FILENAME_SUFFIX = ".xml"; //NOI18N
     
     public static M2Configuration createDefault(FileObject projectDirectory) {
         return new M2Configuration(DEFAULT, projectDirectory);
     }
-    
+
+    /**
+     * True, if the M2Configuration comes from a customized project storage.
+     */
+    private boolean customized;
     private @NonNull final String id;
     private List<String> profiles;
-    public static final String FILENAME = "nbactions.xml"; //NOI18N
-    public static final String FILENAME_PREFIX = "nbactions-"; //NOI18N
-    public static final String FILENAME_SUFFIX = ".xml"; //NOI18N
     private final Map<String,String> properties = new HashMap<String,String>();
     private final FileObject projectDirectory;
     
     private final AtomicBoolean resetCache = new AtomicBoolean(false);
     private FileChangeListener listener = null;
+    private String displayName;
     
     public M2Configuration(String id, FileObject projectDirectory) {

Review comment:
       I did that. But `M2Configuration` gets instantiated from [MavenFileOwnerQueryImpl](https://github.com/apache/netbeans/blob/master/java/maven/src/org/netbeans/modules/maven/queries/MavenFileOwnerQueryImpl.java#L385) code that tries quite hard to avoid Project references.




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


[GitHub] [netbeans] JaroslavTulach commented on pull request #2948: Support for Micronaut's automatic restarts (mn:run) for Maven

Posted by GitBox <gi...@apache.org>.
JaroslavTulach commented on pull request #2948:
URL: https://github.com/apache/netbeans/pull/2948#issuecomment-841031018


   > Passing configurations via `Lookup` represents a hidden API 
   
   Passing configuration via `Lookup` is an API. The same way as passing `ActionProgress` and `ExplicitProcessParameters`.
   
   > contract anyway so why not make it official via public API?
   
   `ActionProgress`, `ExplicitProcessParameters` form official and publicly documented API. Passing _configuration_ would be public and official as well.
   
   > what is the problem with the `ConfigurationAware` approach. 
   
   It is a novel approach to problems that have been solved differently in the past. **Consistency** is important: Is it not enough to follow the `ActionProgress` or `ExplicitProcessParameters` approach? What would be missing?
   
   The only example where the _aware approach_ of cloning from a singleton has been used I know is `ContextAwareAction`. However, the essential aspect in there is related to _property change listeners and enablement_. `ActionProvider` doesn't work with such concepts.
   
   Or shall we rather (as a mental experiment) create additional interfaces for `ActionProgressAware` and `ExplicitProcessParametersAware` providers? How would the **composition** of all such interfaces work? I don't have answers to such questions now, but I am scared by the wide range of answers/problems such questions may raise.
   
   Another problem of the _aware approach_ is enormous **complications of API** on the side of the caller. Calling into `ActionProvider` becomes complicated. That's probably caused by mixing API and SPI in the `ActionProvider`to begin with, but the need to _clone a copy from a singleton_ before calling makes it even more apparent.
   
   `invokeAction` with a `Lookup` was enough for passing `ExplicitProcessParameters`. I believe it is going to be enough for passing `ProjectConfiguration` as well. 
   
   PS: Pointing out a use-case which would be significantly in favor _cloning approach_ may of course open my eyes and change my mind.


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


[GitHub] [netbeans] sdedic commented on pull request #2948: Support for Micronaut's automatic restarts (mn:run) for Maven

Posted by GitBox <gi...@apache.org>.
sdedic commented on pull request #2948:
URL: https://github.com/apache/netbeans/pull/2948#issuecomment-840538792


   The extended interface was not modelled after `ContextAwareAction`, although I admit it looks similar. It was a way how to localize potential changes to the place `ActionProvider` instance is obtained  (as opposed to e.g. extending all methods with an additional parameter) - the 'sticky configuration' affects all its methods. Sorry for using the word 'context'. Replace 'context' -> 'configuration' in the predecing discussion.
   


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


[GitHub] [netbeans] sdedic commented on pull request #2948: Support for Micronaut's automatic restarts (mn:run) for Maven

Posted by GitBox <gi...@apache.org>.
sdedic commented on pull request #2948:
URL: https://github.com/apache/netbeans/pull/2948#issuecomment-842090698


   I guess the controversy was cleared; please review so the PR can be merged.


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


[GitHub] [netbeans] sdedic commented on pull request #2948: Support for Micronaut's automatic restarts (mn:run) for Maven

Posted by GitBox <gi...@apache.org>.
sdedic commented on pull request #2948:
URL: https://github.com/apache/netbeans/pull/2948#issuecomment-841148947


   After some discussion ... **agreed on moving the `ProjectConfiguration` to the Lookup**.  I'll cross-document it in ActionProvider APIs as well so it is easier to find. 
   
   For the records (persisting the off-PR conversation):
   - `ExplicitProcessParameters` is a different beast: the `execution` module does not know Projects, and vice versa. `ActionProvider` implementation in the process does not process that in any way, directly. Only code deeply in the execution infrastructure knows about it. So this is a clear case for Lookup.
   - `ActionProgress` is a better example; but unline `ProjectConfiguration`, it affects just `invokeAction`, not e.g. `getSupportedActions()`.
   - With the presented approach we face higher client costs: the client has to do `instanceof`s, ... - since the client actually uses SPI interface in the current design. If there was an API (delegating to the SPI), or even a helper utility method, the cost would be far less.
   - For compatibility (see `ProjectConfigurationProvider` docs), the `ProjectConfiguration` has to be in the Lookup anyway.
   
   So as a wrap-up: 
   - will remove the `ConfigurationAware`
   - [Create ProjectActions API](https://issues.apache.org/jira/browse/NETBEANS-5680)


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


[GitHub] [netbeans] JaroslavTulach commented on a change in pull request #2948: Support for Micronaut's automatic restarts (mn:run) for Maven

Posted by GitBox <gi...@apache.org>.
JaroslavTulach commented on a change in pull request #2948:
URL: https://github.com/apache/netbeans/pull/2948#discussion_r631670131



##########
File path: java/java.lsp.server/src/org/netbeans/modules/java/lsp/server/debugging/launch/NbLaunchDelegate.java
##########
@@ -172,15 +174,37 @@ public void progressHandleCreated(ProgressOperationEvent e) {
                         testProgressHandler != null ? Lookups.fixed(toRun, ioContext, progress, testProgressHandler) : Lookups.fixed(toRun, ioContext, progress),
                         Lookup.getDefault()
                 );
-
+                
+                ProjectConfiguration selectConfiguration = null;
+                Object o = launchArguments.get("launchConfiguration");
+                if (o instanceof String) {
+                    Project p = FileOwnerQuery.getOwner(toRun);
+                    if (p != null) {
+                        ProjectConfigurationProvider<ProjectConfiguration> pcp = p.getLookup().lookup(ProjectConfigurationProvider.class);
+                        if (pcp != null) {
+                            String n = (String)o;
+                            selectConfiguration = pcp.getConfigurations().stream().filter(c -> n.equals(c.getDisplayName())).findAny().orElse(null);
+                        }
+                    }
+                }
+                ProjectConfiguration fSelectConfiguration = selectConfiguration;
+                
                 Lookup lookup;
                 if (singleMethod != null) {
                     lookup = Lookups.fixed(toRun, singleMethod, params, ioContext, progress);
                 } else {
                     lookup = Lookups.fixed(toRun, ioContext, params, progress);
                 }
                 Lookups.executeWith(launchCtx, () -> {
-                    providerAndCommand.first().invokeAction(providerAndCommand.second(), lookup);
+                    ActionProvider ap = providerAndCommand.first();
+                    
+                    if ((fSelectConfiguration != null) && (ap instanceof ActionProvider.ConfigurationAware)) {

Review comment:
       This part of the code would have to be rewritten to
   * include `fSelectConfiguration` in the `lookup`
   * remove the `cap` check and use `ap` directly
   
   should the concept of `ConfigurationAware` be avoided.

##########
File path: java/java.lsp.server/src/org/netbeans/modules/java/lsp/server/protocol/WorkspaceServiceImpl.java
##########
@@ -179,6 +201,37 @@
         }
         throw new UnsupportedOperationException("Command not supported: " + params.getCommand());
     }
+    
+    private CompletableFuture<Object> findProjectConfigurations(FileObject ownedFile, String requestAction) {
+        return server.asyncOpenFileOwner(ownedFile).thenApply(p -> {
+            if (p == null) {
+                return CompletableFuture.completedFuture(Collections.emptyList());
+            }
+            ProjectConfigurationProvider<ProjectConfiguration> provider = p.getLookup().lookup(ProjectConfigurationProvider.class);
+            ActionProvider ap = p.getLookup().lookup(ActionProvider.class);
+            if (provider == null) {
+                return CompletableFuture.completedFuture(Collections.emptyList());
+            }
+            ActionProvider.ConfigurationAware cap = null;
+            if (requestAction != null) {
+                if (!(ap instanceof ActionProvider.ConfigurationAware)) {
+                    return CompletableFuture.completedFuture(Collections.emptyList());
+                }
+                cap = (ActionProvider.ConfigurationAware)ap;
+            }
+            List<String> configDispNames = new ArrayList<>();
+            for (ProjectConfiguration c : provider.getConfigurations()) {
+                if (cap != null) {
+                    ActionProvider specific = cap.forConfiguration(c);
+                    if (specific == null || !Arrays.asList(specific.getSupportedActions()).contains(requestAction)) {
+                        continue;
+                    }
+                }
+                configDispNames.add(c.getDisplayName());

Review comment:
       Selecting only configurations that support `requestAction` wouldn't be necessary, if actions from all configurations  were provided by Maven project.

##########
File path: java/maven/src/org/netbeans/modules/maven/execute/ActionToGoalUtils.java
##########
@@ -171,12 +182,17 @@ String getPackaging() {
             return packaging;
         }
     }
+    
     public static boolean isActionEnable(String action, NbMavenProjectImpl project, Lookup lookup) {
-       
+        return isActionEnable(action, project, null, lookup);
+    }
+    
+    public static boolean isActionEnable(String action, NbMavenProjectImpl project, ProjectConfiguration c, Lookup lookup) {

Review comment:
       The `ProjectConfiguration` would have to be extracted from `Lookup` should the `ConfigurationAware` interface be avoided.

##########
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:
       This code would have to iterate over all configurations and merge the available action IDs together.

##########
File path: java/java.lsp.server/src/org/netbeans/modules/java/lsp/server/protocol/WorkspaceServiceImpl.java
##########
@@ -179,6 +201,37 @@
         }
         throw new UnsupportedOperationException("Command not supported: " + params.getCommand());
     }
+    
+    private CompletableFuture<Object> findProjectConfigurations(FileObject ownedFile, String requestAction) {
+        return server.asyncOpenFileOwner(ownedFile).thenApply(p -> {
+            if (p == null) {
+                return CompletableFuture.completedFuture(Collections.emptyList());
+            }
+            ProjectConfigurationProvider<ProjectConfiguration> provider = p.getLookup().lookup(ProjectConfigurationProvider.class);
+            ActionProvider ap = p.getLookup().lookup(ActionProvider.class);
+            if (provider == null) {
+                return CompletableFuture.completedFuture(Collections.emptyList());
+            }
+            ActionProvider.ConfigurationAware cap = null;
+            if (requestAction != null) {
+                if (!(ap instanceof ActionProvider.ConfigurationAware)) {

Review comment:
       This check disables _on the fly_ switching of configurations in the VS Code UI unless the project is known to do so by implementing the newly introduced `ConfigurationAware` interface.

##########
File path: java/maven/src/org/netbeans/modules/maven/configurations/CustomizedActionsProvider.java
##########
@@ -0,0 +1,104 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.netbeans.modules.maven.configurations;
+
+import java.util.Collections;
+import java.util.Set;
+import org.netbeans.api.project.Project;
+import org.netbeans.modules.maven.api.NbMavenProject;
+import org.netbeans.modules.maven.api.execute.RunConfig;
+import org.netbeans.modules.maven.execute.model.NetbeansActionMapping;
+import org.netbeans.modules.maven.spi.actions.MavenActionsProvider;
+import org.netbeans.spi.project.LookupProvider.Registration.ProjectType;
+import org.netbeans.spi.project.ProjectServiceProvider;
+import org.openide.util.Lookup;
+
+/**
+ * Serves actions from customized configurations only. Ignores all defaulted configurations,
+ * to give a chance to other action providers to step in and provide their definitions.
+ * 
+ * @author sdedic
+ */
+@ProjectServiceProvider(
+        service = MavenActionsProvider.class,
+        projectTypes = @ProjectType(
+                id = NbMavenProject.TYPE, 
+                // attempt to precede most of the providers
+                position = -100000
+        )
+)
+public final class CustomizedActionsProvider implements MavenActionsProvider {

Review comment:
       Here I am starting to get lost. I don't know why the change in the UI(?) is necessary...

##########
File path: java/maven/test/unit/src/org/netbeans/modules/maven/NbMavenProjectImplTest.java
##########
@@ -232,4 +234,41 @@ private void writeMavenConfig(String text) throws IOException, InterruptedExcept
         TestFileUtils.touch(TestFileUtils.writeFile(wd, ".mvn/maven.config", text), null);
     }
 
+    public static interface PS {
+        public String m();
+    }
+
+    // BEGIN:ProjectServiceProvider.pluginSpecific
+    @ProjectServiceProvider(service=PS.class, 
+            projectType=NbMavenProject.TYPE + "/org.ntebeans.modules.maven:test.plugin")

Review comment:
       `ntebeans`?

##########
File path: java/maven/src/org/netbeans/modules/maven/configurations/M2Configuration.java
##########
@@ -44,54 +47,73 @@
 import org.netbeans.modules.maven.execute.model.NetbeansActionReader;
 import org.netbeans.modules.maven.execute.model.io.xpp3.NetbeansBuildActionXpp3Writer;
 import org.netbeans.modules.maven.spi.actions.AbstractMavenActionsProvider;
+import org.netbeans.modules.maven.spi.actions.MavenActionsProvider;
 import org.openide.filesystems.FileChangeAdapter;
 import org.openide.filesystems.FileChangeListener;
 import org.openide.filesystems.FileEvent;
 import org.openide.filesystems.FileObject;
 import org.openide.filesystems.FileRenameEvent;
 import org.openide.filesystems.FileUtil;
-import org.openide.util.Exceptions;
 import org.openide.util.NbBundle.Messages;
 
 /**
+ * Represents a configuration, Properties defined by {@link MavenConfiguration} plus list of action descriptions
+ * for that configuration. This class is used to represent:
+ * <ul>
+ * <li>default configurations, provided by Maven project.
+ * <li>profile-based configurations
+ * <li>user-customized configurations, that loads action configs from the project directory.
+ * </ul>
  *
  * @author mkleint
  */
 public class M2Configuration extends AbstractMavenActionsProvider implements MavenConfiguration, Comparable<M2Configuration> {
     private static final Logger LOG = Logger.getLogger(M2Configuration.class.getName());
 
     public static final String DEFAULT = "%%DEFAULT%%"; //NOI18N
+    public static final String FILENAME = "nbactions.xml"; //NOI18N
+    public static final String FILENAME_PREFIX = "nbactions-"; //NOI18N
+    public static final String FILENAME_SUFFIX = ".xml"; //NOI18N
     
     public static M2Configuration createDefault(FileObject projectDirectory) {
         return new M2Configuration(DEFAULT, projectDirectory);
     }
-    
+
+    /**
+     * True, if the M2Configuration comes from a customized project storage.
+     */
+    private boolean customized;
     private @NonNull final String id;
     private List<String> profiles;
-    public static final String FILENAME = "nbactions.xml"; //NOI18N
-    public static final String FILENAME_PREFIX = "nbactions-"; //NOI18N
-    public static final String FILENAME_SUFFIX = ".xml"; //NOI18N
     private final Map<String,String> properties = new HashMap<String,String>();
     private final FileObject projectDirectory;
     
     private final AtomicBoolean resetCache = new AtomicBoolean(false);
     private FileChangeListener listener = null;
+    private String displayName;
     
     public M2Configuration(String id, FileObject projectDirectory) {

Review comment:
       Pass here an instance of project and store it in `this.project` might be better than...

##########
File path: java/maven/arch.xml
##########
@@ -123,6 +123,14 @@
         </p>
         For the details and examples, see description in <a href="@TOP@/org/netbeans/modules/maven/api/execute/PrerequisitesChecker.html">PrerequisitesChecker javadoc</a>.
     </api>
+    <api group="layer" name="PluginLookup" type="export" category="official">
+     <p>
+       Technology-related services can be registered so they activate in a project that has configured a specific Maven plugin. Such services should
+       be placed in <code>Projects/org-netbeans-modules-maven/&lt;plugin-id>/Lookup</code> folder. Maven core module will plug these providers in
+       as soon as the plugin-id appears in the POM model, and will remote them from project's Lookup when the plugin is no longer part of the project's model.

Review comment:
       Typo _remote them_.

##########
File path: java/maven/src/org/netbeans/modules/maven/configurations/M2Configuration.java
##########
@@ -44,54 +47,73 @@
 import org.netbeans.modules.maven.execute.model.NetbeansActionReader;
 import org.netbeans.modules.maven.execute.model.io.xpp3.NetbeansBuildActionXpp3Writer;
 import org.netbeans.modules.maven.spi.actions.AbstractMavenActionsProvider;
+import org.netbeans.modules.maven.spi.actions.MavenActionsProvider;
 import org.openide.filesystems.FileChangeAdapter;
 import org.openide.filesystems.FileChangeListener;
 import org.openide.filesystems.FileEvent;
 import org.openide.filesystems.FileObject;
 import org.openide.filesystems.FileRenameEvent;
 import org.openide.filesystems.FileUtil;
-import org.openide.util.Exceptions;
 import org.openide.util.NbBundle.Messages;
 
 /**
+ * Represents a configuration, Properties defined by {@link MavenConfiguration} plus list of action descriptions
+ * for that configuration. This class is used to represent:
+ * <ul>
+ * <li>default configurations, provided by Maven project.
+ * <li>profile-based configurations
+ * <li>user-customized configurations, that loads action configs from the project directory.
+ * </ul>
  *
  * @author mkleint
  */
 public class M2Configuration extends AbstractMavenActionsProvider implements MavenConfiguration, Comparable<M2Configuration> {
     private static final Logger LOG = Logger.getLogger(M2Configuration.class.getName());
 
     public static final String DEFAULT = "%%DEFAULT%%"; //NOI18N
+    public static final String FILENAME = "nbactions.xml"; //NOI18N
+    public static final String FILENAME_PREFIX = "nbactions-"; //NOI18N
+    public static final String FILENAME_SUFFIX = ".xml"; //NOI18N
     
     public static M2Configuration createDefault(FileObject projectDirectory) {
         return new M2Configuration(DEFAULT, projectDirectory);
     }
-    
+
+    /**
+     * True, if the M2Configuration comes from a customized project storage.
+     */
+    private boolean customized;
     private @NonNull final String id;
     private List<String> profiles;
-    public static final String FILENAME = "nbactions.xml"; //NOI18N
-    public static final String FILENAME_PREFIX = "nbactions-"; //NOI18N
-    public static final String FILENAME_SUFFIX = ".xml"; //NOI18N
     private final Map<String,String> properties = new HashMap<String,String>();
     private final FileObject projectDirectory;
     
     private final AtomicBoolean resetCache = new AtomicBoolean(false);
     private FileChangeListener listener = null;
+    private String displayName;
     
     public M2Configuration(String id, FileObject projectDirectory) {
         assert id != null;
         this.id = id;
         this.projectDirectory = projectDirectory;
         profiles = Collections.<String>emptyList();
     }
-
+    
+    protected final Project getProject() {
+        return FileOwnerQuery.getOwner(projectDirectory);

Review comment:
       ...computing a project based on the `projectDirectory`.




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


[GitHub] [netbeans] sdedic commented on a change in pull request #2948: Support for Micronaut's automatic restarts (mn:run) for Maven

Posted by GitBox <gi...@apache.org>.
sdedic commented on a change in pull request #2948:
URL: https://github.com/apache/netbeans/pull/2948#discussion_r631815652



##########
File path: java/maven/src/org/netbeans/modules/maven/configurations/M2Configuration.java
##########
@@ -44,54 +47,73 @@
 import org.netbeans.modules.maven.execute.model.NetbeansActionReader;
 import org.netbeans.modules.maven.execute.model.io.xpp3.NetbeansBuildActionXpp3Writer;
 import org.netbeans.modules.maven.spi.actions.AbstractMavenActionsProvider;
+import org.netbeans.modules.maven.spi.actions.MavenActionsProvider;
 import org.openide.filesystems.FileChangeAdapter;
 import org.openide.filesystems.FileChangeListener;
 import org.openide.filesystems.FileEvent;
 import org.openide.filesystems.FileObject;
 import org.openide.filesystems.FileRenameEvent;
 import org.openide.filesystems.FileUtil;
-import org.openide.util.Exceptions;
 import org.openide.util.NbBundle.Messages;
 
 /**
+ * Represents a configuration, Properties defined by {@link MavenConfiguration} plus list of action descriptions
+ * for that configuration. This class is used to represent:
+ * <ul>
+ * <li>default configurations, provided by Maven project.
+ * <li>profile-based configurations
+ * <li>user-customized configurations, that loads action configs from the project directory.
+ * </ul>
  *
  * @author mkleint
  */
 public class M2Configuration extends AbstractMavenActionsProvider implements MavenConfiguration, Comparable<M2Configuration> {
     private static final Logger LOG = Logger.getLogger(M2Configuration.class.getName());
 
     public static final String DEFAULT = "%%DEFAULT%%"; //NOI18N
+    public static final String FILENAME = "nbactions.xml"; //NOI18N
+    public static final String FILENAME_PREFIX = "nbactions-"; //NOI18N
+    public static final String FILENAME_SUFFIX = ".xml"; //NOI18N
     
     public static M2Configuration createDefault(FileObject projectDirectory) {
         return new M2Configuration(DEFAULT, projectDirectory);
     }
-    
+
+    /**
+     * True, if the M2Configuration comes from a customized project storage.
+     */
+    private boolean customized;
     private @NonNull final String id;
     private List<String> profiles;
-    public static final String FILENAME = "nbactions.xml"; //NOI18N
-    public static final String FILENAME_PREFIX = "nbactions-"; //NOI18N
-    public static final String FILENAME_SUFFIX = ".xml"; //NOI18N
     private final Map<String,String> properties = new HashMap<String,String>();
     private final FileObject projectDirectory;
     
     private final AtomicBoolean resetCache = new AtomicBoolean(false);
     private FileChangeListener listener = null;
+    private String displayName;
     
     public M2Configuration(String id, FileObject projectDirectory) {

Review comment:
       I did that. But `M2Configuration` gets instantiated (indirectly) from [MavenFileOwnerQueryImpl](https://github.com/apache/netbeans/blob/master/java/maven/src/org/netbeans/modules/maven/queries/MavenFileOwnerQueryImpl.java#L385) code that tries quite hard to avoid Project references.




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


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

Posted by GitBox <gi...@apache.org>.
sdedic edited a comment on pull request #2948:
URL: https://github.com/apache/netbeans/pull/2948#issuecomment-840538792


   The extended interface was not modelled after `ContextAwareAction`, although I admit it looks similar. It was a way how to localize potential changes to the place `ActionProvider` instance is obtained  (as opposed to e.g. extending all methods with an additional parameter) - the 'bound configuration' affects all its methods. Sorry for using the word 'context'. Replace 'context' -> 'configuration' in the predecing discussion.
   


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


[GitHub] [netbeans] sdedic commented on pull request #2948: Support for Micronaut's automatic restarts (mn:run) for Maven

Posted by GitBox <gi...@apache.org>.
sdedic commented on pull request #2948:
URL: https://github.com/apache/netbeans/pull/2948#issuecomment-840376942


   Asking for an initial review. Outline of the changes:
   - adapted @JaroslavTulach prototype of a declarative action provider for Maven. Actions can be contributed using module's layer registrations; examples provided in docs.
   - synced Maven's extensibilty with Gradle: a module may inject service into project's Lookup when a certain plugin is configured for the project. This is present in Gradle and is IMHO beneficial for Maven too.
   - improved interaction of default GUI and the declarative `MavenActionProviders`; supplied actions can be customized.
   - Branding API for Maven to mask out POM-profile implied configurations; just real configurations (user or module-provided) will be visible in Configuration chooser
   - Exported Configurations over LSP. Launch config may specify the desired configuration (unspecificed = the active one).
   
   A somewhat controversial change is the introduction of `ActionProvider.ConfigurationAware` interface. For the purpose of this PR, the `getSupportedActions` method does not get enough context: an action may be defined for a specific configuration only (in Maven). An option would be to disallow defining new action IDs local to a configuration; or merge all IDs form all configurations.
   
   Discussed offline with @dbalek whether it is preferrable to pass the selected `ProjectConfiguration` in the context Lookup (see docs for ProjectConfigurationProvider); the result was that given both concepts are exposed in the Project API, wormholing through Lookup seems awkward - so I introduced `ConfigurationAware` to create a configuration-bound `ActionProvider` instance.
   
   I developed the implementation, but I need to get review on this `ConfigurationAware` concept now. If approved, I neeed to provide `ProjectUtils` methods for API clients, so they need not interact with ProjectConfigurationProvider SPI that much + provide compatibility bridge. If disapproved, I need to change Maven implementation to merge IDs from known configuration to supported IDs.


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


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

Posted by GitBox <gi...@apache.org>.
sdedic edited a comment on pull request #2948:
URL: https://github.com/apache/netbeans/pull/2948#issuecomment-841148947


   After some discussion ... **agreed on moving the `ProjectConfiguration` to the Lookup**.  I'll cross-document it in ActionProvider APIs as well so it is easier to find. 
   
   For the records (persisting the off-PR conversation):
   - `ExplicitProcessParameters` is a different beast: the `execution` module does not know Projects, and vice versa. `ActionProvider` implementation in the process does not process that in any way, directly. Only code deeply in the execution infrastructure knows about it. So this is a clear case for Lookup.
   - `ActionProgress` is a better example; but unlike active `ProjectConfiguration`, it affects just `invokeAction`, not e.g. `getSupportedActions()`.
   - With the presented approach we face higher client costs: the client has to do `instanceof`s, ... - since the client actually uses SPI interface in the current design. If there was an API (delegating to the SPI), or even a helper utility method, the cost would be far less.
   - For compatibility (see `ProjectConfigurationProvider` docs), the `ProjectConfiguration` has to be in the Lookup anyway.
   
   So as a wrap-up: 
   - will remove the `ConfigurationAware`
   - [Create ProjectActions API](https://issues.apache.org/jira/browse/NETBEANS-5680)


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


[GitHub] [netbeans] sdedic commented on a change in pull request #2948: Support for Micronaut's automatic restarts (mn:run) for Maven

Posted by GitBox <gi...@apache.org>.
sdedic commented on a change in pull request #2948:
URL: https://github.com/apache/netbeans/pull/2948#discussion_r631837483



##########
File path: java/maven/src/org/netbeans/modules/maven/configurations/CustomizedActionsProvider.java
##########
@@ -0,0 +1,104 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.netbeans.modules.maven.configurations;
+
+import java.util.Collections;
+import java.util.Set;
+import org.netbeans.api.project.Project;
+import org.netbeans.modules.maven.api.NbMavenProject;
+import org.netbeans.modules.maven.api.execute.RunConfig;
+import org.netbeans.modules.maven.execute.model.NetbeansActionMapping;
+import org.netbeans.modules.maven.spi.actions.MavenActionsProvider;
+import org.netbeans.spi.project.LookupProvider.Registration.ProjectType;
+import org.netbeans.spi.project.ProjectServiceProvider;
+import org.openide.util.Lookup;
+
+/**
+ * Serves actions from customized configurations only. Ignores all defaulted configurations,
+ * to give a chance to other action providers to step in and provide their definitions.
+ * 
+ * @author sdedic
+ */
+@ProjectServiceProvider(
+        service = MavenActionsProvider.class,
+        projectTypes = @ProjectType(
+                id = NbMavenProject.TYPE, 
+                // attempt to precede most of the providers
+                position = -100000
+        )
+)
+public final class CustomizedActionsProvider implements MavenActionsProvider {

Review comment:
       Nice catch - another debris. During implementation, I've battled with the proper override sequence (defaults vs. plugin-provided vs. user-customized). No longer necessary after refactorings already made, it seems. Will remove, thanks.




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


[GitHub] [netbeans] JaroslavTulach commented on pull request #2948: Support for Micronaut's automatic restarts (mn:run) for Maven

Posted by GitBox <gi...@apache.org>.
JaroslavTulach commented on pull request #2948:
URL: https://github.com/apache/netbeans/pull/2948#issuecomment-840534354


   The [ContextAwareAction](https://bits.netbeans.org/12.3/javadoc/org-openide-util-ui/org/openide/util/ContextAwareAction.html) concept was only introduced to properly observe _enablement_ state of such actions. Without cloning the action one cannot get `addPropertyChangeListener`, `removePropertyChangeListener` and `isEnabled()` 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) neither there are notifications of state changes in [ActionProvider](https://bits.netbeans.org/12.3/javadoc/org-netbeans-modules-projectapi/org/netbeans/spi/project/ActionProvider.html). As far as I can tell _context awareness_ is unnecessary.


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


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

Posted by GitBox <gi...@apache.org>.
sdedic edited a comment on pull request #2948:
URL: https://github.com/apache/netbeans/pull/2948#issuecomment-840376942


   Asking for an initial review. Outline of the changes:
   - adapted @JaroslavTulach prototype of a declarative action provider for Maven. Actions can be contributed using module's layer registrations; examples provided in docs.
   - synced Maven's extensibilty with Gradle: a module may inject service into project's Lookup when a certain plugin is configured for the project. This is present in Gradle and is IMHO beneficial for Maven too.
   - improved interaction of default GUI and the declarative `MavenActionProviders`; supplied actions can be customized.
   - Branding API for Maven to mask out POM-profile implied configurations; just real configurations (user or module-provided) will be visible in Configuration chooser
   - Exported Configurations over LSP. Launch config may specify the desired configuration (unspecificed = the active one).
   
   ---
   
   **A somewhat controversial change** is the introduction of `ActionProvider.ConfigurationAware` interface. For the purpose of this PR, the `getSupportedActions` method does not get enough context: an action may be defined for a specific configuration only (in Maven). An option would be to disallow defining new action IDs local to a configuration; or merge all IDs form all configurations.
   
   Discussed offline with @dbalek whether it is preferrable to pass the selected `ProjectConfiguration` in the context Lookup (see docs for ProjectConfigurationProvider); the result was that given both concepts are exposed in the Project API, wormholing through Lookup seems awkward - so I introduced `ConfigurationAware` to create a configuration-bound `ActionProvider` instance.
   
   I developed the implementation, but I need to get review on this `ConfigurationAware` concept now. If approved, I neeed to provide `ProjectUtils` methods for API clients, so they need not interact with ProjectConfigurationProvider SPI that much + provide compatibility bridge. If disapproved, I need to change Maven implementation to merge IDs from known configuration to supported IDs.


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


[GitHub] [netbeans] JaroslavTulach commented on a change in pull request #2948: Support for Micronaut's automatic restarts (mn:run) for Maven

Posted by GitBox <gi...@apache.org>.
JaroslavTulach commented on a change in pull request #2948:
URL: https://github.com/apache/netbeans/pull/2948#discussion_r634025457



##########
File path: enterprise/micronaut/src/org/netbeans/modules/micronaut/resources/layer.xml
##########
@@ -30,4 +30,17 @@
             </folder>
         </folder>
     </folder>
+    <folder name="Projects">
+        <folder name="org-netbeans-modules-maven">
+            <folder name="io.micronaut.build:micronaut-maven-plugin">
+                <folder name="Lookup">
+                    <file name="maven-project-actions.instance">
+                        <attr name="instanceOf" stringvalue="org.netbeans.spi.project.LookupProvider"/>
+                        <attr name="instanceCreate" methodvalue="org.netbeans.api.maven.MavenActions.forProjectLayer"/>
+                        <attr name="resource" stringvalue="nbres:/org/netbeans/modules/micronaut/resources/micronaut-actions.xml"/>

Review comment:
       Consider replacing this XML snippet with an annotation in the future.

##########
File path: java/java.lsp.server/src/org/netbeans/modules/java/lsp/server/debugging/launch/NbLaunchDelegate.java
##########
@@ -172,13 +173,35 @@ public void progressHandleCreated(ProgressOperationEvent e) {
                         testProgressHandler != null ? Lookups.fixed(toRun, ioContext, progress, testProgressHandler) : Lookups.fixed(toRun, ioContext, progress),
                         Lookup.getDefault()
                 );
-
+                
+                ProjectConfiguration selectConfiguration = null;
+                Object o = launchArguments.get("launchConfiguration");
+                if (o instanceof String) {
+                    Project p = FileOwnerQuery.getOwner(toRun);
+                    if (p != null) {
+                        ProjectConfigurationProvider<ProjectConfiguration> pcp = p.getLookup().lookup(ProjectConfigurationProvider.class);
+                        if (pcp != null) {
+                            String n = (String)o;
+                            selectConfiguration = pcp.getConfigurations().stream().filter(c -> n.equals(c.getDisplayName())).findAny().orElse(null);

Review comment:
       Fine.

##########
File path: java/api.maven/src/org/netbeans/api/maven/MavenActions.java
##########
@@ -0,0 +1,82 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.netbeans.api.maven;
+
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.util.logging.Level;
+import java.util.logging.Logger;
+import org.netbeans.api.project.Project;
+import org.netbeans.spi.project.LookupProvider;
+import org.openide.filesystems.FileObject;
+import org.openide.filesystems.URLMapper;
+import org.openide.util.Lookup;
+import org.openide.util.lookup.Lookups;
+import org.netbeans.modules.maven.spi.actions.AbstractMavenActionsProvider;
+
+/**
+ * APIs related to actions over the Maven project.
+ * <p>
+ * A API allows to <b>declaratively register actions</b> using project's Lookup. Action descriptions
+ * must be provided in {@code nbactions.xml} format and referenced from the Layer XML using URL (i.e. nbres: protocol).
+ * The {@code nbactions.xml} may contain descriptors of actions and even <b>profiles</b> which will be turned into
+ * {@link ProjectConfiguration}s. Actions in profiles may override the default action mappings, or supply completely new
+ * actions.
+ * <p/>
+ * <div class="nonnormative">
+ * This example shows how to declare actions in a modules' layer, and register actions when <code>org.netbeans.modules.maven:test.plugin</code>
+ * plugin is used by the maven project:
+ * {@codesnippet LayerActionsRegistration}

Review comment:
       Amazing usage of `@codesnippet`!

##########
File path: ide/projectapi/src/org/netbeans/spi/project/ActionProvider.java
##########
@@ -30,6 +30,9 @@
  * lookup does not enable the action for a given command on the selected file then
  * the first implementation found in default lookup that is enabled will be used.
  * </p>
+ * If the project supports {@link ProjectConfiguration}s, the ActionProvider implementation 
+ * must check {@link ProjectConfiguration} presence in the action's context Lookup whether the caller
+ * requested a specific configuration, and use it to process the requested action, if found.

Review comment:
       +1

##########
File path: java/maven/apichanges.xml
##########
@@ -83,6 +83,20 @@ is the proper place.
     <!-- ACTUAL CHANGES BEGIN HERE: -->
 
     <changes>
+        <change id="plugin-lookup">
+            <api name="general"/>
+            <summary>Plugin-dependent Lookup</summary>
+            <version major="2" minor="148"/>
+            <date day="15" month="5" year="2021"/>
+            <author login="sdedic"/>
+            <compatibility addition="yes" semantic="compatible"/>
+            <description>
+                <p>
+                    Services can be registered not also for a specific <i>maven plugin</i>

Review comment:
       "not also"? Did you want to write "now"? If so, then: _Register services for a specific ..._

##########
File path: java/java.lsp.server/src/org/netbeans/modules/java/lsp/server/debugging/launch/NbLaunchDelegate.java
##########
@@ -172,13 +173,35 @@ public void progressHandleCreated(ProgressOperationEvent e) {
                         testProgressHandler != null ? Lookups.fixed(toRun, ioContext, progress, testProgressHandler) : Lookups.fixed(toRun, ioContext, progress),
                         Lookup.getDefault()
                 );
-
+                
+                ProjectConfiguration selectConfiguration = null;
+                Object o = launchArguments.get("launchConfiguration");
+                if (o instanceof String) {
+                    Project p = FileOwnerQuery.getOwner(toRun);
+                    if (p != null) {
+                        ProjectConfigurationProvider<ProjectConfiguration> pcp = p.getLookup().lookup(ProjectConfigurationProvider.class);
+                        if (pcp != null) {
+                            String n = (String)o;
+                            selectConfiguration = pcp.getConfigurations().stream().filter(c -> n.equals(c.getDisplayName())).findAny().orElse(null);
+                        }
+                    }
+                }
+                List<? super Object> runContext = new ArrayList<>();
+                runContext.add(toRun);
+                runContext.add(params);
+                runContext.add(ioContext);
+                runContext.add(progress);
+                
                 Lookup lookup;
                 if (singleMethod != null) {
-                    lookup = Lookups.fixed(toRun, singleMethod, params, ioContext, progress);
-                } else {
-                    lookup = Lookups.fixed(toRun, ioContext, params, progress);
+                    runContext.add(singleMethod);
+                }
+                if (selectConfiguration != null) {
+                    runContext.add(selectConfiguration);

Review comment:
       Simpler than previous version with cloning, I'd say.




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


[GitHub] [netbeans] sdedic commented on a change in pull request #2948: Support for Micronaut's automatic restarts (mn:run) for Maven

Posted by GitBox <gi...@apache.org>.
sdedic commented on a change in pull request #2948:
URL: https://github.com/apache/netbeans/pull/2948#discussion_r631815652



##########
File path: java/maven/src/org/netbeans/modules/maven/configurations/M2Configuration.java
##########
@@ -44,54 +47,73 @@
 import org.netbeans.modules.maven.execute.model.NetbeansActionReader;
 import org.netbeans.modules.maven.execute.model.io.xpp3.NetbeansBuildActionXpp3Writer;
 import org.netbeans.modules.maven.spi.actions.AbstractMavenActionsProvider;
+import org.netbeans.modules.maven.spi.actions.MavenActionsProvider;
 import org.openide.filesystems.FileChangeAdapter;
 import org.openide.filesystems.FileChangeListener;
 import org.openide.filesystems.FileEvent;
 import org.openide.filesystems.FileObject;
 import org.openide.filesystems.FileRenameEvent;
 import org.openide.filesystems.FileUtil;
-import org.openide.util.Exceptions;
 import org.openide.util.NbBundle.Messages;
 
 /**
+ * Represents a configuration, Properties defined by {@link MavenConfiguration} plus list of action descriptions
+ * for that configuration. This class is used to represent:
+ * <ul>
+ * <li>default configurations, provided by Maven project.
+ * <li>profile-based configurations
+ * <li>user-customized configurations, that loads action configs from the project directory.
+ * </ul>
  *
  * @author mkleint
  */
 public class M2Configuration extends AbstractMavenActionsProvider implements MavenConfiguration, Comparable<M2Configuration> {
     private static final Logger LOG = Logger.getLogger(M2Configuration.class.getName());
 
     public static final String DEFAULT = "%%DEFAULT%%"; //NOI18N
+    public static final String FILENAME = "nbactions.xml"; //NOI18N
+    public static final String FILENAME_PREFIX = "nbactions-"; //NOI18N
+    public static final String FILENAME_SUFFIX = ".xml"; //NOI18N
     
     public static M2Configuration createDefault(FileObject projectDirectory) {
         return new M2Configuration(DEFAULT, projectDirectory);
     }
-    
+
+    /**
+     * True, if the M2Configuration comes from a customized project storage.
+     */
+    private boolean customized;
     private @NonNull final String id;
     private List<String> profiles;
-    public static final String FILENAME = "nbactions.xml"; //NOI18N
-    public static final String FILENAME_PREFIX = "nbactions-"; //NOI18N
-    public static final String FILENAME_SUFFIX = ".xml"; //NOI18N
     private final Map<String,String> properties = new HashMap<String,String>();
     private final FileObject projectDirectory;
     
     private final AtomicBoolean resetCache = new AtomicBoolean(false);
     private FileChangeListener listener = null;
+    private String displayName;
     
     public M2Configuration(String id, FileObject projectDirectory) {

Review comment:
       I did that. But `M2Configuration` gets instantiated (indirectly) from [MavenFileOwnerQueryImpl](https://github.com/apache/netbeans/blob/master/java/maven/src/org/netbeans/modules/maven/queries/MavenFileOwnerQueryImpl.java#L385) code that tries quite hard to avoid Project references.
   
   But looking further, I can scrap the whole `Delegate` - thanks !




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


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

Posted by GitBox <gi...@apache.org>.
sdedic removed a comment on pull request #2948:
URL: https://github.com/apache/netbeans/pull/2948#issuecomment-840376942


   Asking for an initial review. Outline of the changes:
   - adapted @JaroslavTulach prototype of a declarative action provider for Maven. Actions can be contributed using module's layer registrations; examples provided in docs.
   - synced Maven's extensibilty with Gradle: a module may inject service into project's Lookup when a certain plugin is configured for the project. This is present in Gradle and is IMHO beneficial for Maven too.
   - improved interaction of default GUI and the declarative `MavenActionProviders`; supplied actions can be customized.
   - Branding API for Maven to mask out POM-profile implied configurations; just real configurations (user or module-provided) will be visible in Configuration chooser
   - Exported Configurations over LSP. Launch config may specify the desired configuration (unspecificed = the active one).
   
   ---
   
   **A somewhat controversial change** is the introduction of `ActionProvider.ConfigurationAware` interface. For the purpose of this PR, the `getSupportedActions` method does not get enough context: an action may be defined for a specific configuration only (in Maven). An option would be to disallow defining new action IDs local to a configuration; or merge all IDs form all configurations.
   
   Discussed offline with @dbalek whether it is preferrable to pass the selected `ProjectConfiguration` in the context Lookup (see docs for ProjectConfigurationProvider); the result was that given both concepts are exposed in the Project API, wormholing through Lookup seems awkward - so I introduced `ConfigurationAware` to create a configuration-bound `ActionProvider` instance.
   
   I developed the implementation, but I need to get review on this `ConfigurationAware` concept now. If approved, I neeed to provide `ProjectUtils` methods for API clients, so they need not interact with ProjectConfigurationProvider SPI that much + provide compatibility bridge. If disapproved, I need to change Maven implementation to merge IDs from known configuration to supported IDs.


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


[GitHub] [netbeans] sdedic commented on pull request #2948: Support for Micronaut's automatic restarts (mn:run) for Maven

Posted by GitBox <gi...@apache.org>.
sdedic commented 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. active configuration changes - and the original interface does not provide any event source for this change.
   
   Why is the statefulness/observable pattern required when a configuration-bound instance is created ? 
   


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


[GitHub] [netbeans] sdedic commented on pull request #2948: Support for Micronaut's automatic restarts (mn:run) for Maven

Posted by GitBox <gi...@apache.org>.
sdedic commented on pull request #2948:
URL: https://github.com/apache/netbeans/pull/2948#issuecomment-842090698


   I guess the controversy was cleared; please review so the PR can be merged.


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


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

Posted by GitBox <gi...@apache.org>.
dbalek commented on pull request #2948:
URL: https://github.com/apache/netbeans/pull/2948#issuecomment-841092940


   > It is a novel approach to problems that have been solved differently in the past. **Consistency** is important: Is it not enough to follow the `ActionProgress` or `ExplicitProcessParameters` approach? What would be missing?
   > 
   > The only example where the _aware approach_ of cloning from a singleton has been used I know is `ContextAwareAction`. However, the essential aspect in there is related to _property change listeners and enablement_. `ActionProvider` doesn't work with such concepts.
   > 
   > Or shall we rather (as a mental experiment) create additional interfaces for `ActionProgressAware` and `ExplicitProcessParametersAware` providers? How would the **composition** of all such interfaces work? I don't have answers to such questions now, but I am scared by the wide range of answers/problems such questions may raise.
    
   Agree. Thanks for explanation.


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


[GitHub] [netbeans] sdedic commented on a change in pull request #2948: Support for Micronaut's automatic restarts (mn:run) for Maven

Posted by GitBox <gi...@apache.org>.
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:
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


[GitHub] [netbeans] JaroslavTulach commented on a change in pull request #2948: Support for Micronaut's automatic restarts (mn:run) for Maven

Posted by GitBox <gi...@apache.org>.
JaroslavTulach commented on a change in pull request #2948:
URL: https://github.com/apache/netbeans/pull/2948#discussion_r631671752



##########
File path: java/java.lsp.server/src/org/netbeans/modules/java/lsp/server/protocol/WorkspaceServiceImpl.java
##########
@@ -179,6 +201,37 @@
         }
         throw new UnsupportedOperationException("Command not supported: " + params.getCommand());
     }
+    
+    private CompletableFuture<Object> findProjectConfigurations(FileObject ownedFile, String requestAction) {
+        return server.asyncOpenFileOwner(ownedFile).thenApply(p -> {
+            if (p == null) {
+                return CompletableFuture.completedFuture(Collections.emptyList());
+            }
+            ProjectConfigurationProvider<ProjectConfiguration> provider = p.getLookup().lookup(ProjectConfigurationProvider.class);
+            ActionProvider ap = p.getLookup().lookup(ActionProvider.class);
+            if (provider == null) {
+                return CompletableFuture.completedFuture(Collections.emptyList());
+            }
+            ActionProvider.ConfigurationAware cap = null;
+            if (requestAction != null) {
+                if (!(ap instanceof ActionProvider.ConfigurationAware)) {

Review comment:
       This check disables _on the fly_ switching of configurations in the VS Code UI unless the project is known to support that by implementing the newly introduced `ConfigurationAware` interface.




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


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

Posted by GitBox <gi...@apache.org>.
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 for 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:
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


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

Posted by GitBox <gi...@apache.org>.
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:
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


[GitHub] [netbeans] sdedic merged pull request #2948: Support for Micronaut's automatic restarts (mn:run) for Maven

Posted by GitBox <gi...@apache.org>.
sdedic merged pull request #2948:
URL: https://github.com/apache/netbeans/pull/2948


   


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


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

Posted by GitBox <gi...@apache.org>.
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:
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


[GitHub] [netbeans] sdedic commented on a change in pull request #2948: Support for Micronaut's automatic restarts (mn:run) for Maven

Posted by GitBox <gi...@apache.org>.
sdedic commented on a change in pull request #2948:
URL: https://github.com/apache/netbeans/pull/2948#discussion_r635156571



##########
File path: enterprise/micronaut/src/org/netbeans/modules/micronaut/resources/layer.xml
##########
@@ -30,4 +30,17 @@
             </folder>
         </folder>
     </folder>
+    <folder name="Projects">
+        <folder name="org-netbeans-modules-maven">
+            <folder name="io.micronaut.build:micronaut-maven-plugin">
+                <folder name="Lookup">
+                    <file name="maven-project-actions.instance">
+                        <attr name="instanceOf" stringvalue="org.netbeans.spi.project.LookupProvider"/>
+                        <attr name="instanceCreate" methodvalue="org.netbeans.api.maven.MavenActions.forProjectLayer"/>
+                        <attr name="resource" stringvalue="nbres:/org/netbeans/modules/micronaut/resources/micronaut-actions.xml"/>

Review comment:
       Logged as [NETBEANS-5694](https://issues.apache.org/jira/browse/NETBEANS-5694).




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