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



##########
File path: 
enterprise/micronaut/src/org/netbeans/modules/micronaut/completion/MicronautDataCompletionProvider.java
##########
@@ -0,0 +1,71 @@
+/*
+ * 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.micronaut.completion;
+
+import javax.swing.text.Document;
+import javax.swing.text.JTextComponent;
+import org.netbeans.api.editor.mimelookup.MimeRegistration;
+import org.netbeans.spi.editor.completion.CompletionProvider;
+import org.netbeans.spi.editor.completion.CompletionResultSet;
+import org.netbeans.spi.editor.completion.CompletionTask;
+import org.netbeans.spi.editor.completion.support.AsyncCompletionQuery;
+import org.netbeans.spi.editor.completion.support.AsyncCompletionTask;
+
+/**
+ *
+ * @author Dusan Balek
+ */
+@MimeRegistration(mimeType = "text/x-java", service = 
CompletionProvider.class, position = 250)
+public final class MicronautDataCompletionProvider implements 
CompletionProvider {

Review comment:
       I find the situation where one has to write both 
`MicronautDataCompletionCollector` as well as `MicronautDataCompletionProvider` 
unsatisfying from an architecture perspective. It is my understanding that 
@jhorvath is currently doing the same for the SQL completion. Writing things 
twice isn't something we shall be doing forever:
   
   - ultimately there should be a way to write just `CompletionCollector` and 
make sure it is used as `CompletionProvider` in the `lsp.api` somehow
   - or as an interim step, please demonstrate implementation of 
`MicronautDataCompletionProvider` that calls into 
`MicronautDataCompletionCollector` and builds all it funtionality via 
`CompletionCollector` data structures.
   
   `MicronautDataCompletionItem` with its inner classes shall more or less 
disappear.




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

Reply via email to