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/03/06 05:58:12 UTC

[GitHub] [netbeans] JaroslavTulach commented on a change in pull request #2795: Priming build action support

JaroslavTulach commented on a change in pull request #2795:
URL: https://github.com/apache/netbeans/pull/2795#discussion_r588838032



##########
File path: ide/projectapi/apichanges.xml
##########
@@ -83,6 +83,21 @@ is the proper place.
     <!-- ACTUAL CHANGES BEGIN HERE: -->
 
     <changes>
+        <change id="project-priming-action">
+            <api name="general"/>
+            <summary>Added <code>ParentProjectProvider</code> and <code>RootProjectProvider</code> to improve project hierarchy discovery</summary>

Review comment:
       Summary isn't correct.

##########
File path: java/maven/src/org/netbeans/modules/maven/InternalActionProvider.java
##########
@@ -0,0 +1,29 @@
+/*
+ * 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;
+
+import org.netbeans.spi.project.ActionProvider;
+
+/**
+ * The same as ActionProvider, but won't be exported outside the module.
+ * @author sdedic
+ */
+public interface InternalActionProvider extends ActionProvider {

Review comment:
       Anyone who queries `Lookup.lookupAll(ActionProvider.class)` may get instances of `InternalActionProvider`. Is that intended? If not, I suggest to use delegation:
   ```java
   public interface InternalActionProvider {
     ActionProvider getProvider();
   }
   ```

##########
File path: ide/projectapi/apichanges.xml
##########
@@ -83,6 +83,21 @@ is the proper place.
     <!-- ACTUAL CHANGES BEGIN HERE: -->
 
     <changes>
+        <change id="project-priming-action">
+            <api name="general"/>
+            <summary>Added <code>ParentProjectProvider</code> and <code>RootProjectProvider</code> to improve project hierarchy discovery</summary>
+            <version major="1" minor="80"/>
+            <date day="5" month="3" year="2021"/>
+            <author login="sdedic"/>
+            <compatibility addition="yes"/>
+            <description>
+                <p>
+                    <code><a href="@TOP@/org/netbeans/spi/project/ActionProvider.html">ActionProvider.COMMAND_PRIMIE</a></code> was introduced, so that

Review comment:
       Typo `PRIMIE`

##########
File path: java/maven/src/org/netbeans/modules/maven/problems/MavenModelProblemsProvider.java
##########
@@ -328,4 +392,58 @@ private String getDescriptionText(Throwable e) {
             return TXT_NoMsg(path);
         }
     }
+    
+    //-------------------------------------------------------------------------
+    // ActionProvider implementation
+    
+    private static final String[] PROBLEM_ACTIONS = { ActionProvider.COMMAND_PRIME };
+
+    @Override
+    public String[] getSupportedActions() {
+        return PROBLEM_ACTIONS;

Review comment:
       Please add a test to verify the action is present, possibly also that it behaves kind of expected.




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