matthiasblaesing commented on code in PR #9249:
URL: https://github.com/apache/netbeans/pull/9249#discussion_r2905511533


##########
rust/rust.grammar/src/org/netbeans/modules/rust/grammar/lsp/UnconfiguredHint.java:
##########
@@ -0,0 +1,99 @@
+/*
+ * 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.rust.grammar.lsp;
+
+import java.beans.PropertyChangeEvent;
+import java.beans.PropertyChangeListener;
+import java.nio.file.Path;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Set;
+import javax.swing.text.Document;
+import javax.swing.text.JTextComponent;
+import org.netbeans.api.editor.EditorRegistry;
+import org.netbeans.api.options.OptionsDisplayer;
+import org.netbeans.modules.editor.NbEditorUtilities;
+import org.netbeans.modules.rust.options.api.RustAnalyzerOptions;
+
+import org.netbeans.spi.editor.hints.ChangeInfo;
+import org.netbeans.spi.editor.hints.ErrorDescription;
+import org.netbeans.spi.editor.hints.ErrorDescriptionFactory;
+import org.netbeans.spi.editor.hints.Fix;
+import org.netbeans.spi.editor.hints.HintsController;
+import org.netbeans.spi.editor.hints.Severity;
+import org.openide.filesystems.FileObject;
+import org.openide.filesystems.FileUtil;
+import org.openide.modules.OnStart;
+
+
+@OnStart
+public class UnconfiguredHint implements Runnable {
+
+    private static final Set<String> RUST_MIME_TYPES = new 
HashSet<>(Arrays.asList("text/x-rust"));
+
+    private JTextComponent selectedComponent;
+
+    @Override
+    public void run() {
+        EditorRegistry.addPropertyChangeListener(new PropertyChangeListener() {
+            @Override
+            public void propertyChange(PropertyChangeEvent evt) {
+                updateFocused();
+            }
+        });
+        updateFocused();

Review Comment:
   Sorry, that came over more negative that it should have sounded.
   
   At this point in time there is one lockup reported and it is unclear whether 
it is related. We have sychronized code and I agree, that it could be a 
problem, but then no connection between that and the observed problem.
   
   For the observed problem the EDT is not not blocked (Mutex#isReadAccess is 
method that calls through into the real implementation and that would need to 
show up). The callstack looks deep, but the LSP code does not seem to do 
problematic things (the document structure is extracted en-block and children 
creation is just creating java object).



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