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/08/22 16:05:14 UTC

[GitHub] [netbeans] dbalek commented on a diff in pull request #4040: LSP: Html4J UI modified work over LSP.

dbalek commented on code in PR #4040:
URL: https://github.com/apache/netbeans/pull/4040#discussion_r951620041


##########
java/java.lsp.server/src/org/netbeans/modules/java/lsp/server/htmlui/Browser.java:
##########
@@ -18,538 +18,167 @@
  */
 package org.netbeans.modules.java.lsp.server.htmlui;
 
+import com.google.gson.Gson;
+import com.google.gson.JsonObject;
 import java.io.Closeable;
-import java.io.File;
-import java.io.FileNotFoundException;
-import java.io.Flushable;
 import java.io.IOException;
-import java.io.InputStream;
 import java.io.InputStreamReader;
-import java.io.OutputStream;
 import java.io.Reader;
-import java.io.Writer;
-import java.net.URI;
-import java.net.URISyntaxException;
 import java.net.URL;
-import java.net.URLConnection;
 import java.net.URLDecoder;
-import java.nio.file.Files;
-import java.util.ArrayList;
+import java.util.Collections;
 import java.util.HashMap;
-import java.util.LinkedList;
 import java.util.List;
 import java.util.Map;
-import java.util.Queue;
 import java.util.Random;
+import java.util.Set;
 import java.util.UUID;
+import java.util.concurrent.CompletableFuture;
 import java.util.concurrent.Executor;
+import java.util.concurrent.Executors;
+import java.util.concurrent.ThreadFactory;
 import java.util.function.Consumer;
-import java.util.function.Supplier;
 import java.util.logging.Level;
 import java.util.logging.Logger;
+import org.eclipse.lsp4j.CodeAction;
+import org.eclipse.lsp4j.CodeActionParams;
 import org.netbeans.html.boot.spi.Fn;
-import org.netbeans.html.boot.spi.Fn.Presenter;
 import org.netbeans.html.presenters.spi.ProtoPresenter;
 import org.netbeans.html.presenters.spi.ProtoPresenterBuilder;
+import org.netbeans.modules.java.lsp.server.protocol.CodeActionsProvider;
+import org.netbeans.modules.java.lsp.server.protocol.HtmlPageParams;
+import org.netbeans.modules.java.lsp.server.protocol.NbCodeLanguageClient;
+import org.netbeans.modules.parsing.api.ResultIterator;
+import org.netbeans.spi.htmlui.HTMLViewerSpi;
+import org.openide.util.Exceptions;
+import org.openide.util.lookup.ServiceProvider;
 
-/** Browser based {@link Presenter}. It starts local server and
- * launches browser that connects to it. Use {@link Browser.Config} to
- * configure the actual browser to be started.
- * <p>
- * To use this presenter specify following dependency:
- * <pre>
- * &lt;dependency&gt;
- *   &lt;groupId&gt;org.netbeans.html.browser&lt;/groupId&gt;
- *   &lt;artifactId&gt;browser&lt;/artifactId&gt;
- *   &lt;version&gt;<a target="blank" href="http://search.maven.org/#search%7Cgav%7C1%7Cg%3A%22com.dukescript.presenters%22%20AND%20a%3A%22browser%22">1.x</a>&lt;/version&gt;
- * &lt;/dependency&gt;
- * </pre>
- */
-public final class Browser implements Fn.Presenter, Fn.KeepAlive, Flushable,
-Executor, Closeable {
-    static final Logger LOG = Logger.getLogger(Browser.class.getName());
-    private final Map<String,Command> SESSIONS = new HashMap<>();
+public class Browser implements Closeable {

Review Comment:
   Renamed to `WebView`.



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