You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@netbeans.apache.org by "mbien (via GitHub)" <gi...@apache.org> on 2023/04/13 19:24:25 UTC

[GitHub] [netbeans] mbien opened a new pull request, #5823: basic auto completion for maven version properties.

mbien opened a new pull request, #5823:
URL: https://github.com/apache/netbeans/pull/5823

   It is somewhat common to use properties for artifact versions, esp when several artifacts share the same version.
   
   This implements basic auto completion for properties which are used as version field.
   
   In contrast to hints, completion is implemented in the grammar and doesn't have the full context. This will only take properties into account which are in the same pom file as their usage.
   
   
   ![property-version-completion](https://user-images.githubusercontent.com/114367/231861416-8cf9d282-04db-40d4-9867-e3eac4a90fed.png)


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

To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org

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] mbien commented on a diff in pull request #5823: basic auto completion for maven version properties.

Posted by "mbien (via GitHub)" <gi...@apache.org>.
mbien commented on code in PR #5823:
URL: https://github.com/apache/netbeans/pull/5823#discussion_r1165947585


##########
java/maven.grammar/src/org/netbeans/modules/maven/grammar/MavenProjectGrammar.java:
##########
@@ -464,6 +468,70 @@ protected Enumeration<GrammarResult> getDynamicValueCompletion(String path, Hint
                 return Collections.enumeration(elems);
             }
         }
+        // version property completion
+        if (path.startsWith("/project/properties/") && path.indexOf("/", 20) == -1) {

Review Comment:
   this should make it hopefully fairly safe for inclusion. The code path is guarded by the xpath (basically), so it doesn't affect any other completion code.



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

To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org

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] junichi11 commented on a diff in pull request #5823: basic auto completion for maven version properties.

Posted by "junichi11 (via GitHub)" <gi...@apache.org>.
junichi11 commented on code in PR #5823:
URL: https://github.com/apache/netbeans/pull/5823#discussion_r1166160666


##########
java/maven.grammar/src/org/netbeans/modules/maven/grammar/MavenProjectGrammar.java:
##########
@@ -464,6 +468,70 @@ protected Enumeration<GrammarResult> getDynamicValueCompletion(String path, Hint
                 return Collections.enumeration(elems);
             }
         }
+        // version property completion
+        if (path.startsWith("/project/properties/") && path.indexOf("/", 20) == -1) {

Review Comment:
   Nitpick: I would store the string to variable/constant, then would use `length()` or leave a comment for `20`. I would add `// NOI18N` if possible.



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

To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org

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] mbien commented on pull request #5823: basic auto completion for maven version properties.

Posted by "mbien (via GitHub)" <gi...@apache.org>.
mbien commented on PR #5823:
URL: https://github.com/apache/netbeans/pull/5823#issuecomment-1509273299

   thanks for the reviews. added `//NOI18N` everywhere, no other changes.
   
   going to merge once green again


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

To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org

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] mbien merged pull request #5823: basic auto completion for maven version properties.

Posted by "mbien (via GitHub)" <gi...@apache.org>.
mbien merged PR #5823:
URL: https://github.com/apache/netbeans/pull/5823


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

To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org

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