ppisl commented on code in PR #4302:
URL: https://github.com/apache/netbeans/pull/4302#discussion_r918015718
##########
java/java.lsp.server/src/org/netbeans/modules/java/lsp/server/Utils.java:
##########
@@ -99,6 +102,57 @@ public static SymbolKind structureElementKind2SymbolKind
(StructureElement.Kind
return SymbolKind.Object;
}
+ @NonNull
+ public static QuerySupport.Kind searchType2QueryKind(@NonNull final
SearchType searchType) {
+ switch (searchType) {
+ case CAMEL_CASE:
+ return QuerySupport.Kind.CAMEL_CASE;
+ case CASE_INSENSITIVE_CAMEL_CASE:
+ return QuerySupport.Kind.CASE_INSENSITIVE_CAMEL_CASE;
+ case CASE_INSENSITIVE_EXACT_NAME:
+ case EXACT_NAME:
+ return QuerySupport.Kind.EXACT;
+ case CASE_INSENSITIVE_PREFIX:
+ return QuerySupport.Kind.CASE_INSENSITIVE_PREFIX;
+ case CASE_INSENSITIVE_REGEXP:
+ return QuerySupport.Kind.CASE_INSENSITIVE_REGEXP;
+ case PREFIX:
+ return QuerySupport.Kind.PREFIX;
+ case REGEXP:
+ return QuerySupport.Kind.REGEXP;
+ default:
+ throw new
IllegalThreadStateException(String.valueOf(searchType));
+ }
+ }
+
+ public static SymbolKind cslElementKind2SymbolKind(final
org.netbeans.modules.csl.api.ElementKind elementKind) {
+ switch(elementKind) {
+ case ATTRIBUTE: return SymbolKind.Property;
+ case CALL: return SymbolKind.Event;
+ case CLASS: return SymbolKind.Class;
+ case CONSTANT: return SymbolKind.Constant;
+ case CONSTRUCTOR: return SymbolKind.Constructor;
+ case DB: return SymbolKind.File;
+ case ERROR: return SymbolKind.Event;
+ case METHOD: return SymbolKind.Method;
+ case FILE: return SymbolKind.File;
+ case FIELD: return SymbolKind.Field;
+ case MODULE: return SymbolKind.Module;
+ case VARIABLE: return SymbolKind.Variable;
+ case GLOBAL: return SymbolKind.Module;
+ case INTERFACE: return SymbolKind.Interface;
+ case KEYWORD: return SymbolKind.Key;
+ case OTHER: return SymbolKind.Object;
+ case PACKAGE: return SymbolKind.Package;
+ case PARAMETER: return SymbolKind.TypeParameter;
Review Comment:
Yes, it can be better. I will change 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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists