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 2022/11/16 20:58:17 UTC

[GitHub] [netbeans] matthiasblaesing opened a new pull request, #4979: Optimize matching for CSS completion queries

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

   There are two different issues:
   
   - The documentation is fetched based on the completion result. This was only build based on the prefix. This change sorts the completion result using the node image where the cursor is currently located and sort by levenshtein distance between this image and the completion proposal. This result in preferring better matching entries.
   
   - The documentation is looked up from the W3C specificiation HTML files. To do this the correct location is located using several regular expressions. To make this more precise a less flexible regexp is used. The other matches are retained and used as fallbacks.
   
   Closes: #4778
   


-- 
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] lbownik commented on a diff in pull request #4979: Optimize matching for CSS completion queries

Posted by GitBox <gi...@apache.org>.
lbownik commented on code in PR #4979:
URL: https://github.com/apache/netbeans/pull/4979#discussion_r1027803808


##########
ide/css.editor/src/org/netbeans/modules/css/editor/csl/CssCompletion.java:
##########
@@ -1682,6 +1689,40 @@ public boolean visit(Node node) {
         } //switch
     }
 
+    @SuppressWarnings("AssignmentToMethodParameter")
+    public final int levenshteinDistance(
+            @NonNull String str1,
+            @NonNull String str2,
+            final boolean caseSensitive) {

Review Comment:
   putting blank line after { would make it more readable



-- 
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] matthiasblaesing commented on a diff in pull request #4979: Optimize matching for CSS completion queries

Posted by GitBox <gi...@apache.org>.
matthiasblaesing commented on code in PR #4979:
URL: https://github.com/apache/netbeans/pull/4979#discussion_r1028314919


##########
ide/css.editor/src/org/netbeans/modules/css/editor/csl/CssCompletion.java:
##########
@@ -1682,6 +1689,40 @@ public boolean visit(Node node) {
         } //switch
     }
 
+    @SuppressWarnings("AssignmentToMethodParameter")
+    public final int levenshteinDistance(
+            @NonNull String str1,
+            @NonNull String str2,
+            final boolean caseSensitive) {

Review Comment:
   This is a verbatim copy, so I'll keep it this way.



-- 
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] lbownik commented on a diff in pull request #4979: Optimize matching for CSS completion queries

Posted by GitBox <gi...@apache.org>.
lbownik commented on code in PR #4979:
URL: https://github.com/apache/netbeans/pull/4979#discussion_r1027802233


##########
ide/css.editor/src/org/netbeans/modules/css/editor/csl/CssCompletion.java:
##########
@@ -109,7 +109,7 @@ public class CssCompletion implements CodeCompletionHandler {
     @Override
     public CodeCompletionResult complete(CodeCompletionContext context) {
 
-        final List<CompletionProposal> completionProposals = new ArrayList<>();
+        List<CompletionProposal> completionProposals = new ArrayList<>();
 
         CssParserResult info = (CssParserResult) context.getParserResult();

Review Comment:
   info variable seems redundant



-- 
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] matthiasblaesing commented on a diff in pull request #4979: Optimize matching for CSS completion queries

Posted by GitBox <gi...@apache.org>.
matthiasblaesing commented on code in PR #4979:
URL: https://github.com/apache/netbeans/pull/4979#discussion_r1028316296


##########
ide/css.editor/src/org/netbeans/modules/css/editor/csl/CssCompletion.java:
##########
@@ -109,7 +109,7 @@ public class CssCompletion implements CodeCompletionHandler {
     @Override
     public CodeCompletionResult complete(CodeCompletionContext context) {
 
-        final List<CompletionProposal> completionProposals = new ArrayList<>();
+        List<CompletionProposal> completionProposals = new ArrayList<>();
 
         CssParserResult info = (CssParserResult) context.getParserResult();

Review Comment:
   a) When debugging it can be helpful to have the variable as local
   b) This was not modified in this PR, so won't be touched as no improvment will be the result.



-- 
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] matthiasblaesing commented on pull request #4979: Optimize matching for CSS completion queries

Posted by GitBox <gi...@apache.org>.
matthiasblaesing commented on PR #4979:
URL: https://github.com/apache/netbeans/pull/4979#issuecomment-1317676837

   Testbuild is available here: https://doppel-helix.eu/NetBeans-dev-dev-3e58e3c60caa70f35929c6d2a98621cbc19623eb-release.zip


-- 
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] lbownik commented on a diff in pull request #4979: Optimize matching for CSS completion queries

Posted by GitBox <gi...@apache.org>.
lbownik commented on code in PR #4979:
URL: https://github.com/apache/netbeans/pull/4979#discussion_r1031360929


##########
ide/css.editor/src/org/netbeans/modules/css/editor/csl/CssCompletion.java:
##########
@@ -109,7 +109,7 @@ public class CssCompletion implements CodeCompletionHandler {
     @Override
     public CodeCompletionResult complete(CodeCompletionContext context) {
 
-        final List<CompletionProposal> completionProposals = new ArrayList<>();
+        List<CompletionProposal> completionProposals = new ArrayList<>();
 
         CssParserResult info = (CssParserResult) context.getParserResult();

Review Comment:
   sure



-- 
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] matthiasblaesing merged pull request #4979: Optimize matching for CSS completion queries

Posted by GitBox <gi...@apache.org>.
matthiasblaesing merged PR #4979:
URL: https://github.com/apache/netbeans/pull/4979


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