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 2018/09/13 08:42:26 UTC

[GitHub] JaroslavTulach closed pull request #629: Language Server Protocol client

JaroslavTulach closed pull request #629: Language Server Protocol client
URL: https://github.com/apache/incubator-netbeans/pull/629
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/ide/c.google.gson/build.xml b/ide/c.google.gson/build.xml
new file mode 100644
index 0000000000..85cd7c9054
--- /dev/null
+++ b/ide/c.google.gson/build.xml
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+    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.
+
+-->
+<project name="ide/c.google.gson" default="build" basedir=".">
+    <import file="../../nbbuild/templates/projectized.xml"/>
+    <target name="jar"/>
+</project>
\ No newline at end of file
diff --git a/ide/c.google.gson/external/binaries-list b/ide/c.google.gson/external/binaries-list
new file mode 100644
index 0000000000..2a9ea93cf0
--- /dev/null
+++ b/ide/c.google.gson/external/binaries-list
@@ -0,0 +1,17 @@
+# 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.
+751F548C85FA49F330CECBB1875893F971B33C4E com.google.code.gson:gson:2.7
diff --git a/ide/c.google.gson/external/gson-2.7-license.txt b/ide/c.google.gson/external/gson-2.7-license.txt
new file mode 100644
index 0000000000..d8c388518b
--- /dev/null
+++ b/ide/c.google.gson/external/gson-2.7-license.txt
@@ -0,0 +1,207 @@
+Name: GSon
+Description: JSon serialization/deserialization library
+Origin: GitHub
+Version: 2.7
+License: Apache-2.0
+
+                                 Apache License
+                           Version 2.0, January 2004
+                        http://www.apache.org/licenses/
+
+   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+   1. Definitions.
+
+      "License" shall mean the terms and conditions for use, reproduction,
+      and distribution as defined by Sections 1 through 9 of this document.
+
+      "Licensor" shall mean the copyright owner or entity authorized by
+      the copyright owner that is granting the License.
+
+      "Legal Entity" shall mean the union of the acting entity and all
+      other entities that control, are controlled by, or are under common
+      control with that entity. For the purposes of this definition,
+      "control" means (i) the power, direct or indirect, to cause the
+      direction or management of such entity, whether by contract or
+      otherwise, or (ii) ownership of fifty percent (50%) or more of the
+      outstanding shares, or (iii) beneficial ownership of such entity.
+
+      "You" (or "Your") shall mean an individual or Legal Entity
+      exercising permissions granted by this License.
+
+      "Source" form shall mean the preferred form for making modifications,
+      including but not limited to software source code, documentation
+      source, and configuration files.
+
+      "Object" form shall mean any form resulting from mechanical
+      transformation or translation of a Source form, including but
+      not limited to compiled object code, generated documentation,
+      and conversions to other media types.
+
+      "Work" shall mean the work of authorship, whether in Source or
+      Object form, made available under the License, as indicated by a
+      copyright notice that is included in or attached to the work
+      (an example is provided in the Appendix below).
+
+      "Derivative Works" shall mean any work, whether in Source or Object
+      form, that is based on (or derived from) the Work and for which the
+      editorial revisions, annotations, elaborations, or other modifications
+      represent, as a whole, an original work of authorship. For the purposes
+      of this License, Derivative Works shall not include works that remain
+      separable from, or merely link (or bind by name) to the interfaces of,
+      the Work and Derivative Works thereof.
+
+      "Contribution" shall mean any work of authorship, including
+      the original version of the Work and any modifications or additions
+      to that Work or Derivative Works thereof, that is intentionally
+      submitted to Licensor for inclusion in the Work by the copyright owner
+      or by an individual or Legal Entity authorized to submit on behalf of
+      the copyright owner. For the purposes of this definition, "submitted"
+      means any form of electronic, verbal, or written communication sent
+      to the Licensor or its representatives, including but not limited to
+      communication on electronic mailing lists, source code control systems,
+      and issue tracking systems that are managed by, or on behalf of, the
+      Licensor for the purpose of discussing and improving the Work, but
+      excluding communication that is conspicuously marked or otherwise
+      designated in writing by the copyright owner as "Not a Contribution."
+
+      "Contributor" shall mean Licensor and any individual or Legal Entity
+      on behalf of whom a Contribution has been received by Licensor and
+      subsequently incorporated within the Work.
+
+   2. Grant of Copyright License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      copyright license to reproduce, prepare Derivative Works of,
+      publicly display, publicly perform, sublicense, and distribute the
+      Work and such Derivative Works in Source or Object form.
+
+   3. Grant of Patent License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      (except as stated in this section) patent license to make, have made,
+      use, offer to sell, sell, import, and otherwise transfer the Work,
+      where such license applies only to those patent claims licensable
+      by such Contributor that are necessarily infringed by their
+      Contribution(s) alone or by combination of their Contribution(s)
+      with the Work to which such Contribution(s) was submitted. If You
+      institute patent litigation against any entity (including a
+      cross-claim or counterclaim in a lawsuit) alleging that the Work
+      or a Contribution incorporated within the Work constitutes direct
+      or contributory patent infringement, then any patent licenses
+      granted to You under this License for that Work shall terminate
+      as of the date such litigation is filed.
+
+   4. Redistribution. You may reproduce and distribute copies of the
+      Work or Derivative Works thereof in any medium, with or without
+      modifications, and in Source or Object form, provided that You
+      meet the following conditions:
+
+      (a) You must give any other recipients of the Work or
+          Derivative Works a copy of this License; and
+
+      (b) You must cause any modified files to carry prominent notices
+          stating that You changed the files; and
+
+      (c) You must retain, in the Source form of any Derivative Works
+          that You distribute, all copyright, patent, trademark, and
+          attribution notices from the Source form of the Work,
+          excluding those notices that do not pertain to any part of
+          the Derivative Works; and
+
+      (d) If the Work includes a "NOTICE" text file as part of its
+          distribution, then any Derivative Works that You distribute must
+          include a readable copy of the attribution notices contained
+          within such NOTICE file, excluding those notices that do not
+          pertain to any part of the Derivative Works, in at least one
+          of the following places: within a NOTICE text file distributed
+          as part of the Derivative Works; within the Source form or
+          documentation, if provided along with the Derivative Works; or,
+          within a display generated by the Derivative Works, if and
+          wherever such third-party notices normally appear. The contents
+          of the NOTICE file are for informational purposes only and
+          do not modify the License. You may add Your own attribution
+          notices within Derivative Works that You distribute, alongside
+          or as an addendum to the NOTICE text from the Work, provided
+          that such additional attribution notices cannot be construed
+          as modifying the License.
+
+      You may add Your own copyright statement to Your modifications and
+      may provide additional or different license terms and conditions
+      for use, reproduction, or distribution of Your modifications, or
+      for any such Derivative Works as a whole, provided Your use,
+      reproduction, and distribution of the Work otherwise complies with
+      the conditions stated in this License.
+
+   5. Submission of Contributions. Unless You explicitly state otherwise,
+      any Contribution intentionally submitted for inclusion in the Work
+      by You to the Licensor shall be under the terms and conditions of
+      this License, without any additional terms or conditions.
+      Notwithstanding the above, nothing herein shall supersede or modify
+      the terms of any separate license agreement you may have executed
+      with Licensor regarding such Contributions.
+
+   6. Trademarks. This License does not grant permission to use the trade
+      names, trademarks, service marks, or product names of the Licensor,
+      except as required for reasonable and customary use in describing the
+      origin of the Work and reproducing the content of the NOTICE file.
+
+   7. Disclaimer of Warranty. Unless required by applicable law or
+      agreed to in writing, Licensor provides the Work (and each
+      Contributor provides its Contributions) on an "AS IS" BASIS,
+      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+      implied, including, without limitation, any warranties or conditions
+      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+      PARTICULAR PURPOSE. You are solely responsible for determining the
+      appropriateness of using or redistributing the Work and assume any
+      risks associated with Your exercise of permissions under this License.
+
+   8. Limitation of Liability. In no event and under no legal theory,
+      whether in tort (including negligence), contract, or otherwise,
+      unless required by applicable law (such as deliberate and grossly
+      negligent acts) or agreed to in writing, shall any Contributor be
+      liable to You for damages, including any direct, indirect, special,
+      incidental, or consequential damages of any character arising as a
+      result of this License or out of the use or inability to use the
+      Work (including but not limited to damages for loss of goodwill,
+      work stoppage, computer failure or malfunction, or any and all
+      other commercial damages or losses), even if such Contributor
+      has been advised of the possibility of such damages.
+
+   9. Accepting Warranty or Additional Liability. While redistributing
+      the Work or Derivative Works thereof, You may choose to offer,
+      and charge a fee for, acceptance of support, warranty, indemnity,
+      or other liability obligations and/or rights consistent with this
+      License. However, in accepting such obligations, You may act only
+      on Your own behalf and on Your sole responsibility, not on behalf
+      of any other Contributor, and only if You agree to indemnify,
+      defend, and hold each Contributor harmless for any liability
+      incurred by, or claims asserted against, such Contributor by reason
+      of your accepting any such warranty or additional liability.
+
+   END OF TERMS AND CONDITIONS
+
+   APPENDIX: How to apply the Apache License to your work.
+
+      To apply the Apache License to your work, attach the following
+      boilerplate notice, with the fields enclosed by brackets "[]"
+      replaced with your own identifying information. (Don't include
+      the brackets!)  The text should be enclosed in the appropriate
+      comment syntax for the file format. We also recommend that a
+      file or class name and description of purpose be included on the
+      same "printed page" as the copyright notice for easier
+      identification within third-party archives.
+
+   Copyright [yyyy] [name of copyright owner]
+
+   Licensed 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.
diff --git a/ide/c.google.gson/manifest.mf b/ide/c.google.gson/manifest.mf
new file mode 100644
index 0000000000..d7be9782ae
--- /dev/null
+++ b/ide/c.google.gson/manifest.mf
@@ -0,0 +1 @@
+OpenIDE-Module: com.google.gson
diff --git a/ide/c.google.gson/nbproject/project.properties b/ide/c.google.gson/nbproject/project.properties
new file mode 100644
index 0000000000..3711b8b233
--- /dev/null
+++ b/ide/c.google.gson/nbproject/project.properties
@@ -0,0 +1,19 @@
+# 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.
+release.external/gson-2.7.jar=modules/com-google-gson.jar
+is.autoload=true
+nbm.module.author=Jan Lahoda
diff --git a/ide/c.google.gson/nbproject/project.xml b/ide/c.google.gson/nbproject/project.xml
new file mode 100644
index 0000000000..6a98f49b13
--- /dev/null
+++ b/ide/c.google.gson/nbproject/project.xml
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+    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.
+
+-->
+<project xmlns="http://www.netbeans.org/ns/project/1">
+   <type>org.netbeans.modules.apisupport.project</type>
+   <configuration>
+       <data xmlns="http://www.netbeans.org/ns/nb-module-project/2">
+           <code-name-base>com.google.gson</code-name-base>
+           <module-dependencies/>
+           <public-packages/>
+           <class-path-extension>
+               <runtime-relative-path>com-google-gson.jar</runtime-relative-path>
+               <binary-origin>external/gson-2.7.jar</binary-origin>
+            </class-path-extension>
+        </data>
+    </configuration>
+</project>
\ No newline at end of file
diff --git a/ide/lsp.client/arch.xml b/ide/lsp.client/arch.xml
new file mode 100644
index 0000000000..5e8e91c72c
--- /dev/null
+++ b/ide/lsp.client/arch.xml
@@ -0,0 +1,1109 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+    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.
+
+-->
+<!DOCTYPE api-answers PUBLIC "-//NetBeans//DTD Arch Answers//EN" "../../nbbuild/antsrc/org/netbeans/nbbuild/Arch.dtd" [
+  <!ENTITY api-questions SYSTEM "../../nbbuild/antsrc/org/netbeans/nbbuild/Arch-api-questions.xml">
+]>
+
+<api-answers
+  question-version="1.29"
+  author="yourname@netbeans.org"
+>
+
+  &api-questions;
+
+
+<!--
+        <question id="arch-overall" when="init">
+            Describe the overall architecture. 
+            <hint>
+            What will be API for 
+            <a href="http://wiki.netbeans.org/API_Design#Separate_API_for_clients_from_support_API">
+                clients and what support API</a>? 
+            What parts will be pluggable?
+            How will plug-ins be registered? Please use <code>&lt;api type="export"/&gt;</code>
+            to describe your general APIs and specify their
+            <a href="http://wiki.netbeans.org/API_Stability#Private">
+            stability categories</a>.
+            If possible please provide simple diagrams.
+            </hint>
+        </question>
+-->
+ <answer id="arch-overall">
+  <p>
+      A client for the Language Server Protocol.
+      Language servers can be registered
+      using org.netbeans.modules.lsp.client.spi.LanguageServerProvider.
+      <api name="org.netbeans.modules.lsp.client.spi.LanguageServerProvide" category="devel" group="java" type="export"/>
+  </p>
+ </answer>
+
+
+
+<!--
+        <question id="arch-quality" when="init">
+            How will the <a href="http://www.netbeans.org/community/guidelines/q-evangelism.html">quality</a>
+            of your code be tested and 
+            how are future regressions going to be prevented?
+            <hint>
+            What kind of testing do
+            you want to use? How much functionality, in which areas,
+            should be covered by the tests? How you find out that your
+            project was successful?
+            </hint>
+        </question>
+-->
+ <answer id="arch-quality">
+  <p>
+      Manual tests.
+  </p>
+ </answer>
+
+
+
+<!--
+        <question id="arch-time" when="init">
+            What are the time estimates of the work?
+            <hint>
+            Please express your estimates of how long the design, implementation,
+            stabilization are likely to last. How many people will be needed to
+            implement this and what is the expected milestone by which the work should be 
+            ready?
+            </hint>
+        </question>
+-->
+ <answer id="arch-time">
+  <p>
+      Unclear.
+  </p>
+ </answer>
+
+
+
+<!--
+        <question id="arch-usecases" when="init">
+            <hint>
+                Content of this answer will be displayed as part of page at
+                http://www.netbeans.org/download/dev/javadoc/usecases.html 
+                You can use tags &lt;usecase name="name&gt; regular html description &lt;/usecase&gt;
+                and if you want to use an URL you can prefix if with @TOP@ to begin
+                at the root of your javadoc
+            </hint>
+        
+            Describe the main <a href="http://wiki.netbeans.org/API_Design#The_Importance_of_Being_Use_Case_Oriented">
+            use cases</a> of the new API. Who will use it under
+            what circumstances? What kind of code would typically need to be written
+            to use the module?
+        </question>
+-->
+ <answer id="arch-usecases">
+  <p>
+      <usecase id="server-plugin" name="Server Plugin">
+          To implement a plugin that binds a language server to NetBeans, implement
+          org.netbeans.modules.lsp.client.spi.LanguageServerProvider and register it
+          to MimeLookup using @MimeRegistration.
+      </usecase>
+  </p>
+ </answer>
+
+
+
+<!--
+        <question id="arch-what" when="init">
+            What is this project good for?
+            <hint>
+            Please provide here a few lines describing the project, 
+            what problem it should solve, provide links to documentation, 
+            specifications, etc.
+            </hint>
+        </question>
+-->
+ <answer id="arch-what">
+  <p>
+   A client for the Language Server Protocol. Servers can either be connected to
+   it manually, or using a plugin.
+  </p>
+ </answer>
+
+
+
+<!--
+        <question id="arch-where" when="impl">
+            Where one can find sources for your module?
+            <hint>
+                Please provide link to the Hg web client at
+                http://hg.netbeans.org/
+                or just use tag defaultanswer generate='here'
+            </hint>
+        </question>
+-->
+ <answer id="arch-where">
+  <defaultanswer generate='here' />
+ </answer>
+
+
+
+<!--
+        <question id="compat-deprecation" when="init">
+            How the introduction of your project influences functionality
+            provided by previous version of the product?
+            <hint>
+            If you are planning to deprecate/remove/change any existing APIs,
+            list them here accompanied with the reason explaining why you
+            are doing so.
+            </hint>
+        </question>
+-->
+ <answer id="compat-deprecation">
+  <p>
+   No.
+  </p>
+ </answer>
+
+
+
+<!--
+        <question id="compat-i18n" when="impl">
+            Is your module correctly internationalized?
+            <hint>
+            Correct internationalization means that it obeys instructions 
+            at <a href="http://www.netbeans.org/download/dev/javadoc/org-openide-modules/org/openide/modules/doc-files/i18n-branding.html">
+            NetBeans I18N pages</a>.
+            </hint>
+        </question>
+-->
+ <answer id="compat-i18n">
+  <p>
+   Yes.
+  </p>
+ </answer>
+
+
+
+<!--
+        <question id="compat-standards" when="init">
+            Does the module implement or define any standards? Is the 
+            implementation exact or does it deviate somehow?
+        </question>
+-->
+ <answer id="compat-standards">
+  <p>
+      Implements the <a href="https://microsoft.github.io/language-server-protocol/specification">Language Server Protocol</a>.
+      The implementation is not complete at this time.
+  </p>
+ </answer>
+
+
+
+<!--
+        <question id="compat-version" when="impl">
+            Can your module coexist with earlier and future
+            versions of itself? Can you correctly read all old settings? Will future
+            versions be able to read your current settings? Can you read
+            or politely ignore settings stored by a future version?
+            
+            <hint>
+            Very helpful for reading settings is to store version number
+            there, so future versions can decide whether how to read/convert
+            the settings and older versions can ignore the new ones.
+            </hint>
+        </question>
+-->
+ <answer id="compat-version">
+  <p>
+   Coexistence is not likely. No settings.
+  </p>
+ </answer>
+
+
+
+<!--
+        <question id="dep-jre" when="final">
+            Which version of JRE do you need (1.2, 1.3, 1.4, etc.)?
+            <hint>
+            It is expected that if your module runs on 1.x that it will run 
+            on 1.x+1 if no, state that please. Also describe here cases where
+            you run different code on different versions of JRE and why.
+            </hint>
+        </question>
+-->
+ <answer id="dep-jre">
+  <p>
+   JRE 8+
+  </p>
+ </answer>
+
+
+
+<!--
+        <question id="dep-jrejdk" when="final">
+            Do you require the JDK or is the JRE enough?
+        </question>
+-->
+ <answer id="dep-jrejdk">
+  <p>
+   JRE
+  </p>
+ </answer>
+
+
+
+<!--
+        <question id="dep-nb" when="init">
+            What other NetBeans projects and modules does this one depend on?
+            <hint>
+            Depending on other NetBeans projects influnces the ability of
+            users of your work to customize their own branded version of
+            NetBeans by enabling and disabling some modules. Too
+            much dependencies restrict this kind of customization. If that
+            is your case, then you may want to split your functionality into
+            pieces of autoload, eager and regular modules which can be
+            enabled independently. Usually the answer to this question
+            is generated from your <code>project.xml</code> file, but
+            if it is not guessed correctly, you can suppress it by
+            specifying &lt;defaultanswer generate="none"/&gt; and
+            write here your own. Please describe such projects as imported APIs using
+            the <code>&lt;api name="identification" type="import or export" category="stable" url="where is the description" /&gt;</code>.
+            By doing this information gets listed in the summary page of your
+            javadoc.
+            </hint>
+        </question>
+-->
+ <answer id="dep-nb">
+  <defaultanswer generate='here' />
+ </answer>
+
+
+
+<!--
+        <question id="dep-non-nb" when="init">
+            What other projects outside NetBeans does this one depend on?
+            
+            <hint>
+            Depending on 3rd party libraries is always problematic,
+            especially if they are not open source, as that complicates
+            the licensing scheme of NetBeans. Please enumerate your
+            external dependencies here, so it is correctly understood since
+            the begining what are the legal implications of your project.
+            Also please note that
+            some non-NetBeans projects are packaged as NetBeans modules
+            (see <a href="http://libs.netbeans.org/">libraries</a>) and
+            it is preferred to use this approach when more modules may
+            depend and share such third-party libraries.
+            </hint>
+        </question>
+-->
+ <answer id="dep-non-nb">
+  <p>
+   The LSP4J library, which itself depends on Guava and GSon.
+  </p>
+ </answer>
+
+
+
+<!--
+        <question id="dep-platform" when="init">
+            On which platforms does your module run? Does it run in the same
+            way on each?
+            <hint>
+            If you plan any dependency on OS or any usage of native code,
+            please describe why you are doing so and describe how you envision
+            to enforce the portability of your code.
+            Please note that there is a support for <a href="http://www.netbeans.org/download/dev/javadoc/org-openide-modules/org/openide/modules/doc-files/api.html#how-os-specific">OS conditionally
+            enabled modules</a> which together with autoload/eager modules
+            can allow you to enable to provide the best OS aware support
+            on certain OSes while providing compatibility bridge on the not
+            supported ones.
+            Also please list the supported
+            OSes/HW platforms and mentioned the lovest version of JDK required
+            for your project to run on. Also state whether JRE is enough or
+            you really need JDK.
+            </hint>
+        </question>
+-->
+ <answer id="dep-platform">
+  <p>
+   Any supported platform.
+  </p>
+ </answer>
+
+
+
+<!--
+        <question id="deploy-dependencies" when="final">
+            What do other modules need to do to declare a dependency on this one,
+            in addition to or instead of the normal module dependency declaration
+            (e.g. tokens to require)?
+            <hint>
+                Provide a sample of the actual lines you would add to a module manifest
+                to declare a dependency, for example OpenIDE-Module-Requires: some.token.
+                If other modules should not depend on this module, or should just use a
+                simple regular module dependency, you can just answer "nothing". If you
+                intentionally expose a semistable API to clients using implementation
+                dependencies, you should mention that here (but there is no need to give
+                an example of usage).
+            </hint>
+        </question>
+-->
+ <answer id="deploy-dependencies">
+  <p>
+   No.
+  </p>
+ </answer>
+
+
+
+<!--
+        <question id="deploy-jar" when="impl">
+            Do you deploy just module JAR file(s) or other files as well?
+            <hint>
+            Usually a module consist of one JAR file (perhaps with Class-Path
+            extensions) and also a configuration file that enables it. If you
+            have any other files, use
+            &lt;api group="java.io.File" name="yourname" type="export" category="friend"&gt;...&lt;/api&gt;
+            to define the location, name and stability of your files (of course
+            changing "yourname" and "friend" to suit your needs).
+            
+            If it uses more than one JAR, describe where they are located, how
+            they refer to each other. 
+            If it consist of module JAR(s) and other files, please describe
+            what is their purpose, why other files are necessary. Please 
+            make sure that installation/uninstallation leaves the system 
+            in state as it was before installation.
+            </hint>
+        </question>
+-->
+ <answer id="deploy-jar">
+  <p>
+   This module encloses the LSP4J library.
+  </p>
+ </answer>
+
+
+
+<!--
+        <question id="deploy-nbm" when="impl">
+            Can you deploy an NBM via the Update Center?
+            <hint>
+            If not why?
+            </hint>
+        </question>
+-->
+ <answer id="deploy-nbm">
+  <p>
+   Yes.
+  </p>
+ </answer>
+
+
+
+<!--
+        <question id="deploy-packages" when="init">
+            Are packages of your module made inaccessible by not declaring them
+            public?
+            
+            <hint>
+            By default NetBeans build harness treats all packages are private.
+            If you export some of them - either as public or friend packages,
+            you should have a reason. If the reason is described elsewhere
+            in this document, you can ignore this question.
+            </hint>
+        </question>
+-->
+ <answer id="deploy-packages">
+  <p>
+   Yes.
+  </p>
+ </answer>
+
+
+
+<!--
+        <question id="deploy-shared" when="final">
+            Do you need to be installed in the shared location only, or in the user directory only,
+            or can your module be installed anywhere?
+            <hint>
+            Installation location shall not matter, if it does explain why.
+            Consider also whether <code>InstalledFileLocator</code> can help.
+            </hint>
+        </question>
+-->
+ <answer id="deploy-shared">
+  <p>
+   Both places.
+  </p>
+ </answer>
+
+
+
+<!--
+        <question id="exec-ant-tasks" when="impl">
+            Do you define or register any ant tasks that other can use?
+            
+            <hint>
+            If you provide an ant task that users can use, you need to be very
+            careful about its syntax and behaviour, as it most likely forms an
+	          API for end users and as there is a lot of end users, their reaction
+            when such API gets broken can be pretty strong.
+            </hint>
+        </question>
+-->
+ <answer id="exec-ant-tasks">
+  <p>
+   No.
+  </p>
+ </answer>
+
+
+
+<!--
+        <question id="exec-classloader" when="impl">
+            Does your code create its own class loader(s)?
+            <hint>
+            A bit unusual. Please explain why and what for.
+            </hint>
+        </question>
+-->
+ <answer id="exec-classloader">
+  <p>
+   No.
+  </p>
+ </answer>
+
+
+
+<!--
+        <question id="exec-component" when="impl">
+            Is execution of your code influenced by any (string) property
+            of any of your components?
+            
+            <hint>
+            Often <code>JComponent.getClientProperty</code>, <code>Action.getValue</code>
+            or <code>PropertyDescriptor.getValue</code>, etc. are used to influence
+            a behavior of some code. This of course forms an interface that should
+            be documented. Also if one depends on some interface that an object
+            implements (<code>component instanceof Runnable</code>) that forms an
+            API as well.
+            </hint>
+        </question>
+-->
+ <answer id="exec-component">
+  <p>
+   No.
+  </p>
+ </answer>
+
+
+
+<!--
+        <question id="exec-introspection" when="impl">
+            Does your module use any kind of runtime type information (<code>instanceof</code>,
+            work with <code>java.lang.Class</code>, etc.)?
+            <hint>
+            Check for cases when you have an object of type A and you also
+            expect it to (possibly) be of type B and do some special action. That
+            should be documented. The same applies on operations in meta-level
+            (Class.isInstance(...), Class.isAssignableFrom(...), etc.).
+            </hint>
+        </question>
+-->
+ <answer id="exec-introspection">
+  <p>
+   No.
+  </p>
+ </answer>
+
+
+
+<!--
+        <question id="exec-privateaccess" when="final">
+            Are you aware of any other parts of the system calling some of 
+            your methods by reflection?
+            <hint>
+            If so, describe the "contract" as an API. Likely private or friend one, but
+            still API and consider rewrite of it.
+            </hint>
+        </question>
+-->
+ <answer id="exec-privateaccess">
+  <p>
+   No.
+  </p>
+ </answer>
+
+
+
+<!--
+        <question id="exec-process" when="impl">
+            Do you execute an external process from your module? How do you ensure
+            that the result is the same on different platforms? Do you parse output?
+            Do you depend on result code?
+            <hint>
+            If you feed an input, parse the output please declare that as an API.
+            </hint>
+        </question>
+-->
+ <answer id="exec-process">
+  <p>
+   Not directly from this module, but clients of this SPI are expected to launch
+   a process as a language server. It is up to them to ensure this works on all
+   platforms.
+  </p>
+ </answer>
+
+
+
+<!--
+        <question id="exec-property" when="impl">
+            Is execution of your code influenced by any environment or
+            Java system (<code>System.getProperty</code>) property?
+            On a similar note, is there something interesting that you
+            pass to <code>java.util.logging.Logger</code>? Or do you observe
+            what others log?
+            <hint>
+            If there is a property that can change the behavior of your 
+            code, somebody will likely use it. You should describe what it does 
+            and the <a href="http://wiki.netbeans.org/API_Stability">stability category</a>
+            of this API. You may use
+            <pre>
+                &lt;api type="export" group="property" name="id" category="private" url="http://..."&gt;
+                    description of the property, where it is used, what it influence, etc.
+                &lt;/api&gt;            
+            </pre>
+            </hint>
+        </question>
+-->
+ <answer id="exec-property">
+  <p>
+   No.
+  </p>
+ </answer>
+
+
+
+<!--
+        <question id="exec-reflection" when="impl">
+            Does your code use Java Reflection to execute other code?
+            <hint>
+            This usually indicates a missing or insufficient API in the other
+            part of the system. If the other side is not aware of your dependency
+            this contract can be easily broken.
+            </hint>
+        </question>
+-->
+ <answer id="exec-reflection">
+  <p>
+   No.
+  </p>
+ </answer>
+
+
+
+<!--
+        <question id="exec-threading" when="init">
+            What threading models, if any, does your module adhere to? How the
+            project behaves with respect to threading?
+            <hint>
+                Is your API threadsafe? Can it be accessed from any threads or
+                just from some dedicated ones? Any special relation to AWT and
+                its Event Dispatch thread? Also
+                if your module calls foreign APIs which have a specific threading model,
+                indicate how you comply with the requirements for multithreaded access
+                (synchronization, mutexes, etc.) applicable to those APIs.
+                If your module defines any APIs, or has complex internal structures
+                that might be used from multiple threads, declare how you protect
+                data against concurrent access, race conditions, deadlocks, etc.,
+                and whether such rules are enforced by runtime warnings, errors, assertions, etc.
+                Examples: a class might be non-thread-safe (like Java Collections); might
+                be fully thread-safe (internal locking); might require access through a mutex
+                (and may or may not automatically acquire that mutex on behalf of a client method);
+                might be able to run only in the event queue; etc.
+                Also describe when any events are fired: synchronously, asynchronously, etc.
+                Ideas: <a href="http://core.netbeans.org/proposals/threading/index.html#recommendations">Threading Recommendations</a> (in progress)
+            </hint>
+        </question>
+-->
+ <answer id="exec-threading">
+  <p>
+   The SPI can be called from any thread, except AWT Event Dispatch Thread.
+  </p>
+ </answer>
+
+
+
+<!--
+        <question id="format-clipboard" when="impl">
+            Which data flavors (if any) does your code read from or insert to
+            the clipboard (by access to clipboard on means calling methods on <code>java.awt.datatransfer.Transferable</code>?
+            
+            <hint>
+            Often Node's deal with clipboard by usage of <code>Node.clipboardCopy, Node.clipboardCut and Node.pasteTypes</code>.
+            Check your code for overriding these methods.
+            </hint>
+        </question>
+-->
+ <answer id="format-clipboard">
+  <p>
+   No.
+  </p>
+ </answer>
+
+
+
+<!--
+        <question id="format-dnd" when="impl">
+            Which protocols (if any) does your code understand during Drag &amp; Drop?
+            <hint>
+            Often Node's deal with clipboard by usage of <code>Node.drag, Node.getDropType</code>. 
+            Check your code for overriding these methods. Btw. if they are not overridden, they
+            by default delegate to <code>Node.clipboardCopy, Node.clipboardCut and Node.pasteTypes</code>.
+            </hint>
+        </question>
+-->
+ <answer id="format-dnd">
+  <p>
+   No.
+  </p>
+ </answer>
+
+
+
+<!--
+        <question id="format-types" when="impl">
+            Which protocols and file formats (if any) does your module read or write on disk,
+            or transmit or receive over the network? Do you generate an ant build script?
+            Can it be edited and modified? 
+            
+            <hint>
+            <p>
+            Files can be read and written by other programs, modules and users. If they influence
+            your behaviour, make sure you either document the format or claim that it is a private
+            api (using the &lt;api&gt; tag). 
+            </p>
+            
+            <p>
+            If you generate an ant build file, this is very likely going to be seen by end users and
+            they will be attempted to edit it. You should be ready for that and provide here a link
+            to documentation that you have for such purposes and also describe how you are going to
+            understand such files during next release, when you (very likely) slightly change the 
+            format.
+            </p>
+            </hint>
+        </question>
+-->
+ <answer id="format-types">
+  <p>
+   The Language Server Protocol.
+  </p>
+ </answer>
+
+
+
+<!--
+        <question id="lookup-lookup" when="init">
+            Does your module use <code>org.openide.util.Lookup</code>
+            or any similar technology to find any components to communicate with? Which ones?
+            
+            <hint>
+            NetBeans is build around a generic registry of services called
+            lookup. It is preferable to use it for registration and discovery
+            if possible. See
+            <a href="http://www.netbeans.org/download/dev/javadoc/org-openide-util/org/openide/util/lookup/doc-files/index.html">
+            The Solution to Comunication Between Components
+            </a>. If you do not plan to use lookup and insist usage
+            of other solution, then please describe why it is not working for
+            you.
+            <br/>
+            When filling the final version of your arch document, please
+            describe the interfaces you are searching for, where 
+            are defined, whether you are searching for just one or more of them,
+            if the order is important, etc. Also classify the stability of such
+            API contract. Use &lt;api group=&amp;lookup&amp; /&gt; tag, so
+            your information gets listed in the summary page of your javadoc.
+            </hint>
+        </question>
+-->
+ <answer id="lookup-lookup">
+  <p>
+   Yes, Lookup and MimeLookup.
+  </p>
+ </answer>
+
+
+
+<!--
+        <question id="lookup-register" when="final">
+            Do you register anything into lookup for other code to find?
+            <hint>
+            Do you register using layer file or using a declarative annotation such as <code>@ServiceProvider</code>?
+            Who is supposed to find your component?
+            </hint>
+        </question>
+-->
+ <answer id="lookup-register">
+  <p>
+   Yes. A NavigatorPanel.DynamicRegistration is registered to the global Lookup.
+  </p>
+ </answer>
+
+
+
+<!--
+        <question id="lookup-remove" when="final">
+            Do you remove entries of other modules from lookup?
+            <hint>
+            Why? Of course, that is possible, but it can be dangerous. Is the module
+            your are masking resource from aware of what you are doing?
+            </hint>
+        </question>
+-->
+ <answer id="lookup-remove">
+  <p>
+   No.
+  </p>
+ </answer>
+
+
+
+<!--
+        <question id="perf-exit" when="final">
+            Does your module run any code on exit?
+        </question>
+-->
+ <answer id="perf-exit">
+  <p>
+   Possibly yes, stopping any remote running servers.
+  </p>
+ </answer>
+
+
+
+<!--
+        <question id="perf-huge_dialogs" when="final">
+            Does your module contain any dialogs or wizards with a large number of
+            GUI controls such as combo boxes, lists, trees, or text areas?
+        </question>
+-->
+ <answer id="perf-huge_dialogs">
+  <p>
+   No.
+  </p>
+ </answer>
+
+
+
+<!--
+        <question id="perf-limit" when="init">
+            Are there any hard-coded or practical limits in the number or size of
+            elements your code can handle?
+            <hint>
+                Most of algorithms have increasing memory and speed complexity
+                with respect to size of data they operate on. What is the critical
+                part of your project that can be seen as a bottleneck with
+                respect to speed or required memory? What are the practical
+                sizes of data you tested your project with? What is your estimate
+                of potential size of data that would cause visible performance
+                problems? Is there some kind of check to detect such situation
+                and prevent "hard" crashes - for example the CloneableEditorSupport
+                checks for size of a file to be opened in editor
+                and if it is larger than 1Mb it shows a dialog giving the
+                user the right to decide - e.g. to cancel or commit suicide.
+            </hint>
+        </question>
+-->
+ <answer id="perf-limit">
+  <p>
+   Not known.
+  </p>
+ </answer>
+
+
+
+<!--
+        <question id="perf-mem" when="final">
+            How much memory does your component consume? Estimate
+            with a relation to the number of windows, etc.
+        </question>
+-->
+ <answer id="perf-mem">
+  <p>
+   Excessive memory consumption is not expected.
+  </p>
+ </answer>
+
+
+
+<!--
+        <question id="perf-menus" when="final">
+            Does your module use dynamically updated context menus, or
+            context-sensitive actions with complicated and slow enablement logic?
+            <hint>
+                If you do a lot of tricks when adding actions to regular or context menus, you can significantly
+                slow down display of the menu, even when the user is not using your action. Pay attention to
+                actions you add to the main menu bar, and to context menus of foreign nodes or components. If
+                the action is conditionally enabled, or changes its display dynamically, you need to check the
+                impact on performance. In some cases it may be more appropriate to make a simple action that is
+                always enabled but does more detailed checks in a dialog if it is actually run.
+            </hint>
+        </question>
+-->
+ <answer id="perf-menus">
+  <p>
+   No.
+  </p>
+ </answer>
+
+
+
+<!--
+        <question id="perf-progress" when="final">
+            Does your module execute any long-running tasks?
+            
+            <hint>Long running tasks should never block 
+            AWT thread as it badly hurts the UI
+            <a href="http://performance.netbeans.org/responsiveness/issues.html">
+            responsiveness</a>.
+            Tasks like connecting over
+            network, computing huge amount of data, compilation
+            be done asynchronously (for example
+            using <code>RequestProcessor</code>), definitively it should 
+            not block AWT thread.
+            </hint>
+        </question>
+-->
+ <answer id="perf-progress">
+  <p>
+   Clients of this module are expected to start a language server that will run
+   for a long time.
+  </p>
+ </answer>
+
+
+
+<!--
+        <question id="perf-scale" when="init">
+            Which external criteria influence the performance of your
+            program (size of file in editor, number of files in menu, 
+            in source directory, etc.) and how well your code scales?
+            <hint>
+            Please include some estimates, there are other more detailed 
+            questions to answer in later phases of implementation. 
+            </hint>
+        </question>
+-->
+ <answer id="perf-scale">
+  <p>
+   The performance of the attached language server and the throughput and latency
+   of the communication channel affect the performance of the language support.
+  </p>
+ </answer>
+
+
+
+<!--
+        <question id="perf-spi" when="init">
+            How the performance of the plugged in code will be enforced?
+            <hint>
+            If you allow foreign code to be plugged into your own module, how
+            do you enforce that it will behave correctly and quickly and will not
+            negatively influence the performance of your own module?
+            </hint>
+        </question>
+-->
+ <answer id="perf-spi">
+  <p>
+   No enforcement.
+  </p>
+ </answer>
+
+
+
+<!--
+        <question id="perf-startup" when="final">
+            Does your module run any code on startup?
+        </question>
+-->
+ <answer id="perf-startup">
+  <p>
+   A listeners that listens on all editors is installed on startup.
+  </p>
+ </answer>
+
+
+
+<!--
+        <question id="perf-wakeup" when="final">
+            Does any piece of your code wake up periodically and do something
+            even when the system is otherwise idle (no user interaction)?
+        </question>
+-->
+ <answer id="perf-wakeup">
+  <p>
+   No.
+  </p>
+ </answer>
+
+
+
+<!--
+        <question id="resources-file" when="final">
+            Does your module use <code>java.io.File</code> directly?
+            
+            <hint>
+            NetBeans provide a logical wrapper over plain files called 
+            <code>org.openide.filesystems.FileObject</code> that
+            provides uniform access to such resources and is the preferred
+            way that should be used. But of course there can be situations when
+            this is not suitable.
+            </hint>
+        </question>
+-->
+ <answer id="resources-file">
+  <p>
+   Yes, to convert a user-provided String to a FileObject.
+  </p>
+ </answer>
+
+
+
+<!--
+        <question id="resources-layer" when="final">
+            Does your module provide own layer? Does it create any files or
+            folders in it? What it is trying to communicate by that and with which 
+            components?
+            
+            <hint>
+            NetBeans allows automatic and declarative installation of resources 
+            by module layers. Module register files into appropriate places
+            and other components use that information to perform their task
+            (build menu, toolbar, window layout, list of templates, set of
+            options, etc.). 
+            </hint>
+        </question>
+-->
+ <answer id="resources-layer">
+  <p>
+   No.
+  </p>
+ </answer>
+
+
+
+<!--
+        <question id="resources-mask" when="final">
+            Does your module mask/hide/override any resources provided by other modules in
+            their layers?
+            
+            <hint>
+            If you mask a file provided by another module, you probably depend
+            on that and do not want the other module to (for example) change
+            the file's name. That module shall thus make that file available as an API
+            of some stability category.
+            </hint>
+        </question>
+-->
+ <answer id="resources-mask">
+  <p>
+   No.
+  </p>
+ </answer>
+
+
+
+<!--
+        <question id="resources-preferences" when="final">
+            Does your module uses preferences via Preferences API? Does your module use NbPreferences or
+            or regular JDK Preferences ? Does it read, write or both ? 
+            Does it share preferences with other modules ? If so, then why ?
+            <hint>
+                You may use
+                    &lt;api type="export" group="preferences"
+                    name="preference node name" category="private"&gt;
+                    description of individual keys, where it is used, what it
+                    influences, whether the module reads/write it, etc.
+                    &lt;/api&gt;
+                Due to XML ID restrictions, rather than /org/netbeans/modules/foo give the "name" as org.netbeans.modules.foo.
+                Note that if you use NbPreferences this name will then be the same as the code name base of the module.
+            </hint>
+        </question>
+-->
+ <answer id="resources-preferences">
+  <p>
+   No.
+  </p>
+ </answer>
+
+
+
+<!--
+        <question id="resources-read" when="final">
+            Does your module read any resources from layers? For what purpose?
+            
+            <hint>
+            As this is some kind of intermodule dependency, it is a kind of API.
+            Please describe it and classify according to 
+            <a href="http://wiki.netbeans.org/API_Design#What_is_an_API.3F">
+            common stability categories</a>.
+            </hint>
+        </question>
+-->
+ <answer id="resources-read">
+  <p>
+   No.
+  </p>
+ </answer>
+
+
+
+<!--
+        <question id="security-grant" when="final">
+            Does your code grant additional rights to some other code?
+            <hint>Avoid using a class loader that adds extra
+            permissions to loaded code unless really necessary.
+            Also note that your API implementation
+            can also expose unneeded permissions to enemy code by
+            calling AccessController.doPrivileged().</hint>
+        </question>
+-->
+ <answer id="security-grant">
+  <p>
+   No.
+  </p>
+ </answer>
+
+
+
+<!--
+        <question id="security-policy" when="final">
+            Does your functionality require modifications to the standard policy file?
+            <hint>Your code might pass control to third-party code not
+            coming from trusted domains. This could be code downloaded over the
+            network or code coming from libraries that are not bundled
+            with NetBeans. Which permissions need to be granted to which domains?</hint>
+        </question>
+-->
+ <answer id="security-policy">
+  <p>
+   No.
+  </p>
+ </answer>
+
+</api-answers>
diff --git a/ide/lsp.client/build.xml b/ide/lsp.client/build.xml
new file mode 100644
index 0000000000..4e726a2fcd
--- /dev/null
+++ b/ide/lsp.client/build.xml
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+    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.
+
+-->
+<project basedir="." default="netbeans" name="ide/lsp.client">
+    <description>Builds, tests, and runs the project org.netbeans.modules.lsp.client</description>
+    <import file="../../nbbuild/templates/projectized.xml"/>
+</project>
diff --git a/ide/lsp.client/external/binaries-list b/ide/lsp.client/external/binaries-list
new file mode 100644
index 0000000000..248d43aea2
--- /dev/null
+++ b/ide/lsp.client/external/binaries-list
@@ -0,0 +1,23 @@
+# 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.
+
+90E34B7C7E0257E3993CA5A939AE94F889D31340 org.eclipse.lsp4j:org.eclipse.lsp4j:0.4.1
+467F27E91FD694C05EB663532F2EDE0404025AFE org.eclipse.lsp4j:org.eclipse.lsp4j.generator:0.4.1
+F3F93F50BBEB7D58B50E6FFCA615CBFC76491846 org.eclipse.lsp4j:org.eclipse.lsp4j.jsonrpc:0.4.1
+56459301B64C92BBBB6E13988B91CDBE1FC6264E org.eclipse.xtend:org.eclipse.xtend.lib:2.14.0
+F2FCA7A70C8A29374E79487417CEFB5F51A84867 org.eclipse.xtend:org.eclipse.xtend.lib.macro:2.14.0
+C40FFE7E5E6244DD094AE95009AA45072C629254 org.eclipse.xtext:org.eclipse.xtext.xbase.lib:2.14.0
diff --git a/ide/lsp.client/external/lsp4j-0.4.1-license.txt b/ide/lsp.client/external/lsp4j-0.4.1-license.txt
new file mode 100644
index 0000000000..8129cb7f4e
--- /dev/null
+++ b/ide/lsp.client/external/lsp4j-0.4.1-license.txt
@@ -0,0 +1,73 @@
+Name: Eclipse Language Server Protocol Library
+Origin: Eclipse
+Version: 0.4.1
+License: EPL-v10
+URL: http://www.eclipse.org/
+Description: Eclipse Language Server Protocol Library
+Files: org.eclipse.lsp4j-0.4.1.jar org.eclipse.lsp4j.generator-0.4.1.jar org.eclipse.lsp4j.jsonrpc-0.4.1.jar
+
+Eclipse Public License - v 1.0
+
+THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
+
+1. DEFINITIONS
+
+"Contribution" means:
+
+a) in the case of the initial Contributor, the initial code and documentation distributed under this Agreement, and
+b) in the case of each subsequent Contributor:
+
+i) changes to the Program, and
+ii) additions to the Program;
+
+where such changes and/or additions to the Program originate from and are distributed by that particular Contributor. A Contribution 'originates' from a Contributor if it was added to the Program by such Contributor itself or anyone acting on such Contributor's behalf. Contributions do not include additions to the Program which: (i) are separate modules of software distributed in conjunction with the Program under their own license agreement, and (ii) are not derivative works of the Program.
+"Contributor" means any person or entity that distributes the Program.
+"Licensed Patents" mean patent claims licensable by a Contributor which are necessarily infringed by the use or sale of its Contribution alone or when combined with the Program.
+"Program" means the Contributions distributed in accordance with this Agreement.
+"Recipient" means anyone who receives the Program under this Agreement, including all Contributors.
+
+2. GRANT OF RIGHTS
+
+a) Subject to the terms of this Agreement, each Contributor hereby grants Recipient a non-exclusive, worldwide, royalty-free copyright license to reproduce, prepare derivative works of, publicly display, publicly perform, distribute and sublicense the Contribution of such Contributor, if any, and such derivative works, in source code and object code form.
+b) Subject to the terms of this Agreement, each Contributor hereby grants Recipient a non-exclusive, worldwide, royalty-free patent license under Licensed Patents to make, use, sell, offer to sell, import and otherwise transfer the Contribution of such Contributor, if any, in source code and object code form. This patent license shall apply to the combination of the Contribution and the Program if, at the time the Contribution is added by the Contributor, such addition of the Contribution causes such combination to be covered by the Licensed Patents. The patent license shall not apply to any other combinations which include the Contribution. No hardware per se is licensed hereunder.
+c) Recipient understands that although each Contributor grants the licenses to its Contributions set forth herein, no assurances are provided by any Contributor that the Program does not infringe the patent or other intellectual property rights of any other entity. Each Contributor disclaims any liability to Recipient for claims brought by any other entity based on infringement of intellectual property rights or otherwise. As a condition to exercising the rights and licenses granted hereunder, each Recipient hereby assumes sole responsibility to secure any other intellectual property rights needed, if any. For example, if a third party patent license is required to allow Recipient to distribute the Program, it is Recipient's responsibility to acquire that license before distributing the Program.
+d) Each Contributor represents that to its knowledge it has sufficient copyright rights in its Contribution, if any, to grant the copyright license set forth in this Agreement.
+
+3. REQUIREMENTS
+
+A Contributor may choose to distribute the Program in object code form under its own license agreement, provided that:
+a) it complies with the terms and conditions of this Agreement; and
+b) its license agreement:
+i) effectively disclaims on behalf of all Contributors all warranties and conditions, express and implied, including warranties or conditions of title and non-infringement, and implied warranties or conditions of merchantability and fitness for a particular purpose;
+ii) effectively excludes on behalf of all Contributors all liability for damages, including direct, indirect, special, incidental and consequential damages, such as lost profits;
+iii) states that any provisions which differ from this Agreement are offered by that Contributor alone and not by any other party; and
+iv) states that source code for the Program is available from such Contributor, and informs licensees how to obtain it in a reasonable manner on or through a medium customarily used for software exchange.
+
+When the Program is made available in source code form:
+a) it must be made available under this Agreement; and
+b) a copy of this Agreement must be included with each copy of the Program.
+
+Contributors may not remove or alter any copyright notices contained within the Program.
+Each Contributor must identify itself as the originator of its Contribution, if any, in a manner that reasonably allows subsequent Recipients to identify the originator of the Contribution.
+
+4. COMMERCIAL DISTRIBUTION
+
+Commercial distributors of software may accept certain responsibilities with respect to end users, business partners and the like. While this license is intended to facilitate the commercial use of the Program, the Contributor who includes the Program in a commercial product offering should do so in a manner which does not create potential liability for other Contributors. Therefore, if a Contributor includes the Program in a commercial product offering, such Contributor ("Commercial Contributor") hereby agrees to defend and indemnify every other Contributor ("Indemnified Contributor") against any losses, damages and costs (collectively "Losses") arising from claims, lawsuits and other legal actions brought by a third party against the Indemnified Contributor to the extent caused by the acts or omissions of such Commercial Contributor in connection with its distribution of the Program in a commercial product offering. The obligations in this section do not apply to any claims or Losses relating to any actual or alleged intellectual property infringement. In order to qualify, an Indemnified Contributor must: a) promptly notify the Commercial Contributor in writing of such claim, and b) allow the Commercial Contributor to control, and cooperate with the Commercial Contributor in, the defense and any related settlement negotiations. The Indemnified Contributor may participate in any such claim at its own expense.
+
+For example, a Contributor might include the Program in a commercial product offering, Product X. That Contributor is then a Commercial Contributor. If that Commercial Contributor then makes performance claims, or offers warranties related to Product X, those performance claims and warranties are such Commercial Contributor's responsibility alone. Under this section, the Commercial Contributor would have to defend claims against the other Contributors related to those performance claims and warranties, and if a court requires any other Contributor to pay any damages as a result, the Commercial Contributor must pay those damages.
+
+5. NO WARRANTY
+
+EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE PROGRAM IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING, WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Each Recipient is solely responsible for determining the appropriateness of using and distributing the Program and assumes all risks associated with its exercise of rights under this Agreement , including but not limited to the risks and costs of program errors, compliance with applicable laws, damage to or loss of data, programs or equipment, and unavailability or interruption of operations.
+
+6. DISCLAIMER OF LIABILITY
+
+EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, NEITHER RECIPIENT NOR ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OR DISTRIBUTION OF THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+
+7. GENERAL
+
+If any provision of this Agreement is invalid or unenforceable under applicable law, it shall not affect the validity or enforceability of the remainder of the terms of this Agreement, and without further action by the parties hereto, such provision shall be reformed to the minimum extent necessary to make such provision valid and enforceable.
+If Recipient institutes patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Program itself (excluding combinations of the Program with other software or hardware) infringes such Recipient's patent(s), then such Recipient's rights granted under Section 2(b) shall terminate as of the date such litigation is filed.
+All Recipient's rights under this Agreement shall terminate if it fails to comply with any of the material terms or conditions of this Agreement and does not cure such failure in a reasonable period of time after becoming aware of such noncompliance. If all Recipient's rights under this Agreement terminate, Recipient agrees to cease use and distribution of the Program as soon as reasonably practicable. However, Recipient's obligations under this Agreement and any licenses granted by Recipient relating to the Program shall continue and survive.
+Everyone is permitted to copy and distribute copies of this Agreement, but in order to avoid inconsistency the Agreement is copyrighted and may only be modified in the following manner. The Agreement Steward reserves the right to publish new versions (including revisions) of this Agreement from time to time. No one other than the Agreement Steward has the right to modify this Agreement. The Eclipse Foundation is the initial Agreement Steward. The Eclipse Foundation may assign the responsibility to serve as the Agreement Steward to a suitable separate entity. Each new version of the Agreement will be given a distinguishing version number. The Program (including Contributions) may always be distributed subject to the version of the Agreement under which it was received. In addition, after a new version of the Agreement is published, Contributor may elect to distribute the Program (including its Contributions) under the new version. Except as expressly stated in Sections 2(a) and 2(b) above, Recipient receives no rights or licenses to the intellectual property of any Contributor under this Agreement, whether expressly, by implication, estoppel or otherwise. All rights in the Program not expressly granted under this Agreement are reserved.
+This Agreement is governed by the laws of the State of New York and the intellectual property laws of the United States of America. No party to this Agreement will bring a legal action under this Agreement more than one year after the cause of action arose. Each party waives its rights to a jury trial in any resulting litigation.
diff --git a/ide/lsp.client/external/xtend-2.14.0-license.txt b/ide/lsp.client/external/xtend-2.14.0-license.txt
new file mode 100644
index 0000000000..2158078298
--- /dev/null
+++ b/ide/lsp.client/external/xtend-2.14.0-license.txt
@@ -0,0 +1,73 @@
+Name: Eclipse Xtend library
+Origin: Eclipse
+Version: 2.14.0
+License: EPL-v10
+URL: http://www.eclipse.org/
+Description: Eclipse Xtend library
+Files: org.eclipse.xtend.lib-2.14.0.jar org.eclipse.xtend.lib.macro-2.14.0.jar org.eclipse.xtext.xbase.lib-2.14.0.jar
+
+Eclipse Public License - v 1.0
+
+THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
+
+1. DEFINITIONS
+
+"Contribution" means:
+
+a) in the case of the initial Contributor, the initial code and documentation distributed under this Agreement, and
+b) in the case of each subsequent Contributor:
+
+i) changes to the Program, and
+ii) additions to the Program;
+
+where such changes and/or additions to the Program originate from and are distributed by that particular Contributor. A Contribution 'originates' from a Contributor if it was added to the Program by such Contributor itself or anyone acting on such Contributor's behalf. Contributions do not include additions to the Program which: (i) are separate modules of software distributed in conjunction with the Program under their own license agreement, and (ii) are not derivative works of the Program.
+"Contributor" means any person or entity that distributes the Program.
+"Licensed Patents" mean patent claims licensable by a Contributor which are necessarily infringed by the use or sale of its Contribution alone or when combined with the Program.
+"Program" means the Contributions distributed in accordance with this Agreement.
+"Recipient" means anyone who receives the Program under this Agreement, including all Contributors.
+
+2. GRANT OF RIGHTS
+
+a) Subject to the terms of this Agreement, each Contributor hereby grants Recipient a non-exclusive, worldwide, royalty-free copyright license to reproduce, prepare derivative works of, publicly display, publicly perform, distribute and sublicense the Contribution of such Contributor, if any, and such derivative works, in source code and object code form.
+b) Subject to the terms of this Agreement, each Contributor hereby grants Recipient a non-exclusive, worldwide, royalty-free patent license under Licensed Patents to make, use, sell, offer to sell, import and otherwise transfer the Contribution of such Contributor, if any, in source code and object code form. This patent license shall apply to the combination of the Contribution and the Program if, at the time the Contribution is added by the Contributor, such addition of the Contribution causes such combination to be covered by the Licensed Patents. The patent license shall not apply to any other combinations which include the Contribution. No hardware per se is licensed hereunder.
+c) Recipient understands that although each Contributor grants the licenses to its Contributions set forth herein, no assurances are provided by any Contributor that the Program does not infringe the patent or other intellectual property rights of any other entity. Each Contributor disclaims any liability to Recipient for claims brought by any other entity based on infringement of intellectual property rights or otherwise. As a condition to exercising the rights and licenses granted hereunder, each Recipient hereby assumes sole responsibility to secure any other intellectual property rights needed, if any. For example, if a third party patent license is required to allow Recipient to distribute the Program, it is Recipient's responsibility to acquire that license before distributing the Program.
+d) Each Contributor represents that to its knowledge it has sufficient copyright rights in its Contribution, if any, to grant the copyright license set forth in this Agreement.
+
+3. REQUIREMENTS
+
+A Contributor may choose to distribute the Program in object code form under its own license agreement, provided that:
+a) it complies with the terms and conditions of this Agreement; and
+b) its license agreement:
+i) effectively disclaims on behalf of all Contributors all warranties and conditions, express and implied, including warranties or conditions of title and non-infringement, and implied warranties or conditions of merchantability and fitness for a particular purpose;
+ii) effectively excludes on behalf of all Contributors all liability for damages, including direct, indirect, special, incidental and consequential damages, such as lost profits;
+iii) states that any provisions which differ from this Agreement are offered by that Contributor alone and not by any other party; and
+iv) states that source code for the Program is available from such Contributor, and informs licensees how to obtain it in a reasonable manner on or through a medium customarily used for software exchange.
+
+When the Program is made available in source code form:
+a) it must be made available under this Agreement; and
+b) a copy of this Agreement must be included with each copy of the Program.
+
+Contributors may not remove or alter any copyright notices contained within the Program.
+Each Contributor must identify itself as the originator of its Contribution, if any, in a manner that reasonably allows subsequent Recipients to identify the originator of the Contribution.
+
+4. COMMERCIAL DISTRIBUTION
+
+Commercial distributors of software may accept certain responsibilities with respect to end users, business partners and the like. While this license is intended to facilitate the commercial use of the Program, the Contributor who includes the Program in a commercial product offering should do so in a manner which does not create potential liability for other Contributors. Therefore, if a Contributor includes the Program in a commercial product offering, such Contributor ("Commercial Contributor") hereby agrees to defend and indemnify every other Contributor ("Indemnified Contributor") against any losses, damages and costs (collectively "Losses") arising from claims, lawsuits and other legal actions brought by a third party against the Indemnified Contributor to the extent caused by the acts or omissions of such Commercial Contributor in connection with its distribution of the Program in a commercial product offering. The obligations in this section do not apply to any claims or Losses relating to any actual or alleged intellectual property infringement. In order to qualify, an Indemnified Contributor must: a) promptly notify the Commercial Contributor in writing of such claim, and b) allow the Commercial Contributor to control, and cooperate with the Commercial Contributor in, the defense and any related settlement negotiations. The Indemnified Contributor may participate in any such claim at its own expense.
+
+For example, a Contributor might include the Program in a commercial product offering, Product X. That Contributor is then a Commercial Contributor. If that Commercial Contributor then makes performance claims, or offers warranties related to Product X, those performance claims and warranties are such Commercial Contributor's responsibility alone. Under this section, the Commercial Contributor would have to defend claims against the other Contributors related to those performance claims and warranties, and if a court requires any other Contributor to pay any damages as a result, the Commercial Contributor must pay those damages.
+
+5. NO WARRANTY
+
+EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE PROGRAM IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING, WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Each Recipient is solely responsible for determining the appropriateness of using and distributing the Program and assumes all risks associated with its exercise of rights under this Agreement , including but not limited to the risks and costs of program errors, compliance with applicable laws, damage to or loss of data, programs or equipment, and unavailability or interruption of operations.
+
+6. DISCLAIMER OF LIABILITY
+
+EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, NEITHER RECIPIENT NOR ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OR DISTRIBUTION OF THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+
+7. GENERAL
+
+If any provision of this Agreement is invalid or unenforceable under applicable law, it shall not affect the validity or enforceability of the remainder of the terms of this Agreement, and without further action by the parties hereto, such provision shall be reformed to the minimum extent necessary to make such provision valid and enforceable.
+If Recipient institutes patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Program itself (excluding combinations of the Program with other software or hardware) infringes such Recipient's patent(s), then such Recipient's rights granted under Section 2(b) shall terminate as of the date such litigation is filed.
+All Recipient's rights under this Agreement shall terminate if it fails to comply with any of the material terms or conditions of this Agreement and does not cure such failure in a reasonable period of time after becoming aware of such noncompliance. If all Recipient's rights under this Agreement terminate, Recipient agrees to cease use and distribution of the Program as soon as reasonably practicable. However, Recipient's obligations under this Agreement and any licenses granted by Recipient relating to the Program shall continue and survive.
+Everyone is permitted to copy and distribute copies of this Agreement, but in order to avoid inconsistency the Agreement is copyrighted and may only be modified in the following manner. The Agreement Steward reserves the right to publish new versions (including revisions) of this Agreement from time to time. No one other than the Agreement Steward has the right to modify this Agreement. The Eclipse Foundation is the initial Agreement Steward. The Eclipse Foundation may assign the responsibility to serve as the Agreement Steward to a suitable separate entity. Each new version of the Agreement will be given a distinguishing version number. The Program (including Contributions) may always be distributed subject to the version of the Agreement under which it was received. In addition, after a new version of the Agreement is published, Contributor may elect to distribute the Program (including its Contributions) under the new version. Except as expressly stated in Sections 2(a) and 2(b) above, Recipient receives no rights or licenses to the intellectual property of any Contributor under this Agreement, whether expressly, by implication, estoppel or otherwise. All rights in the Program not expressly granted under this Agreement are reserved.
+This Agreement is governed by the laws of the State of New York and the intellectual property laws of the United States of America. No party to this Agreement will bring a legal action under this Agreement more than one year after the cause of action arose. Each party waives its rights to a jury trial in any resulting litigation.
diff --git a/ide/lsp.client/manifest.mf b/ide/lsp.client/manifest.mf
new file mode 100644
index 0000000000..0a64463565
--- /dev/null
+++ b/ide/lsp.client/manifest.mf
@@ -0,0 +1,6 @@
+Manifest-Version: 1.0
+AutoUpdate-Show-In-Client: true
+OpenIDE-Module: org.netbeans.modules.lsp.client/0
+OpenIDE-Module-Localizing-Bundle: org/netbeans/modules/lsp/client/Bundle.properties
+OpenIDE-Module-Specification-Version: 1.0
+
diff --git a/ide/lsp.client/nbproject/project.properties b/ide/lsp.client/nbproject/project.properties
new file mode 100644
index 0000000000..1118a9114b
--- /dev/null
+++ b/ide/lsp.client/nbproject/project.properties
@@ -0,0 +1,26 @@
+# 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.
+
+javac.source=1.8
+javac.compilerargs=-Xlint -Xlint:-serial
+javadoc.arch=${basedir}/arch.xml
+release.external/org.eclipse.lsp4j-0.4.1.jar=modules/ext/org.eclipse.lsp4j-0.4.1.jar
+release.external/org.eclipse.lsp4j.generator-0.4.1.jar=modules/ext/org.eclipse.lsp4j.generator-0.4.1.jar
+release.external/org.eclipse.lsp4j.jsonrpc-0.4.1.jar=modules/ext/org.eclipse.lsp4j.jsonrpc-0.4.1.jar
+release.external/org.eclipse.xtend.lib-2.14.0.jar=modules/ext/org.eclipse.xtend.lib-2.14.0.jar
+release.external/org.eclipse.xtend.lib.macro-2.14.0.jar=modules/ext/org.eclipse.xtend.lib.macro-2.14.0.jar
+release.external/org.eclipse.xtext.xbase.lib-2.14.0.jar=modules/ext/org.eclipse.xtext.xbase.lib-2.14.0.jar
diff --git a/ide/lsp.client/nbproject/project.xml b/ide/lsp.client/nbproject/project.xml
new file mode 100644
index 0000000000..c032598892
--- /dev/null
+++ b/ide/lsp.client/nbproject/project.xml
@@ -0,0 +1,252 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+    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.
+
+-->
+<project xmlns="http://www.netbeans.org/ns/project/1">
+    <type>org.netbeans.modules.apisupport.project</type>
+    <configuration>
+        <data xmlns="http://www.netbeans.org/ns/nb-module-project/3">
+            <code-name-base>org.netbeans.modules.lsp.client</code-name-base>
+            <module-dependencies>
+                <dependency>
+                    <code-name-base>com.google.gson</code-name-base>
+                    <build-prerequisite/>
+                    <compile-dependency/>
+                    <run-dependency>
+                        <specification-version>2.7</specification-version>
+                    </run-dependency>
+                </dependency>
+                <dependency>
+                    <code-name-base>com.google.guava</code-name-base>
+                    <build-prerequisite/>
+                    <compile-dependency/>
+                    <run-dependency>
+                        <specification-version>15.0</specification-version>
+                    </run-dependency>
+                </dependency>
+                <dependency>
+                    <code-name-base>org.netbeans.api.annotations.common</code-name-base>
+                    <build-prerequisite/>
+                    <compile-dependency/>
+                    <run-dependency>
+                        <release-version>1</release-version>
+                        <specification-version>1.30</specification-version>
+                    </run-dependency>
+                </dependency>
+                <dependency>
+                    <code-name-base>org.netbeans.api.progress</code-name-base>
+                    <build-prerequisite/>
+                    <compile-dependency/>
+                    <run-dependency>
+                        <release-version>1</release-version>
+                        <specification-version>1.50</specification-version>
+                    </run-dependency>
+                </dependency>
+                <dependency>
+                    <code-name-base>org.netbeans.modules.editor</code-name-base>
+                    <build-prerequisite/>
+                    <compile-dependency/>
+                    <run-dependency>
+                        <release-version>3</release-version>
+                        <specification-version>1.90</specification-version>
+                    </run-dependency>
+                </dependency>
+                <dependency>
+                    <code-name-base>org.netbeans.modules.editor.completion</code-name-base>
+                    <build-prerequisite/>
+                    <compile-dependency/>
+                    <run-dependency>
+                        <release-version>1</release-version>
+                        <specification-version>1.47</specification-version>
+                    </run-dependency>
+                </dependency>
+                <dependency>
+                    <code-name-base>org.netbeans.modules.editor.document</code-name-base>
+                    <build-prerequisite/>
+                    <compile-dependency/>
+                    <run-dependency>
+                        <specification-version>1.12</specification-version>
+                    </run-dependency>
+                </dependency>
+                <dependency>
+                    <code-name-base>org.netbeans.modules.editor.lib</code-name-base>
+                    <build-prerequisite/>
+                    <compile-dependency/>
+                    <run-dependency>
+                        <release-version>3</release-version>
+                        <specification-version>4.10</specification-version>
+                    </run-dependency>
+                </dependency>
+                <dependency>
+                    <code-name-base>org.netbeans.modules.editor.lib2</code-name-base>
+                    <build-prerequisite/>
+                    <compile-dependency/>
+                    <run-dependency>
+                        <release-version>1</release-version>
+                        <specification-version>2.20</specification-version>
+                    </run-dependency>
+                </dependency>
+                <dependency>
+                    <code-name-base>org.netbeans.modules.editor.mimelookup</code-name-base>
+                    <build-prerequisite/>
+                    <compile-dependency/>
+                    <run-dependency>
+                        <release-version>1</release-version>
+                        <specification-version>1.43</specification-version>
+                    </run-dependency>
+                </dependency>
+                <dependency>
+                    <code-name-base>org.netbeans.modules.projectapi</code-name-base>
+                    <build-prerequisite/>
+                    <compile-dependency/>
+                    <run-dependency>
+                        <release-version>1</release-version>
+                        <specification-version>1.70</specification-version>
+                    </run-dependency>
+                </dependency>
+                <dependency>
+                    <code-name-base>org.netbeans.spi.editor.hints</code-name-base>
+                    <build-prerequisite/>
+                    <compile-dependency/>
+                    <run-dependency>
+                        <release-version>0</release-version>
+                        <specification-version>1.45</specification-version>
+                    </run-dependency>
+                </dependency>
+                <dependency>
+                    <code-name-base>org.netbeans.spi.navigator</code-name-base>
+                    <build-prerequisite/>
+                    <compile-dependency/>
+                    <run-dependency>
+                        <release-version>1</release-version>
+                        <specification-version>1.40</specification-version>
+                    </run-dependency>
+                </dependency>
+                <dependency>
+                    <code-name-base>org.openide.awt</code-name-base>
+                    <build-prerequisite/>
+                    <compile-dependency/>
+                    <run-dependency>
+                        <specification-version>7.70</specification-version>
+                    </run-dependency>
+                </dependency>
+                <dependency>
+                    <code-name-base>org.openide.dialogs</code-name-base>
+                    <build-prerequisite/>
+                    <compile-dependency/>
+                    <run-dependency>
+                        <specification-version>7.45</specification-version>
+                    </run-dependency>
+                </dependency>
+                <dependency>
+                    <code-name-base>org.openide.explorer</code-name-base>
+                    <build-prerequisite/>
+                    <compile-dependency/>
+                    <run-dependency>
+                        <specification-version>6.65</specification-version>
+                    </run-dependency>
+                </dependency>
+                <dependency>
+                    <code-name-base>org.openide.filesystems</code-name-base>
+                    <build-prerequisite/>
+                    <compile-dependency/>
+                    <run-dependency>
+                        <specification-version>9.13</specification-version>
+                    </run-dependency>
+                </dependency>
+                <dependency>
+                    <code-name-base>org.openide.modules</code-name-base>
+                    <build-prerequisite/>
+                    <compile-dependency/>
+                    <run-dependency>
+                        <specification-version>7.51</specification-version>
+                    </run-dependency>
+                </dependency>
+                <dependency>
+                    <code-name-base>org.openide.nodes</code-name-base>
+                    <build-prerequisite/>
+                    <compile-dependency/>
+                    <run-dependency>
+                        <specification-version>7.48</specification-version>
+                    </run-dependency>
+                </dependency>
+                <dependency>
+                    <code-name-base>org.openide.text</code-name-base>
+                    <build-prerequisite/>
+                    <compile-dependency/>
+                    <run-dependency>
+                        <specification-version>6.70</specification-version>
+                    </run-dependency>
+                </dependency>
+                <dependency>
+                    <code-name-base>org.openide.util</code-name-base>
+                    <build-prerequisite/>
+                    <compile-dependency/>
+                    <run-dependency>
+                        <specification-version>9.10</specification-version>
+                    </run-dependency>
+                </dependency>
+                <dependency>
+                    <code-name-base>org.openide.util.lookup</code-name-base>
+                    <build-prerequisite/>
+                    <compile-dependency/>
+                    <run-dependency>
+                        <specification-version>8.36</specification-version>
+                    </run-dependency>
+                </dependency>
+                <dependency>
+                    <code-name-base>org.openide.util.ui</code-name-base>
+                    <build-prerequisite/>
+                    <compile-dependency/>
+                    <run-dependency>
+                        <specification-version>9.10</specification-version>
+                    </run-dependency>
+                </dependency>
+            </module-dependencies>
+            <public-packages>
+                <package>org.netbeans.modules.lsp.client.spi</package>
+            </public-packages>
+            <class-path-extension>
+                <runtime-relative-path>ext/org.eclipse.lsp4j-0.4.1.jar</runtime-relative-path>
+                <binary-origin>external/org.eclipse.lsp4j-0.4.1.jar</binary-origin>
+            </class-path-extension>
+            <class-path-extension>
+                <runtime-relative-path>ext/org.eclipse.xtend.lib.macro-2.14.0.jar</runtime-relative-path>
+                <binary-origin>external/org.eclipse.xtend.lib.macro-2.14.0.jar</binary-origin>
+            </class-path-extension>
+            <class-path-extension>
+                <runtime-relative-path>ext/org.eclipse.lsp4j.generator-0.4.1.jar</runtime-relative-path>
+                <binary-origin>external/org.eclipse.lsp4j.generator-0.4.1.jar</binary-origin>
+            </class-path-extension>
+            <class-path-extension>
+                <runtime-relative-path>ext/org.eclipse.xtend.lib-2.14.0.jar</runtime-relative-path>
+                <binary-origin>external/org.eclipse.xtend.lib-2.14.0.jar</binary-origin>
+            </class-path-extension>
+            <class-path-extension>
+                <runtime-relative-path>ext/org.eclipse.xtext.xbase.lib-2.14.0.jar</runtime-relative-path>
+                <binary-origin>external/org.eclipse.xtext.xbase.lib-2.14.0.jar</binary-origin>
+            </class-path-extension>
+            <class-path-extension>
+                <runtime-relative-path>ext/org.eclipse.lsp4j.jsonrpc-0.4.1.jar</runtime-relative-path>
+                <binary-origin>external/org.eclipse.lsp4j.jsonrpc-0.4.1.jar</binary-origin>
+            </class-path-extension>
+        </data>
+    </configuration>
+</project>
diff --git a/ide/lsp.client/src/org/netbeans/modules/lsp/client/Bundle.properties b/ide/lsp.client/src/org/netbeans/modules/lsp/client/Bundle.properties
new file mode 100644
index 0000000000..f30f87ad1c
--- /dev/null
+++ b/ide/lsp.client/src/org/netbeans/modules/lsp/client/Bundle.properties
@@ -0,0 +1,24 @@
+# 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.
+
+OpenIDE-Module-Name=LSP Client
+ConnectToLanguageServerParameters.jLabel1.text=Root:
+ConnectToLanguageServerParameters.jLabel2.text=Port:
+ConnectToLanguageServerParameters.jLabel3.text=Extensions:
+ConnectToLanguageServerParameters.port.text=
+ConnectToLanguageServerParameters.extensions.text=
+ConnectToLanguageServerParameters.root.text=
diff --git a/ide/lsp.client/src/org/netbeans/modules/lsp/client/ConnectToLanguageServer.java b/ide/lsp.client/src/org/netbeans/modules/lsp/client/ConnectToLanguageServer.java
new file mode 100644
index 0000000000..a32d0fab3f
--- /dev/null
+++ b/ide/lsp.client/src/org/netbeans/modules/lsp/client/ConnectToLanguageServer.java
@@ -0,0 +1,70 @@
+/*
+ * 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.lsp.client;
+
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
+import java.io.File;
+import org.openide.*;
+import org.openide.awt.ActionID;
+import org.openide.awt.ActionRegistration;
+import org.openide.filesystems.FileObject;
+import org.openide.filesystems.FileUtil;
+import org.openide.util.NbBundle.Messages;
+
+@ActionID(
+        category = "Tools",
+        id = "org.netbeans.modules.lsp.client.ConnectToLanguageServer"
+)
+@ActionRegistration(
+        displayName = "#CTL_ConnectToLanguageServer"
+)
+@Messages("CTL_ConnectToLanguageServer=Connect to Language Server")
+public final class ConnectToLanguageServer implements ActionListener {
+
+    @Override
+    @Messages({"ERR_CanFindRoot=Can't find the specified root directory",
+               "ERR_InvalidPort=The specified port is invalid"
+    })
+    public void actionPerformed(ActionEvent e) {
+        ConnectToLanguageServerParameters params = new ConnectToLanguageServerParameters();
+        DialogDescriptor dd = new DialogDescriptor(params, "Connect to Language Server", true, DialogDescriptor.OK_CANCEL_OPTION, DialogDescriptor.OK_OPTION, null);
+
+        if (DialogDisplayer.getDefault().notify(dd) == DialogDescriptor.OK_OPTION) {
+            params.confirm();
+            FileObject root = FileUtil.toFileObject(new File(params.getRoot()));
+
+            if (root == null) {
+                DialogDisplayer.getDefault().notifyLater(new NotifyDescriptor.Message(Bundle.ERR_CanFindRoot(), NotifyDescriptor.ERROR_MESSAGE));
+                return ;
+            }
+
+            int port;
+
+            try {
+                port = Integer.parseInt(params.getPort());
+            } catch (NumberFormatException ex) {
+                DialogDisplayer.getDefault().notifyLater(new NotifyDescriptor.Message(Bundle.ERR_InvalidPort(), NotifyDescriptor.ERROR_MESSAGE));
+                return ;
+            }
+
+            LSPBindings.addBindings(root, port, params.getExtensions().split(","));
+        }
+    }
+}
diff --git a/ide/lsp.client/src/org/netbeans/modules/lsp/client/ConnectToLanguageServerParameters.form b/ide/lsp.client/src/org/netbeans/modules/lsp/client/ConnectToLanguageServerParameters.form
new file mode 100644
index 0000000000..e127e2dea3
--- /dev/null
+++ b/ide/lsp.client/src/org/netbeans/modules/lsp/client/ConnectToLanguageServerParameters.form
@@ -0,0 +1,125 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!--
+
+    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.
+
+-->
+
+<Form version="1.5" maxVersion="1.9" type="org.netbeans.modules.form.forminfo.JPanelFormInfo">
+  <AuxValues>
+    <AuxValue name="FormSettings_autoResourcing" type="java.lang.Integer" value="1"/>
+    <AuxValue name="FormSettings_autoSetComponentName" type="java.lang.Boolean" value="false"/>
+    <AuxValue name="FormSettings_generateFQN" type="java.lang.Boolean" value="true"/>
+    <AuxValue name="FormSettings_generateMnemonicsCode" type="java.lang.Boolean" value="true"/>
+    <AuxValue name="FormSettings_i18nAutoMode" type="java.lang.Boolean" value="true"/>
+    <AuxValue name="FormSettings_layoutCodeTarget" type="java.lang.Integer" value="1"/>
+    <AuxValue name="FormSettings_listenerGenerationStyle" type="java.lang.Integer" value="0"/>
+    <AuxValue name="FormSettings_variablesLocal" type="java.lang.Boolean" value="false"/>
+    <AuxValue name="FormSettings_variablesModifier" type="java.lang.Integer" value="2"/>
+  </AuxValues>
+
+  <Layout>
+    <DimensionLayout dim="0">
+      <Group type="103" groupAlignment="0" attributes="0">
+          <Group type="102" alignment="0" attributes="0">
+              <EmptySpace max="-2" attributes="0"/>
+              <Group type="103" groupAlignment="0" attributes="0">
+                  <Group type="103" alignment="0" groupAlignment="0" max="-2" attributes="0">
+                      <Component id="jLabel2" max="32767" attributes="0"/>
+                      <Component id="jLabel1" pref="82" max="32767" attributes="0"/>
+                  </Group>
+                  <Component id="jLabel3" alignment="0" min="-2" max="-2" attributes="0"/>
+              </Group>
+              <EmptySpace min="-2" pref="20" max="-2" attributes="0"/>
+              <Group type="103" groupAlignment="0" attributes="0">
+                  <Component id="root" pref="274" max="32767" attributes="0"/>
+                  <Component id="port" max="32767" attributes="0"/>
+                  <Component id="extensions" alignment="0" max="32767" attributes="0"/>
+              </Group>
+              <EmptySpace max="-2" attributes="0"/>
+          </Group>
+      </Group>
+    </DimensionLayout>
+    <DimensionLayout dim="1">
+      <Group type="103" groupAlignment="0" attributes="0">
+          <Group type="102" alignment="0" attributes="0">
+              <EmptySpace max="-2" attributes="0"/>
+              <Group type="103" groupAlignment="3" attributes="0">
+                  <Component id="jLabel1" alignment="3" min="-2" max="-2" attributes="0"/>
+                  <Component id="root" alignment="3" min="-2" max="-2" attributes="0"/>
+              </Group>
+              <EmptySpace type="unrelated" max="-2" attributes="0"/>
+              <Group type="103" groupAlignment="3" attributes="0">
+                  <Component id="jLabel2" alignment="3" min="-2" max="-2" attributes="0"/>
+                  <Component id="port" alignment="3" min="-2" max="-2" attributes="0"/>
+              </Group>
+              <EmptySpace type="unrelated" max="-2" attributes="0"/>
+              <Group type="103" groupAlignment="3" attributes="0">
+                  <Component id="jLabel3" alignment="3" min="-2" max="-2" attributes="0"/>
+                  <Component id="extensions" alignment="3" min="-2" max="-2" attributes="0"/>
+              </Group>
+              <EmptySpace max="32767" attributes="0"/>
+          </Group>
+      </Group>
+    </DimensionLayout>
+  </Layout>
+  <SubComponents>
+    <Component class="javax.swing.JLabel" name="jLabel1">
+      <Properties>
+        <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
+          <ResourceString bundle="org/netbeans/modules/lsp/client/Bundle.properties" key="ConnectToLanguageServerParameters.jLabel1.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
+        </Property>
+      </Properties>
+    </Component>
+    <Component class="javax.swing.JTextField" name="root">
+      <Properties>
+        <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
+          <ResourceString bundle="org/netbeans/modules/lsp/client/Bundle.properties" key="ConnectToLanguageServerParameters.root.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
+        </Property>
+      </Properties>
+    </Component>
+    <Component class="javax.swing.JLabel" name="jLabel2">
+      <Properties>
+        <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
+          <ResourceString bundle="org/netbeans/modules/lsp/client/Bundle.properties" key="ConnectToLanguageServerParameters.jLabel2.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
+        </Property>
+      </Properties>
+    </Component>
+    <Component class="javax.swing.JTextField" name="port">
+      <Properties>
+        <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
+          <ResourceString bundle="org/netbeans/modules/lsp/client/Bundle.properties" key="ConnectToLanguageServerParameters.port.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
+        </Property>
+      </Properties>
+    </Component>
+    <Component class="javax.swing.JLabel" name="jLabel3">
+      <Properties>
+        <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
+          <ResourceString bundle="org/netbeans/modules/lsp/client/Bundle.properties" key="ConnectToLanguageServerParameters.jLabel3.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
+        </Property>
+      </Properties>
+    </Component>
+    <Component class="javax.swing.JTextField" name="extensions">
+      <Properties>
+        <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
+          <ResourceString bundle="org/netbeans/modules/lsp/client/Bundle.properties" key="ConnectToLanguageServerParameters.extensions.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
+        </Property>
+      </Properties>
+    </Component>
+  </SubComponents>
+</Form>
diff --git a/ide/lsp.client/src/org/netbeans/modules/lsp/client/ConnectToLanguageServerParameters.java b/ide/lsp.client/src/org/netbeans/modules/lsp/client/ConnectToLanguageServerParameters.java
new file mode 100644
index 0000000000..ff0a410fda
--- /dev/null
+++ b/ide/lsp.client/src/org/netbeans/modules/lsp/client/ConnectToLanguageServerParameters.java
@@ -0,0 +1,137 @@
+/*
+ * 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.lsp.client;
+
+import java.util.prefs.Preferences;
+import javax.swing.JTextField;
+import org.openide.util.NbPreferences;
+
+/**
+ *
+ * @author lahvac
+ */
+public class ConnectToLanguageServerParameters extends javax.swing.JPanel {
+
+    private static final String KEY_ROOT = "root";
+    private static final String KEY_PORT = "port";
+    private static final String KEY_EXTENSIONS = "extensions";
+    private final Preferences settings;
+
+    public ConnectToLanguageServerParameters() {
+        initComponents();
+        Preferences prefs = NbPreferences.forModule(ConnectToLanguageServerParameters.class);
+        settings = prefs.node("connect");
+        root.setText(settings.get(KEY_ROOT, ""));
+        port.setText(settings.get(KEY_PORT, ""));
+        extensions.setText(settings.get(KEY_EXTENSIONS, ""));
+    }
+
+    public void confirm() {
+        settings.put(KEY_ROOT, root.getText());
+        settings.put(KEY_PORT, port.getText());
+        settings.put(KEY_EXTENSIONS, extensions.getText());
+    }
+
+    public String getExtensions() {
+        return extensions.getText();
+    }
+
+    public String getPort() {
+        return port.getText();
+    }
+
+    public String getRoot() {
+        return root.getText();
+    }
+
+    /**
+     * This method is called from within the constructor to initialize the form.
+     * WARNING: Do NOT modify this code. The content of this method is always
+     * regenerated by the Form Editor.
+     */
+    @SuppressWarnings("unchecked")
+    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
+    private void initComponents() {
+
+        jLabel1 = new javax.swing.JLabel();
+        root = new javax.swing.JTextField();
+        jLabel2 = new javax.swing.JLabel();
+        port = new javax.swing.JTextField();
+        jLabel3 = new javax.swing.JLabel();
+        extensions = new javax.swing.JTextField();
+
+        org.openide.awt.Mnemonics.setLocalizedText(jLabel1, org.openide.util.NbBundle.getMessage(ConnectToLanguageServerParameters.class, "ConnectToLanguageServerParameters.jLabel1.text")); // NOI18N
+
+        root.setText(org.openide.util.NbBundle.getMessage(ConnectToLanguageServerParameters.class, "ConnectToLanguageServerParameters.root.text")); // NOI18N
+
+        org.openide.awt.Mnemonics.setLocalizedText(jLabel2, org.openide.util.NbBundle.getMessage(ConnectToLanguageServerParameters.class, "ConnectToLanguageServerParameters.jLabel2.text")); // NOI18N
+
+        port.setText(org.openide.util.NbBundle.getMessage(ConnectToLanguageServerParameters.class, "ConnectToLanguageServerParameters.port.text")); // NOI18N
+
+        org.openide.awt.Mnemonics.setLocalizedText(jLabel3, org.openide.util.NbBundle.getMessage(ConnectToLanguageServerParameters.class, "ConnectToLanguageServerParameters.jLabel3.text")); // NOI18N
+
+        extensions.setText(org.openide.util.NbBundle.getMessage(ConnectToLanguageServerParameters.class, "ConnectToLanguageServerParameters.extensions.text")); // NOI18N
+
+        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
+        this.setLayout(layout);
+        layout.setHorizontalGroup(
+            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
+            .addGroup(layout.createSequentialGroup()
+                .addContainerGap()
+                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
+                    .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
+                        .addComponent(jLabel2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
+                        .addComponent(jLabel1, javax.swing.GroupLayout.DEFAULT_SIZE, 82, Short.MAX_VALUE))
+                    .addComponent(jLabel3))
+                .addGap(20, 20, 20)
+                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
+                    .addComponent(root, javax.swing.GroupLayout.DEFAULT_SIZE, 274, Short.MAX_VALUE)
+                    .addComponent(port)
+                    .addComponent(extensions))
+                .addContainerGap())
+        );
+        layout.setVerticalGroup(
+            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
+            .addGroup(layout.createSequentialGroup()
+                .addContainerGap()
+                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
+                    .addComponent(jLabel1)
+                    .addComponent(root, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
+                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
+                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
+                    .addComponent(jLabel2)
+                    .addComponent(port, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
+                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
+                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
+                    .addComponent(jLabel3)
+                    .addComponent(extensions, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
+                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
+        );
+    }// </editor-fold>//GEN-END:initComponents
+
+
+    // Variables declaration - do not modify//GEN-BEGIN:variables
+    private javax.swing.JTextField extensions;
+    private javax.swing.JLabel jLabel1;
+    private javax.swing.JLabel jLabel2;
+    private javax.swing.JLabel jLabel3;
+    private javax.swing.JTextField port;
+    private javax.swing.JTextField root;
+    // End of variables declaration//GEN-END:variables
+}
diff --git a/ide/lsp.client/src/org/netbeans/modules/lsp/client/LSPBindings.java b/ide/lsp.client/src/org/netbeans/modules/lsp/client/LSPBindings.java
new file mode 100644
index 0000000000..345541ec97
--- /dev/null
+++ b/ide/lsp.client/src/org/netbeans/modules/lsp/client/LSPBindings.java
@@ -0,0 +1,221 @@
+/*
+ * 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.lsp.client;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.OutputStream;
+import java.net.InetAddress;
+import java.net.Socket;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.HashMap;
+import java.util.IdentityHashMap;
+import java.util.LinkedHashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Map.Entry;
+import java.util.WeakHashMap;
+import java.util.concurrent.ExecutionException;
+import java.util.logging.Level;
+import java.util.logging.Logger;
+import java.util.stream.Collectors;
+import org.eclipse.lsp4j.InitializeParams;
+import org.eclipse.lsp4j.InitializeResult;
+import org.eclipse.lsp4j.jsonrpc.Launcher;
+import org.eclipse.lsp4j.launch.LSPLauncher;
+import org.eclipse.lsp4j.services.LanguageServer;
+import org.eclipse.lsp4j.services.TextDocumentService;
+import org.eclipse.lsp4j.services.WorkspaceService;
+import org.netbeans.api.editor.mimelookup.MimeLookup;
+import org.netbeans.api.progress.*;
+import org.netbeans.api.project.FileOwnerQuery;
+import org.netbeans.api.project.Project;
+import org.netbeans.modules.lsp.client.bindings.LanguageClientImpl;
+import org.netbeans.modules.lsp.client.spi.LanguageServerProvider;
+import org.netbeans.modules.lsp.client.spi.LanguageServerProvider.LanguageServerDescription;
+import org.openide.filesystems.FileObject;
+import org.openide.filesystems.FileUtil;
+import org.openide.util.Exceptions;
+import org.openide.util.NbBundle.Messages;
+import org.openide.util.RequestProcessor;
+import org.openide.util.lookup.Lookups;
+
+/**
+ *
+ * @author lahvac
+ */
+public class LSPBindings {
+
+    private static final RequestProcessor WORKER = new RequestProcessor(LanguageClientImpl.class.getName(), 1, false, false);
+    private static final int DELAY = 500;
+
+    private static final Map<Project, Map<String, LSPBindings>> project2MimeType2Server = new WeakHashMap<>();
+    private static final Map<FileObject, Map<String, LSPBindings>> workspace2Extension2Server = new HashMap<>();
+    private final Map<FileObject, Map<BackgroundTask, RequestProcessor.Task>> backgroundTasks = new WeakHashMap<>();
+
+    public static LSPBindings getBindings(FileObject file) {
+        for (Entry<FileObject, Map<String, LSPBindings>> e : workspace2Extension2Server.entrySet()) {
+            if (FileUtil.isParentOf(e.getKey(), file)) {
+                LSPBindings bindings = e.getValue().get(file.getExt());
+
+                if (bindings != null) {
+                    return bindings;
+                }
+
+                break;
+            }
+        }
+        Project prj = FileOwnerQuery.getOwner(file);
+
+        if (prj == null)
+            return null;
+
+        String mimeType = FileUtil.getMIMEType(file);
+
+        LSPBindings bindings =
+                project2MimeType2Server.computeIfAbsent(prj, p -> new HashMap<>())
+                                       .computeIfAbsent(mimeType, mt -> {
+                                           for (LanguageServerProvider provider : MimeLookup.getLookup(mimeType).lookupAll(LanguageServerProvider.class)) {
+                                               LanguageServerDescription desc = provider.startServer(Lookups.singleton(prj));
+
+                                               if (desc != null) {
+                                                   try {
+                                                       LanguageClientImpl lci = new LanguageClientImpl();
+                                                       InputStream in = LanguageServerProviderAccessor.getINSTANCE().getInputStream(desc);
+                                                       OutputStream out = LanguageServerProviderAccessor.getINSTANCE().getOutputStream(desc);
+                                                       Launcher<LanguageServer> launcher = LSPLauncher.createClientLauncher(lci, in, out);
+                                                       launcher.startListening();
+                                                       LanguageServer server = launcher.getRemoteProxy();
+                                                       InitializeParams initParams = new InitializeParams();
+                                                       initParams.setRootUri(prj.getProjectDirectory().toURI().toString()); //XXX: what if a different root is expected????
+                                                       initParams.setRootPath(FileUtil.toFile(prj.getProjectDirectory()).getAbsolutePath()); //some servers still expect root path
+                                                       initParams.setProcessId(0);
+                                                       InitializeResult result = server.initialize(initParams).get();
+                                                       LSPBindings b = new LSPBindings(server, result);
+                                                       lci.setBindings(b);
+                                                       return b;
+                                                   } catch (InterruptedException | ExecutionException ex) {
+                                                       LOG.log(Level.FINE, null, ex);
+                                                   }
+                                               }
+                                           }
+                                           return new LSPBindings(null, null);
+                                       });
+
+        return bindings.server != null ? bindings : null;
+    }
+    private static final Logger LOG = Logger.getLogger(LSPBindings.class.getName());
+
+    @Messages("LBL_Connecting=Connecting to language server")
+    public static void addBindings(FileObject root, int port, String... extensions) {
+        BaseProgressUtils.showProgressDialogAndRun(() -> {
+            try {
+                Socket s = new Socket(InetAddress.getLocalHost(), port);
+                LanguageClientImpl lc = new LanguageClientImpl();
+                InputStream in = s.getInputStream();
+                OutputStream out = s.getOutputStream();
+                Launcher<LanguageServer> launcher = LSPLauncher.createClientLauncher(lc, in, new OutputStream() {
+                    @Override
+                    public void write(int w) throws IOException {
+                        out.write(w);
+                        if (w == '\n')
+                            out.flush();
+                    }
+                });
+                launcher.startListening();
+                LanguageServer server = launcher.getRemoteProxy();
+
+                InitializeParams initParams = new InitializeParams();
+                initParams.setRootUri(root.toURI().toString());
+                initParams.setProcessId(0);
+                InitializeResult result = server.initialize(initParams).get();
+                LSPBindings bindings = new LSPBindings(server, result);
+
+                lc.setBindings(bindings);
+
+                workspace2Extension2Server.put(root, Arrays.stream(extensions).collect(Collectors.toMap(k -> k, v -> bindings)));
+            } catch (InterruptedException | ExecutionException | IOException ex) {
+                Exceptions.printStackTrace(ex);
+            }
+        }, Bundle.LBL_Connecting());
+    }
+
+    private final LanguageServer server;
+    private final InitializeResult initResult;
+
+    private LSPBindings(LanguageServer server, InitializeResult initResult) {
+        this.server = server;
+        this.initResult = initResult;
+    }
+
+    public TextDocumentService getTextDocumentService() {
+        return server.getTextDocumentService();
+    }
+
+    public WorkspaceService getWorkspaceService() {
+        return server.getWorkspaceService();
+    }
+
+    public InitializeResult getInitResult() {
+        //XXX: defenzive copy?
+        return initResult;
+    }
+
+    public static void addBackgroundTask(FileObject file, BackgroundTask task) {
+        LSPBindings bindings = getBindings(file);
+
+        if (bindings == null)
+            return ;
+
+        RequestProcessor.Task req = WORKER.create(() -> task.run(bindings, file));
+
+        bindings.backgroundTasks.computeIfAbsent(file, f -> new LinkedHashMap<>()).put(task, req);
+        bindings.scheduleBackgroundTask(req);
+    }
+
+    public static void removeBackgroundTask(FileObject file, BackgroundTask task) {
+        LSPBindings bindings = getBindings(file);
+
+        if (bindings == null)
+            return ;
+
+        RequestProcessor.Task req = bindings.backgroundTasks.computeIfAbsent(file, f -> new LinkedHashMap<>()).remove(task);
+
+        if (req != null) {
+            req.cancel();
+        }
+    }
+
+    public void runOnBackground(Runnable r) {
+        WORKER.post(r);
+    }
+
+    public void scheduleBackgroundTask(RequestProcessor.Task req) {
+        WORKER.post(req, DELAY);
+    }
+
+    public void scheduleBackgroundTasks(FileObject file) {
+        backgroundTasks.computeIfAbsent(file, f -> new IdentityHashMap<>()).values().stream().forEach(this::scheduleBackgroundTask);
+    }
+
+    public interface BackgroundTask {
+        public void run(LSPBindings bindings, FileObject file);
+    }
+}
diff --git a/ide/lsp.client/src/org/netbeans/modules/lsp/client/LanguageServerProviderAccessor.java b/ide/lsp.client/src/org/netbeans/modules/lsp/client/LanguageServerProviderAccessor.java
new file mode 100644
index 0000000000..42d7234de4
--- /dev/null
+++ b/ide/lsp.client/src/org/netbeans/modules/lsp/client/LanguageServerProviderAccessor.java
@@ -0,0 +1,54 @@
+/*
+ * 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.lsp.client;
+
+import java.io.InputStream;
+import java.io.OutputStream;
+import org.netbeans.modules.lsp.client.spi.LanguageServerProvider.LanguageServerDescription;
+import org.openide.util.Exceptions;
+
+/**
+ *
+ * @author lahvac
+ */
+public abstract class LanguageServerProviderAccessor {
+
+    public static synchronized LanguageServerProviderAccessor getINSTANCE () {
+        if (INSTANCE == null) {
+            try {
+                Class.forName(LanguageServerDescription.class.getName(), true, LanguageServerDescription.class.getClassLoader());   //NOI18N            
+                assert INSTANCE != null;
+            } catch (ClassNotFoundException e) {
+                Exceptions.printStackTrace(e);
+            }
+        }
+        return INSTANCE;
+    }
+    
+    public static void setINSTANCE (LanguageServerProviderAccessor instance) {
+        assert instance != null;
+        INSTANCE = instance;
+    }
+    
+    private static volatile LanguageServerProviderAccessor INSTANCE;
+
+    public abstract InputStream getInputStream(LanguageServerDescription desc);
+    public abstract OutputStream getOutputStream(LanguageServerDescription desc);
+    public abstract Process getProcess(LanguageServerDescription desc);
+}
diff --git a/ide/lsp.client/src/org/netbeans/modules/lsp/client/bindings/CodeActions.java b/ide/lsp.client/src/org/netbeans/modules/lsp/client/bindings/CodeActions.java
new file mode 100644
index 0000000000..8e7e07116f
--- /dev/null
+++ b/ide/lsp.client/src/org/netbeans/modules/lsp/client/bindings/CodeActions.java
@@ -0,0 +1,91 @@
+/*
+ * 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.lsp.client.bindings;
+
+import java.net.URI;
+import java.util.Collections;
+import java.util.List;
+import java.util.concurrent.ExecutionException;
+import java.util.stream.Collectors;
+import javax.swing.text.BadLocationException;
+import javax.swing.text.JTextComponent;
+import org.eclipse.lsp4j.CodeActionContext;
+import org.eclipse.lsp4j.CodeActionParams;
+import org.eclipse.lsp4j.Command;
+import org.eclipse.lsp4j.ExecuteCommandParams;
+import org.eclipse.lsp4j.Range;
+import org.eclipse.lsp4j.TextDocumentIdentifier;
+import org.netbeans.api.editor.mimelookup.MimeRegistration;
+import org.netbeans.modules.editor.NbEditorUtilities;
+import org.netbeans.modules.lsp.client.LSPBindings;
+import org.netbeans.spi.editor.codegen.CodeGenerator;
+import org.openide.filesystems.FileObject;
+import org.openide.util.Exceptions;
+import org.openide.util.Lookup;
+
+/**
+ *
+ * @author lahvac
+ */
+@MimeRegistration(mimeType="", service=CodeGenerator.Factory.class)
+public class CodeActions implements CodeGenerator.Factory {
+
+    @Override
+    public List<? extends CodeGenerator> create(Lookup context) {
+        JTextComponent component = context.lookup(JTextComponent.class);
+        if (component == null) {
+            return Collections.emptyList();
+        }
+        FileObject file = NbEditorUtilities.getFileObject(component.getDocument());
+        if (file == null) {
+            return Collections.emptyList();
+        }
+        LSPBindings server = LSPBindings.getBindings(file);
+        if (server == null) {
+            return Collections.emptyList();
+        }
+        URI uri = file.toURI();
+        try {
+            List<? extends Command> commands = 
+                    server.getTextDocumentService().codeAction(new CodeActionParams(new TextDocumentIdentifier(uri.toString()),
+                    new Range(Utils.createPosition(component.getDocument(), component.getSelectionStart()),
+                            Utils.createPosition(component.getDocument(), component.getSelectionEnd())),
+                    new CodeActionContext(Collections.emptyList()))).get();
+            return commands.stream().map(cmd -> new CodeGenerator() {
+                @Override
+                public String getDisplayName() {
+                    return cmd.getTitle();
+                }
+
+                @Override
+                public void invoke() {
+                    try {
+                        server.getWorkspaceService().executeCommand(new ExecuteCommandParams(cmd.getCommand(), cmd.getArguments())).get();
+                    } catch (InterruptedException | ExecutionException ex) {
+                        Exceptions.printStackTrace(ex);
+                    }
+                }
+            }).collect(Collectors.toList());
+        } catch (BadLocationException | InterruptedException | ExecutionException ex) {
+            Exceptions.printStackTrace(ex);
+            return Collections.emptyList();
+        }
+    }
+    
+}
diff --git a/ide/lsp.client/src/org/netbeans/modules/lsp/client/bindings/CompletionProviderImpl.java b/ide/lsp.client/src/org/netbeans/modules/lsp/client/bindings/CompletionProviderImpl.java
new file mode 100644
index 0000000000..61d016f06a
--- /dev/null
+++ b/ide/lsp.client/src/org/netbeans/modules/lsp/client/bindings/CompletionProviderImpl.java
@@ -0,0 +1,193 @@
+/**
+ * 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.lsp.client.bindings;
+
+import java.awt.Color;
+import java.awt.Font;
+import java.awt.Graphics;
+import java.awt.event.KeyEvent;
+import java.net.URI;
+import java.util.List;
+import java.util.concurrent.CountDownLatch;
+import java.util.concurrent.ExecutionException;
+import javax.swing.Icon;
+import javax.swing.ImageIcon;
+import javax.swing.text.BadLocationException;
+import javax.swing.text.Document;
+import javax.swing.text.JTextComponent;
+import javax.swing.text.StyledDocument;
+import org.eclipse.lsp4j.CompletionItem;
+import org.eclipse.lsp4j.CompletionItemKind;
+import org.eclipse.lsp4j.CompletionList;
+import org.eclipse.lsp4j.CompletionParams;
+import org.eclipse.lsp4j.TextDocumentIdentifier;
+import org.eclipse.lsp4j.TextEdit;
+import org.eclipse.lsp4j.jsonrpc.messages.Either;
+import org.netbeans.api.editor.mimelookup.MimeRegistration;
+import org.netbeans.editor.BaseDocument;
+import org.netbeans.editor.Utilities;
+import org.netbeans.modules.editor.NbEditorUtilities;
+import org.netbeans.modules.lsp.client.LSPBindings;
+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;
+import org.netbeans.spi.editor.completion.support.CompletionUtilities;
+import org.openide.filesystems.FileObject;
+import org.openide.text.NbDocument;
+import org.openide.util.Exceptions;
+import org.openide.util.ImageUtilities;
+
+/**
+ *
+ * @author lahvac
+ */
+@MimeRegistration(mimeType="", service=CompletionProvider.class)
+public class CompletionProviderImpl implements CompletionProvider {
+
+    @Override
+    public CompletionTask createTask(int queryType, JTextComponent component) {
+        return new AsyncCompletionTask(new AsyncCompletionQuery() {
+            @Override
+            protected void query(CompletionResultSet resultSet, Document doc, int caretOffset) {
+                try {
+                    FileObject file = NbEditorUtilities.getFileObject(doc);
+                    if (file == null) {
+                        //TODO: beep
+                        return ;
+                    }
+                    LSPBindings server = LSPBindings.getBindings(file);
+                    if (server == null) {
+                        return ;
+                    }
+                    URI uri = file.toURI();
+                    CompletionParams params;
+                    params = new CompletionParams(new TextDocumentIdentifier(uri.toString()),
+                            Utils.createPosition(doc, caretOffset));
+                    CountDownLatch l = new CountDownLatch(1);
+                    //TODO: Location or Location[]
+                    Either<List<CompletionItem>, CompletionList> completionResult = server.getTextDocumentService().completion(params).get();
+                    List<CompletionItem> items;
+                    boolean incomplete;
+                    if (completionResult.isLeft()) {
+                        items = completionResult.getLeft();
+                        incomplete = true;
+                    } else {
+                        items = completionResult.getRight().getItems();
+                        incomplete = completionResult.getRight().isIncomplete();
+                    }
+                    for (CompletionItem i : items) {
+                        String insert = i.getInsertText() != null ? i.getInsertText() : i.getLabel();
+                        CompletionItemKind kind = i.getKind();
+                        Icon ic = Icons.getCompletionIcon(kind);
+                        ImageIcon icon = new ImageIcon(ImageUtilities.icon2Image(ic));
+                        resultSet.addItem(new org.netbeans.spi.editor.completion.CompletionItem() {
+                            @Override
+                            public void defaultAction(JTextComponent jtc) {
+                                Document doc = jtc.getDocument();
+                                TextEdit te = i.getTextEdit();
+                                if (te != null) {
+                                    int start = Utils.getOffset(doc, te.getRange().getStart());
+                                    int end = Utils.getOffset(doc, te.getRange().getEnd());
+                                    NbDocument.runAtomic((StyledDocument) doc, () -> {
+                                        try {
+                                            doc.remove(start, end - start);
+                                            doc.insertString(start, te.getNewText(), null);
+                                        } catch (BadLocationException ex) {
+                                            Exceptions.printStackTrace(ex);
+                                        }
+                                    });
+                                } else {
+                                    String toAdd = i.getInsertText();
+                                    if (toAdd == null) {
+                                        toAdd = i.getLabel();
+                                    }
+                                    try {
+                                        int offset = jtc.getCaretPosition();
+                                        String ident = Utilities.getIdentifier((BaseDocument) doc, offset);
+                                        doc.insertString(offset, toAdd.substring(ident != null ? ident.length() : 0), null);
+                                    } catch (BadLocationException ex) {
+                                        Exceptions.printStackTrace(ex);
+                                    }
+                                }
+                            }
+
+                            @Override
+                            public void processKeyEvent(KeyEvent ke) {
+                            }
+
+                            @Override
+                            public int getPreferredWidth(Graphics grphcs, Font font) {
+                                return CompletionUtilities.getPreferredWidth(insert, null, grphcs, font);
+                            }
+
+                            @Override
+                            public void render(Graphics grphcs, Font font, Color color, Color color1, int i, int i1, boolean bln) {
+                                CompletionUtilities.renderHtml(icon, insert, null, grphcs, font, color, i, i1, bln);
+                            }
+
+                            @Override
+                            public CompletionTask createDocumentationTask() {
+                                return null;
+                            }
+
+                            @Override
+                            public CompletionTask createToolTipTask() {
+                                return null;
+                            }
+
+                            @Override
+                            public boolean instantSubstitution(JTextComponent jtc) {
+                                return false;
+                            }
+
+                            @Override
+                            public int getSortPriority() {
+                                return 100;
+                            }
+
+                            @Override
+                            public CharSequence getSortText() {
+                                return i.getSortText();
+                            }
+
+                            @Override
+                            public CharSequence getInsertPrefix() {
+                                return insert;
+                            }
+                        });
+                    }
+                } catch (BadLocationException | InterruptedException ex) {
+                    Exceptions.printStackTrace(ex);
+                } catch (ExecutionException ex) {
+                    Exceptions.printStackTrace(ex);
+                } finally {
+                    resultSet.finish();
+                }
+            }
+        }, component);
+    }
+
+    @Override
+    public int getAutoQueryTypes(JTextComponent component, String typedText) {
+        return 0; //TODO: implement trigger characters, if any?
+    }
+    
+}
diff --git a/ide/lsp.client/src/org/netbeans/modules/lsp/client/bindings/HyperlinkProviderImpl.java b/ide/lsp.client/src/org/netbeans/modules/lsp/client/bindings/HyperlinkProviderImpl.java
new file mode 100644
index 0000000000..4c79aa1522
--- /dev/null
+++ b/ide/lsp.client/src/org/netbeans/modules/lsp/client/bindings/HyperlinkProviderImpl.java
@@ -0,0 +1,136 @@
+/**
+ * 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.lsp.client.bindings;
+
+import java.net.MalformedURLException;
+import java.net.URI;
+import java.util.EnumSet;
+import java.util.List;
+import java.util.Set;
+import java.util.concurrent.CompletableFuture;
+import java.util.concurrent.ExecutionException;
+import javax.swing.SwingUtilities;
+import javax.swing.text.BadLocationException;
+import javax.swing.text.Document;
+import org.eclipse.lsp4j.Location;
+import org.eclipse.lsp4j.TextDocumentIdentifier;
+import org.eclipse.lsp4j.TextDocumentPositionParams;
+import org.netbeans.api.editor.mimelookup.MimeRegistration;
+import org.netbeans.editor.BaseDocument;
+import org.netbeans.editor.Utilities;
+import org.netbeans.lib.editor.hyperlink.spi.HyperlinkProviderExt;
+import org.netbeans.lib.editor.hyperlink.spi.HyperlinkType;
+import org.netbeans.modules.editor.NbEditorUtilities;
+import org.netbeans.modules.lsp.client.LSPBindings;
+import org.openide.cookies.LineCookie;
+import org.openide.filesystems.FileObject;
+import org.openide.filesystems.URLMapper;
+import org.openide.text.Line;
+import org.openide.text.Line.ShowOpenType;
+import org.openide.text.Line.ShowVisibilityType;
+import org.openide.util.Exceptions;
+
+/**
+ *
+ * @author lahvac
+ */
+@MimeRegistration(mimeType="", service=HyperlinkProviderExt.class)
+public class HyperlinkProviderImpl implements HyperlinkProviderExt {
+
+    @Override
+    public Set<HyperlinkType> getSupportedHyperlinkTypes() {
+        return EnumSet.of(HyperlinkType.GO_TO_DECLARATION);
+    }
+
+    @Override
+    public boolean isHyperlinkPoint(Document doc, int offset, HyperlinkType type) {
+        return getHyperlinkSpan(doc, offset, type) != null;
+    }
+
+    @Override
+    public int[] getHyperlinkSpan(Document doc, int offset, HyperlinkType type) {
+        try {
+            //XXX: not really using the server, are we?
+            return Utilities.getIdentifierBlock((BaseDocument) doc, offset);
+        } catch (BadLocationException ex) {
+            return null;
+        }
+    }
+
+    @Override
+    public void performClickAction(Document doc, int offset, HyperlinkType type) {
+        FileObject file = NbEditorUtilities.getFileObject(doc);
+        if (file == null) {
+            //TODO: beep
+            return ;
+        }
+        LSPBindings server = LSPBindings.getBindings(file);
+        if (server == null) {
+            return ;
+        }
+        URI uri = file.toURI();
+        try {
+            TextDocumentPositionParams params;
+            params = new TextDocumentPositionParams(new TextDocumentIdentifier(uri.toString()),
+                                                    Utils.createPosition(doc, offset));
+            //TODO: Location or Location[]
+            CompletableFuture<List<? extends Location>> def = server.getTextDocumentService().definition(params);
+            def.handleAsync((locations, exception) -> {
+                if (exception != null) {
+                    exception.printStackTrace();
+                }
+                if (locations != null && locations.size() == 1) { //TODO: what to do when there are multiple locations?
+                    try {
+                        URI target = URI.create(locations.get(0).getUri());
+                        FileObject targetFile = URLMapper.findFileObject(target.toURL());
+
+                        if (targetFile != null) {
+                            LineCookie lc = targetFile.getLookup().lookup(LineCookie.class);
+
+                            //TODO: expecting lc != null!
+
+                            Line line = lc.getLineSet().getCurrent(locations.get(0).getRange().getStart().getLine());
+
+                            SwingUtilities.invokeLater(() ->
+                                line.show(ShowOpenType.OPEN, ShowVisibilityType.FOCUS, locations.get(0).getRange().getStart().getCharacter())
+                            );
+                        } else {
+                            //TODO: beep
+                        }
+                    } catch (MalformedURLException ex) {
+                        Exceptions.printStackTrace(ex);
+                    }
+                }
+                return null;
+            }).get();
+        } catch (BadLocationException ex) {
+            Exceptions.printStackTrace(ex);
+        } catch (InterruptedException ex) {
+            Exceptions.printStackTrace(ex);
+        } catch (ExecutionException ex) {
+            Exceptions.printStackTrace(ex);
+        }
+    }
+
+    @Override
+    public String getTooltipText(Document doc, int offset, HyperlinkType type) {
+        return null;
+    }
+
+}
diff --git a/ide/lsp.client/src/org/netbeans/modules/lsp/client/bindings/Icons.java b/ide/lsp.client/src/org/netbeans/modules/lsp/client/bindings/Icons.java
new file mode 100644
index 0000000000..d2543341da
--- /dev/null
+++ b/ide/lsp.client/src/org/netbeans/modules/lsp/client/bindings/Icons.java
@@ -0,0 +1,74 @@
+/**
+ * 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.lsp.client.bindings;
+
+import java.awt.Image;
+import java.util.Locale;
+import javax.swing.Icon;
+import javax.swing.ImageIcon;
+import org.eclipse.lsp4j.CompletionItemKind;
+import org.eclipse.lsp4j.SymbolKind;
+import org.openide.util.ImageUtilities;
+
+/**
+ * Based on:
+ * java.source/src/org/netbeans/modules/java/ui/Icons.java
+ * @author Petr Hrebejk
+ */
+public final class Icons {
+
+    private static final String ICON_BASE = "org/netbeans/modules/lsp/client/bindings/icons/";
+    private static final String GIF_EXTENSION = ".gif";
+    private static final String PNG_EXTENSION = ".png";
+        
+    private Icons() {
+    }
+    
+    public static Icon getCompletionIcon(CompletionItemKind completionKind) {
+        Image img = null;
+
+        if (completionKind != null) {
+            img = ImageUtilities.loadImage(ICON_BASE + completionKind.name().toLowerCase(Locale.US) + PNG_EXTENSION);
+
+            if (img == null) {
+                img = ImageUtilities.loadImage(ICON_BASE + completionKind.name().toLowerCase(Locale.US) + GIF_EXTENSION);
+            }
+        }
+        
+        if (img == null) {
+            img = ImageUtilities.loadImage(ICON_BASE + "variable" + GIF_EXTENSION);
+        }
+        
+	return img == null ? null : new ImageIcon (img);
+        
+    }
+    
+    public static String getSymbolIconBase(SymbolKind symbolKind) {
+        for (String variant : new String[] {
+            ICON_BASE + symbolKind.name().toLowerCase(Locale.US) + PNG_EXTENSION,
+            ICON_BASE + symbolKind.name().toLowerCase(Locale.US) + GIF_EXTENSION,
+            ICON_BASE + "variable" + GIF_EXTENSION
+        }) {
+            if (ImageUtilities.loadImage(variant) != null)
+                return variant;
+        }
+        return null;
+    }
+}
diff --git a/ide/lsp.client/src/org/netbeans/modules/lsp/client/bindings/LanguageClientImpl.java b/ide/lsp.client/src/org/netbeans/modules/lsp/client/bindings/LanguageClientImpl.java
new file mode 100644
index 0000000000..4ed1fd5ed0
--- /dev/null
+++ b/ide/lsp.client/src/org/netbeans/modules/lsp/client/bindings/LanguageClientImpl.java
@@ -0,0 +1,252 @@
+/*
+ * 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.lsp.client.bindings;
+
+import java.beans.PropertyChangeListener;
+import java.beans.PropertyChangeSupport;
+import java.io.IOException;
+import java.net.MalformedURLException;
+import java.net.URI;
+import java.net.URISyntaxException;
+import java.util.Collections;
+import java.util.EnumMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Map.Entry;
+import java.util.concurrent.CompletableFuture;
+import java.util.concurrent.ExecutionException;
+import java.util.logging.Level;
+import java.util.logging.Logger;
+import java.util.stream.Collectors;
+import javax.swing.text.BadLocationException;
+import javax.swing.text.Document;
+import javax.swing.text.StyledDocument;
+import org.eclipse.lsp4j.ApplyWorkspaceEditParams;
+import org.eclipse.lsp4j.ApplyWorkspaceEditResponse;
+import org.eclipse.lsp4j.CodeActionContext;
+import org.eclipse.lsp4j.CodeActionParams;
+import org.eclipse.lsp4j.Command;
+import org.eclipse.lsp4j.Diagnostic;
+import org.eclipse.lsp4j.DiagnosticSeverity;
+import org.eclipse.lsp4j.ExecuteCommandParams;
+import org.eclipse.lsp4j.MessageActionItem;
+import org.eclipse.lsp4j.MessageParams;
+import org.eclipse.lsp4j.PublishDiagnosticsParams;
+import org.eclipse.lsp4j.ShowMessageRequestParams;
+import org.eclipse.lsp4j.TextDocumentIdentifier;
+import org.eclipse.lsp4j.TextEdit;
+import org.eclipse.lsp4j.WorkspaceEdit;
+import org.eclipse.lsp4j.services.LanguageClient;
+import org.netbeans.modules.lsp.client.LSPBindings;
+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.LazyFixList;
+import org.netbeans.spi.editor.hints.Severity;
+import org.openide.cookies.EditorCookie;
+import org.openide.filesystems.FileObject;
+import org.openide.filesystems.URLMapper;
+import org.openide.text.NbDocument;
+import org.openide.util.Exceptions;
+
+/**
+ *
+ * @author lahvac
+ */
+public class LanguageClientImpl implements LanguageClient {
+
+    private static final Logger LOG = Logger.getLogger(LanguageClientImpl.class.getName());
+
+    private LSPBindings bindings;
+
+    public void setBindings(LSPBindings bindings) {
+        this.bindings = bindings;
+    }
+
+    @Override
+    public void telemetryEvent(Object arg0) {
+        System.err.println("telemetry: " + arg0);
+    }
+
+    @Override
+    public void publishDiagnostics(PublishDiagnosticsParams pdp) {
+        try {
+            FileObject file = URLMapper.findFileObject(new URI(pdp.getUri()).toURL());
+            EditorCookie ec = file.getLookup().lookup(EditorCookie.class);
+            Document doc = ec != null ? ec.getDocument() : null;
+            if (doc == null)
+                return ; //ignore...
+            List<ErrorDescription> diags = pdp.getDiagnostics().stream().map(d -> 
+                    ErrorDescriptionFactory.createErrorDescription(severityMap.get(d.getSeverity()), d.getMessage(), new DiagnosticFixList(pdp.getUri(), d), file, Utils.getOffset(doc, d.getRange().getStart()), Utils.getOffset(doc, d.getRange().getEnd()))
+            ).collect(Collectors.toList());
+            HintsController.setErrors(doc, LanguageClientImpl.class.getName(), diags);
+        } catch (URISyntaxException | MalformedURLException ex) {
+            LOG.log(Level.FINE, null, ex);
+        }
+    }
+
+    private static final Map<DiagnosticSeverity, Severity> severityMap = new EnumMap<>(DiagnosticSeverity.class);
+    
+    static {
+        severityMap.put(DiagnosticSeverity.Error, Severity.ERROR);
+        severityMap.put(DiagnosticSeverity.Hint, Severity.HINT);
+        severityMap.put(DiagnosticSeverity.Information, Severity.HINT);
+        severityMap.put(DiagnosticSeverity.Warning, Severity.HINT);
+    }
+
+    @Override
+    public CompletableFuture<ApplyWorkspaceEditResponse> applyEdit(ApplyWorkspaceEditParams params) {
+        WorkspaceEdit edit = params.getEdit();
+        for (Entry<String, List<TextEdit>> e : edit.getChanges().entrySet()) {
+            try {
+                FileObject file = URLMapper.findFileObject(new URI(e.getKey()).toURL());
+                EditorCookie ec = file.getLookup().lookup(EditorCookie.class);
+                Document doc = ec != null ? ec.openDocument() : null;
+                if (doc == null) {
+                    continue;
+                }
+                NbDocument.runAtomic((StyledDocument) doc, () -> {
+                    e.getValue()
+                     .stream()
+                     .sorted((te1, te2) -> te1.getRange().getEnd().getLine() == te2.getRange().getEnd().getLine() ? te1.getRange().getEnd().getCharacter() - te2.getRange().getEnd().getCharacter() : te1.getRange().getEnd().getLine() - te2.getRange().getEnd().getLine())
+                     .forEach(te -> {
+                        try {
+                            int start = Utils.getOffset(doc, te.getRange().getStart());
+                            int end = Utils.getOffset(doc, te.getRange().getEnd());
+                            doc.remove(start, end - start);
+                            doc.insertString(start, te.getNewText(), null);
+                        } catch (BadLocationException ex) {
+                            Exceptions.printStackTrace(ex);
+                        }
+                     });
+                });
+            } catch (URISyntaxException | IOException ex) {
+                Exceptions.printStackTrace(ex);
+            }
+        }
+        return CompletableFuture.completedFuture(new ApplyWorkspaceEditResponse(true));
+    }
+
+    @Override
+    public void showMessage(MessageParams arg0) {
+        System.err.println("showMessage: " + arg0);
+    }
+
+    @Override
+    public CompletableFuture<MessageActionItem> showMessageRequest(ShowMessageRequestParams arg0) {
+        System.err.println("showMessageRequest");
+        return null; //???
+    }
+
+    @Override
+    public void logMessage(MessageParams arg0) {
+        System.err.println("logMessage: " + arg0);
+    }
+
+    private final class DiagnosticFixList implements LazyFixList {
+
+        private final PropertyChangeSupport pcs = new PropertyChangeSupport(this);
+        private final String fileUri;
+        private final Diagnostic diagnostic;
+        private List<Fix> fixes;
+        private boolean computing;
+        private boolean computed;
+
+        public DiagnosticFixList(String fileUri, Diagnostic diagnostic) {
+            this.fileUri = fileUri;
+            this.diagnostic = diagnostic;
+        }
+
+        @Override
+        public void addPropertyChangeListener(PropertyChangeListener l) {
+            pcs.addPropertyChangeListener(l);
+        }
+
+        @Override
+        public void removePropertyChangeListener(PropertyChangeListener l) {
+            pcs.removePropertyChangeListener(l);
+        }
+
+        @Override
+        public boolean probablyContainsFixes() {
+            return true;
+        }
+
+        @Override
+        public synchronized List<Fix> getFixes() {
+            if (!computing && !computed) {
+                computing = true;
+                bindings.runOnBackground(() -> {
+                    try {
+                        List<? extends Command> commands =
+                                bindings.getTextDocumentService().codeAction(new CodeActionParams(new TextDocumentIdentifier(fileUri),
+                                        diagnostic.getRange(),
+                                        new CodeActionContext(Collections.singletonList(diagnostic)))).get();
+                        List<Fix> fixes = commands.stream()
+                                                  .map(cmd -> new CommandBasedFix(cmd))
+                                                  .collect(Collectors.toList());
+                        synchronized (this) {
+                            this.fixes = Collections.unmodifiableList(fixes);
+                            this.computed = true;
+                            this.computing = false;
+                        }
+                        pcs.firePropertyChange(PROP_COMPUTED, null, null);
+                        pcs.firePropertyChange(PROP_FIXES, null, null);
+                    } catch (InterruptedException | ExecutionException ex) {
+                        Exceptions.printStackTrace(ex);
+                    }
+                });
+            }
+            return fixes;
+        }
+
+        @Override
+        public synchronized boolean isComputed() {
+            return computed;
+        }
+
+        private class CommandBasedFix implements Fix {
+
+            private final Command cmd;
+
+            public CommandBasedFix(Command cmd) {
+                this.cmd = cmd;
+            }
+
+            @Override
+            public String getText() {
+                return cmd.getTitle();
+            }
+
+            @Override
+            public ChangeInfo implement() throws Exception {
+                try {
+                    bindings.getWorkspaceService().executeCommand(new ExecuteCommandParams(cmd.getCommand(), cmd.getArguments())).get();
+                } catch (InterruptedException | ExecutionException ex) {
+                    Exceptions.printStackTrace(ex);
+                }
+                
+                return null;
+            }
+        }
+        
+    }
+}
diff --git a/ide/lsp.client/src/org/netbeans/modules/lsp/client/bindings/NavigatorPanelImpl.java b/ide/lsp.client/src/org/netbeans/modules/lsp/client/bindings/NavigatorPanelImpl.java
new file mode 100644
index 0000000000..bbc12f3141
--- /dev/null
+++ b/ide/lsp.client/src/org/netbeans/modules/lsp/client/bindings/NavigatorPanelImpl.java
@@ -0,0 +1,181 @@
+/*
+ * 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.lsp.client.bindings;
+
+import java.awt.BorderLayout;
+import java.net.MalformedURLException;
+import java.net.URI;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.List;
+import java.util.concurrent.ExecutionException;
+import javax.swing.JComponent;
+import javax.swing.JPanel;
+import org.eclipse.lsp4j.DocumentSymbolParams;
+import org.eclipse.lsp4j.SymbolInformation;
+import org.eclipse.lsp4j.TextDocumentIdentifier;
+import org.netbeans.modules.lsp.client.LSPBindings;
+import org.netbeans.modules.lsp.client.LSPBindings.BackgroundTask;
+import org.netbeans.spi.navigator.NavigatorPanel;
+import org.openide.explorer.ExplorerManager;
+import org.openide.explorer.view.BeanTreeView;
+import org.openide.filesystems.FileObject;
+import org.openide.filesystems.URLMapper;
+import org.openide.nodes.AbstractNode;
+import org.openide.nodes.Children;
+import org.openide.nodes.Node;
+import org.openide.util.Exceptions;
+import org.openide.util.Lookup;
+import org.openide.util.LookupEvent;
+import org.openide.util.LookupListener;
+import org.openide.util.NbBundle.Messages;
+import org.openide.util.lookup.ServiceProvider;
+
+/**
+ *
+ * @author lahvac
+ */
+public class NavigatorPanelImpl extends Children.Keys<SymbolInformation> implements NavigatorPanel, BackgroundTask, LookupListener {
+
+    private static final NavigatorPanelImpl INSTANCE = new NavigatorPanelImpl();
+
+    private final ExplorerManager manager;
+    private JComponent view;
+    private Lookup.Result<FileObject> result;
+    private FileObject file;
+
+    public NavigatorPanelImpl() {
+        manager = new ExplorerManager();
+        manager.setRootContext(new AbstractNode(this));
+    }
+
+    @Override
+    @Messages("DN_Symbols=Symbols")
+    public String getDisplayName() {
+        return Bundle.DN_Symbols();
+    }
+
+    @Override
+    public String getDisplayHint() {
+        return "symbols";
+    }
+
+    @Override
+    public JComponent getComponent() {
+        if (view == null) {
+            class View extends JPanel implements ExplorerManager.Provider {
+
+                public View() {
+                    setLayout(new BorderLayout());
+                    BeanTreeView btv = new BeanTreeView();
+                    add(btv, BorderLayout.CENTER);
+
+                    btv.setRootVisible(false);
+                }
+
+                @Override
+                public ExplorerManager getExplorerManager() {
+                    return manager;
+                }
+            }
+            view = new View();
+        }
+        return view;
+    }
+
+    @Override
+    public void panelActivated(Lookup context) {
+        result = context.lookupResult(FileObject.class);
+        result.addLookupListener(this);
+        updateFile();
+    }
+
+    @Override
+    public void panelDeactivated() {
+        result.removeLookupListener(this);
+        result = null;
+        updateFile();
+    }
+
+    private void updateFile() {
+        if (file != null) {
+            LSPBindings.removeBackgroundTask(file, this);
+            setKeys(Collections.emptyList());
+            file = null;
+        }
+        Collection<? extends FileObject> files = result != null ? result.allInstances() : Collections.emptyList();
+        file = files.isEmpty() ? null : files.iterator().next();
+        if (file != null) {
+            LSPBindings.addBackgroundTask(file, this);
+        }
+    }
+
+    @Override
+    public Lookup getLookup() {
+        return Lookup.EMPTY;
+    }
+
+    @Override
+    public void run(LSPBindings bindings, FileObject file) {
+        if (file.equals(this.file)) {
+            try {
+                List<? extends SymbolInformation> symbols = bindings.getTextDocumentService().documentSymbol(new DocumentSymbolParams(new TextDocumentIdentifier(file.toURI().toString()))).get();
+
+                setKeys(symbols);
+            } catch (InterruptedException | ExecutionException ex) {
+                Exceptions.printStackTrace(ex);
+            }
+        } else {
+            System.err.println("!!!");
+        }
+    }
+
+    @Override
+    protected Node[] createNodes(SymbolInformation sym) {
+        AbstractNode n = new AbstractNode(LEAF);
+        n.setDisplayName(sym.getName());
+        n.setIconBaseWithExtension(Icons.getSymbolIconBase(sym.getKind()));
+        return new Node[] {n};
+    }
+
+    @Override
+    public void resultChanged(LookupEvent arg0) {
+        updateFile();
+    }
+
+    @ServiceProvider(service=DynamicRegistration.class)
+    public static final class DynamicRegistrationImpl implements DynamicRegistration {
+
+        @Override
+        public Collection<? extends NavigatorPanel> panelsFor(URI uri) {
+            try {
+                FileObject file = URLMapper.findFileObject(uri.toURL());
+                if (file != null) {
+                    return LSPBindings.getBindings(file) != null ? Collections.singletonList(INSTANCE) : Collections.emptyList();
+                } else {
+                    return Collections.emptyList();
+                }
+            } catch (MalformedURLException ex) {
+                //ignore
+                return Collections.emptyList();
+            }
+        }
+
+    }
+}
diff --git a/ide/lsp.client/src/org/netbeans/modules/lsp/client/bindings/TextDocumentSyncServerCapabilityHandler.java b/ide/lsp.client/src/org/netbeans/modules/lsp/client/bindings/TextDocumentSyncServerCapabilityHandler.java
new file mode 100644
index 0000000000..c08a3b9007
--- /dev/null
+++ b/ide/lsp.client/src/org/netbeans/modules/lsp/client/bindings/TextDocumentSyncServerCapabilityHandler.java
@@ -0,0 +1,155 @@
+/**
+ * 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.lsp.client.bindings;
+
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.IdentityHashMap;
+import java.util.Set;
+import javax.swing.SwingUtilities;
+import javax.swing.event.DocumentEvent;
+import javax.swing.event.DocumentListener;
+import javax.swing.text.BadLocationException;
+import javax.swing.text.Document;
+import javax.swing.text.JTextComponent;
+import org.eclipse.lsp4j.DidChangeTextDocumentParams;
+import org.eclipse.lsp4j.DidOpenTextDocumentParams;
+import org.eclipse.lsp4j.Position;
+import org.eclipse.lsp4j.Range;
+import org.eclipse.lsp4j.TextDocumentContentChangeEvent;
+import org.eclipse.lsp4j.TextDocumentItem;
+import org.eclipse.lsp4j.VersionedTextDocumentIdentifier;
+import org.netbeans.api.editor.EditorRegistry;
+import org.netbeans.editor.BaseDocumentEvent;
+import org.netbeans.modules.editor.*;
+import org.netbeans.modules.lsp.client.LSPBindings;
+import org.openide.filesystems.FileObject;
+import org.openide.filesystems.FileUtil;
+import org.openide.modules.OnStart;
+import org.openide.util.Exceptions;
+
+/** TODO: asynchronous
+ *  TODO: follow the synchronization options
+ *  TODO: close
+ *
+ * @author lahvac
+ */
+public class TextDocumentSyncServerCapabilityHandler {
+
+    private final Set<JTextComponent> lastOpened = Collections.newSetFromMap(new IdentityHashMap<>());
+
+    private void handleChange() {
+        assert SwingUtilities.isEventDispatchThread();
+        Set<JTextComponent> currentOpened = Collections.newSetFromMap(new IdentityHashMap<>());
+        currentOpened.addAll(EditorRegistry.componentList());
+        Set<JTextComponent> newOpened = Collections.newSetFromMap(new IdentityHashMap<>());
+        newOpened.addAll(currentOpened);
+        newOpened.removeAll(lastOpened);
+        Set<JTextComponent> newClosed = Collections.newSetFromMap(new IdentityHashMap<>());
+        newClosed.addAll(lastOpened);
+        newClosed.removeAll(newOpened);
+        lastOpened.removeAll(newClosed);
+        lastOpened.addAll(newOpened);
+
+        for (JTextComponent opened : newOpened) {
+            FileObject file = NbEditorUtilities.getFileObject(opened.getDocument());
+
+            if (file == null)
+                continue; //ignore
+
+            LSPBindings server = LSPBindings.getBindings(file);
+
+            if (server == null)
+                continue; //ignore
+
+            try {
+                //XXX: should construct events outside of AWT
+                TextDocumentItem textDocumentItem = new TextDocumentItem(file.toURI().toString(),
+                                                                         FileUtil.getMIMEType(file),
+                                                                         0,
+                                                                         opened.getDocument().getText(0, opened.getDocument().getLength())); //XXX: should do in render!
+
+                server.getTextDocumentService().didOpen(new DidOpenTextDocumentParams(textDocumentItem));
+                server.scheduleBackgroundTasks(file);
+            } catch (BadLocationException ex) {
+                Exceptions.printStackTrace(ex);
+            }
+
+            Document doc = opened.getDocument();
+
+            doc.addDocumentListener(new DocumentListener() { //XXX: listener
+                int version; //XXX: proper versioning!
+                @Override
+                public void insertUpdate(DocumentEvent e) {
+                    try {
+                        fireEvent(e.getOffset(), e.getDocument().getText(e.getOffset(), e.getLength()), "");
+                    } catch (BadLocationException ex) {
+                        Exceptions.printStackTrace(ex);
+                    }
+                }
+                @Override
+                public void removeUpdate(DocumentEvent e) {
+                    fireEvent(e.getOffset(), "", ((BaseDocumentEvent) e).getText());
+                }
+                private void fireEvent(int start, String newText, String oldText) {
+                    try {
+                        Position startPos = Utils.createPosition(doc, start);
+                        int additionalLines = 0;
+                        int additionalChars = 0;
+                        for (char c : oldText.toCharArray()) {
+                            if (c == '\n') {
+                                additionalLines++;
+                                additionalChars = 0;
+                            } else {
+                                additionalChars++;
+                            }
+                        }
+                        Position endPos = new Position(startPos.getLine() + additionalLines,
+                                                       startPos.getCharacter() + additionalChars);
+                        TextDocumentContentChangeEvent event;
+                        event = new TextDocumentContentChangeEvent(new Range(startPos,
+                                                                             endPos),
+                                                                   oldText.length(),
+                                                                   newText);
+                        VersionedTextDocumentIdentifier di = new VersionedTextDocumentIdentifier(++version);
+                        di.setUri(file.toURI().toString());
+                        server.getTextDocumentService().didChange(new DidChangeTextDocumentParams(di, Arrays.asList(event)));
+                        server.scheduleBackgroundTasks(file);
+                    } catch (BadLocationException ex) {
+                        Exceptions.printStackTrace(ex);
+                    }
+                }
+                @Override
+                public void changedUpdate(DocumentEvent e) {}
+            });
+        }
+    }
+
+    @OnStart
+    public static class Init implements Runnable {
+
+        @Override
+        public void run() {
+            TextDocumentSyncServerCapabilityHandler h = new TextDocumentSyncServerCapabilityHandler();
+            EditorRegistry.addPropertyChangeListener(evt -> h.handleChange());
+            SwingUtilities.invokeLater(() -> h.handleChange());
+        }
+        
+    }
+}
diff --git a/ide/lsp.client/src/org/netbeans/modules/lsp/client/bindings/Utils.java b/ide/lsp.client/src/org/netbeans/modules/lsp/client/bindings/Utils.java
new file mode 100644
index 0000000000..ca0c7d9ff3
--- /dev/null
+++ b/ide/lsp.client/src/org/netbeans/modules/lsp/client/bindings/Utils.java
@@ -0,0 +1,41 @@
+/**
+ * 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.lsp.client.bindings;
+
+import javax.swing.text.BadLocationException;
+import javax.swing.text.Document;
+import org.eclipse.lsp4j.Position;
+import org.netbeans.api.editor.document.LineDocument;
+import org.netbeans.api.editor.document.LineDocumentUtils;
+
+/**
+ *
+ * @author lahvac
+ */
+public class Utils {
+
+    public static Position createPosition(Document doc, int offset) throws BadLocationException {
+         return new Position(LineDocumentUtils.getLineIndex((LineDocument) doc, offset),
+                             offset - LineDocumentUtils.getLineStart((LineDocument) doc, offset));
+    }
+
+    public static int getOffset(Document doc, Position pos) {
+        return LineDocumentUtils.getLineStartFromIndex((LineDocument) doc, pos.getLine()) + pos.getCharacter();
+    }
+}
diff --git a/ide/lsp.client/src/org/netbeans/modules/lsp/client/bindings/icons/attribute.png b/ide/lsp.client/src/org/netbeans/modules/lsp/client/bindings/icons/attribute.png
new file mode 100644
index 0000000000..610dbab206
Binary files /dev/null and b/ide/lsp.client/src/org/netbeans/modules/lsp/client/bindings/icons/attribute.png differ
diff --git a/ide/lsp.client/src/org/netbeans/modules/lsp/client/bindings/icons/class.png b/ide/lsp.client/src/org/netbeans/modules/lsp/client/bindings/icons/class.png
new file mode 100644
index 0000000000..220e6f385e
Binary files /dev/null and b/ide/lsp.client/src/org/netbeans/modules/lsp/client/bindings/icons/class.png differ
diff --git a/ide/lsp.client/src/org/netbeans/modules/lsp/client/bindings/icons/color.gif b/ide/lsp.client/src/org/netbeans/modules/lsp/client/bindings/icons/color.gif
new file mode 100644
index 0000000000..6703356263
Binary files /dev/null and b/ide/lsp.client/src/org/netbeans/modules/lsp/client/bindings/icons/color.gif differ
diff --git a/ide/lsp.client/src/org/netbeans/modules/lsp/client/bindings/icons/constant.png b/ide/lsp.client/src/org/netbeans/modules/lsp/client/bindings/icons/constant.png
new file mode 100644
index 0000000000..aa01646d69
Binary files /dev/null and b/ide/lsp.client/src/org/netbeans/modules/lsp/client/bindings/icons/constant.png differ
diff --git a/ide/lsp.client/src/org/netbeans/modules/lsp/client/bindings/icons/constructor.png b/ide/lsp.client/src/org/netbeans/modules/lsp/client/bindings/icons/constructor.png
new file mode 100644
index 0000000000..fd95f9d197
Binary files /dev/null and b/ide/lsp.client/src/org/netbeans/modules/lsp/client/bindings/icons/constructor.png differ
diff --git a/ide/lsp.client/src/org/netbeans/modules/lsp/client/bindings/icons/enum.png b/ide/lsp.client/src/org/netbeans/modules/lsp/client/bindings/icons/enum.png
new file mode 100644
index 0000000000..f54c89b9cf
Binary files /dev/null and b/ide/lsp.client/src/org/netbeans/modules/lsp/client/bindings/icons/enum.png differ
diff --git a/ide/lsp.client/src/org/netbeans/modules/lsp/client/bindings/icons/enummember.png b/ide/lsp.client/src/org/netbeans/modules/lsp/client/bindings/icons/enummember.png
new file mode 100644
index 0000000000..06a86fb1d9
Binary files /dev/null and b/ide/lsp.client/src/org/netbeans/modules/lsp/client/bindings/icons/enummember.png differ
diff --git a/ide/lsp.client/src/org/netbeans/modules/lsp/client/bindings/icons/event.png b/ide/lsp.client/src/org/netbeans/modules/lsp/client/bindings/icons/event.png
new file mode 100644
index 0000000000..cf556834a8
Binary files /dev/null and b/ide/lsp.client/src/org/netbeans/modules/lsp/client/bindings/icons/event.png differ
diff --git a/ide/lsp.client/src/org/netbeans/modules/lsp/client/bindings/icons/field.png b/ide/lsp.client/src/org/netbeans/modules/lsp/client/bindings/icons/field.png
new file mode 100644
index 0000000000..06a86fb1d9
Binary files /dev/null and b/ide/lsp.client/src/org/netbeans/modules/lsp/client/bindings/icons/field.png differ
diff --git a/ide/lsp.client/src/org/netbeans/modules/lsp/client/bindings/icons/file.png b/ide/lsp.client/src/org/netbeans/modules/lsp/client/bindings/icons/file.png
new file mode 100644
index 0000000000..712725a574
Binary files /dev/null and b/ide/lsp.client/src/org/netbeans/modules/lsp/client/bindings/icons/file.png differ
diff --git a/ide/lsp.client/src/org/netbeans/modules/lsp/client/bindings/icons/folder.gif b/ide/lsp.client/src/org/netbeans/modules/lsp/client/bindings/icons/folder.gif
new file mode 100644
index 0000000000..bc77c8d13e
Binary files /dev/null and b/ide/lsp.client/src/org/netbeans/modules/lsp/client/bindings/icons/folder.gif differ
diff --git a/ide/lsp.client/src/org/netbeans/modules/lsp/client/bindings/icons/function.png b/ide/lsp.client/src/org/netbeans/modules/lsp/client/bindings/icons/function.png
new file mode 100644
index 0000000000..7be8a378a3
Binary files /dev/null and b/ide/lsp.client/src/org/netbeans/modules/lsp/client/bindings/icons/function.png differ
diff --git a/ide/lsp.client/src/org/netbeans/modules/lsp/client/bindings/icons/interface.png b/ide/lsp.client/src/org/netbeans/modules/lsp/client/bindings/icons/interface.png
new file mode 100644
index 0000000000..ae582f77a8
Binary files /dev/null and b/ide/lsp.client/src/org/netbeans/modules/lsp/client/bindings/icons/interface.png differ
diff --git a/ide/lsp.client/src/org/netbeans/modules/lsp/client/bindings/icons/keyword.png b/ide/lsp.client/src/org/netbeans/modules/lsp/client/bindings/icons/keyword.png
new file mode 100644
index 0000000000..beca697f92
Binary files /dev/null and b/ide/lsp.client/src/org/netbeans/modules/lsp/client/bindings/icons/keyword.png differ
diff --git a/ide/lsp.client/src/org/netbeans/modules/lsp/client/bindings/icons/method.png b/ide/lsp.client/src/org/netbeans/modules/lsp/client/bindings/icons/method.png
new file mode 100644
index 0000000000..7be8a378a3
Binary files /dev/null and b/ide/lsp.client/src/org/netbeans/modules/lsp/client/bindings/icons/method.png differ
diff --git a/ide/lsp.client/src/org/netbeans/modules/lsp/client/bindings/icons/module.png b/ide/lsp.client/src/org/netbeans/modules/lsp/client/bindings/icons/module.png
new file mode 100644
index 0000000000..505f4b7f81
Binary files /dev/null and b/ide/lsp.client/src/org/netbeans/modules/lsp/client/bindings/icons/module.png differ
diff --git a/ide/lsp.client/src/org/netbeans/modules/lsp/client/bindings/icons/operator.png b/ide/lsp.client/src/org/netbeans/modules/lsp/client/bindings/icons/operator.png
new file mode 100644
index 0000000000..7be8a378a3
Binary files /dev/null and b/ide/lsp.client/src/org/netbeans/modules/lsp/client/bindings/icons/operator.png differ
diff --git a/ide/lsp.client/src/org/netbeans/modules/lsp/client/bindings/icons/property.png b/ide/lsp.client/src/org/netbeans/modules/lsp/client/bindings/icons/property.png
new file mode 100644
index 0000000000..06a86fb1d9
Binary files /dev/null and b/ide/lsp.client/src/org/netbeans/modules/lsp/client/bindings/icons/property.png differ
diff --git a/ide/lsp.client/src/org/netbeans/modules/lsp/client/bindings/icons/reference.png b/ide/lsp.client/src/org/netbeans/modules/lsp/client/bindings/icons/reference.png
new file mode 100644
index 0000000000..290ae36661
Binary files /dev/null and b/ide/lsp.client/src/org/netbeans/modules/lsp/client/bindings/icons/reference.png differ
diff --git a/ide/lsp.client/src/org/netbeans/modules/lsp/client/bindings/icons/snippet.png b/ide/lsp.client/src/org/netbeans/modules/lsp/client/bindings/icons/snippet.png
new file mode 100644
index 0000000000..b56c19cee5
Binary files /dev/null and b/ide/lsp.client/src/org/netbeans/modules/lsp/client/bindings/icons/snippet.png differ
diff --git a/ide/lsp.client/src/org/netbeans/modules/lsp/client/bindings/icons/struct.png b/ide/lsp.client/src/org/netbeans/modules/lsp/client/bindings/icons/struct.png
new file mode 100644
index 0000000000..220e6f385e
Binary files /dev/null and b/ide/lsp.client/src/org/netbeans/modules/lsp/client/bindings/icons/struct.png differ
diff --git a/ide/lsp.client/src/org/netbeans/modules/lsp/client/bindings/icons/text.png b/ide/lsp.client/src/org/netbeans/modules/lsp/client/bindings/icons/text.png
new file mode 100644
index 0000000000..b56c19cee5
Binary files /dev/null and b/ide/lsp.client/src/org/netbeans/modules/lsp/client/bindings/icons/text.png differ
diff --git a/ide/lsp.client/src/org/netbeans/modules/lsp/client/bindings/icons/typeparameter.gif b/ide/lsp.client/src/org/netbeans/modules/lsp/client/bindings/icons/typeparameter.gif
new file mode 100644
index 0000000000..50971fb74a
Binary files /dev/null and b/ide/lsp.client/src/org/netbeans/modules/lsp/client/bindings/icons/typeparameter.gif differ
diff --git a/ide/lsp.client/src/org/netbeans/modules/lsp/client/bindings/icons/unit.png b/ide/lsp.client/src/org/netbeans/modules/lsp/client/bindings/icons/unit.png
new file mode 100644
index 0000000000..505f4b7f81
Binary files /dev/null and b/ide/lsp.client/src/org/netbeans/modules/lsp/client/bindings/icons/unit.png differ
diff --git a/ide/lsp.client/src/org/netbeans/modules/lsp/client/bindings/icons/value.png b/ide/lsp.client/src/org/netbeans/modules/lsp/client/bindings/icons/value.png
new file mode 100644
index 0000000000..8c18e6b4a8
Binary files /dev/null and b/ide/lsp.client/src/org/netbeans/modules/lsp/client/bindings/icons/value.png differ
diff --git a/ide/lsp.client/src/org/netbeans/modules/lsp/client/bindings/icons/variable.gif b/ide/lsp.client/src/org/netbeans/modules/lsp/client/bindings/icons/variable.gif
new file mode 100644
index 0000000000..50971fb74a
Binary files /dev/null and b/ide/lsp.client/src/org/netbeans/modules/lsp/client/bindings/icons/variable.gif differ
diff --git a/ide/lsp.client/src/org/netbeans/modules/lsp/client/spi/LanguageServerProvider.java b/ide/lsp.client/src/org/netbeans/modules/lsp/client/spi/LanguageServerProvider.java
new file mode 100644
index 0000000000..52826170d1
--- /dev/null
+++ b/ide/lsp.client/src/org/netbeans/modules/lsp/client/spi/LanguageServerProvider.java
@@ -0,0 +1,92 @@
+/*
+ * 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.lsp.client.spi;
+
+import java.io.InputStream;
+import java.io.OutputStream;
+import org.netbeans.api.annotations.common.CheckForNull;
+import org.netbeans.api.annotations.common.NonNull;
+import org.netbeans.api.annotations.common.NullAllowed;
+import org.netbeans.modules.lsp.client.LanguageServerProviderAccessor;
+import org.openide.util.Lookup;
+
+/**
+ * Possibly start a language server. Should be installed in the Mime Lookup for the
+ * given mime type that is handled by the given server.
+ *
+ * @author lahvac
+ */
+public interface LanguageServerProvider {
+    /**Possibly start a language server. {@code lookup} contains additional
+     * information. May return null, meaning no server was started.
+     *
+     * @param lookup additional information
+     * @return a description of the running language server handling requests for
+     *         the given mime type, or null if not handled.
+     */
+    public @CheckForNull LanguageServerDescription startServer(@NonNull Lookup lookup);
+
+    /**
+     * A description of a running language server.
+     */
+    public static final class LanguageServerDescription {
+
+        /**
+         * Create the description of a running language server.
+         *
+         * @param in the InputStream that should be used to communicate with the server
+         * @param out the OutputStream that should be used to communicate with the server
+         * @param process the process of the running language server, or null if none.
+         * @return an instance of LanguageServerDescription
+         */
+        public static @NonNull LanguageServerDescription create(@NonNull InputStream in, @NonNull OutputStream out, @NullAllowed Process process) {
+            return new LanguageServerDescription(in, out, process);
+        }
+
+        private final InputStream in;
+        private final OutputStream out;
+        private final Process process;
+
+        private LanguageServerDescription(InputStream in, OutputStream out, Process process) {
+            this.in = in;
+            this.out = out;
+            this.process = process;
+        }
+
+        static {
+            LanguageServerProviderAccessor.setINSTANCE(new LanguageServerProviderAccessor() {
+                @Override
+                public InputStream getInputStream(LanguageServerDescription desc) {
+                    return desc.in;
+                }
+
+                @Override
+                public OutputStream getOutputStream(LanguageServerDescription desc) {
+                    return desc.out;
+                }
+
+                @Override
+                public Process getProcess(LanguageServerDescription desc) {
+                    return desc.process;
+                }
+            });
+        }
+
+    }
+}
diff --git a/ide/spi.navigator/apichanges.xml b/ide/spi.navigator/apichanges.xml
index 777ba8a291..89832a219c 100644
--- a/ide/spi.navigator/apichanges.xml
+++ b/ide/spi.navigator/apichanges.xml
@@ -83,6 +83,21 @@ is the proper place.
     <!-- ACTUAL CHANGES BEGIN HERE: -->
 
   <changes>
+    <change id="NavigatorPanelDynamicRegistration">
+        <api name="navigator_api"/>
+        <summary>Added SPI interface <code>NavigatorPanel.DynamicRegistration</code></summary>
+        <version major="1" minor="41"/>
+        <date year="2018" month="8" day="14"/>
+        <author login="jlahoda"/>
+        <compatibility binary="compatible" source="compatible" deprecation="no" deletion="no" addition="yes"/>
+        <description>
+            <p>
+                Added SPI interface <code>NavigatorPanel.DynamicRegistration</code> to
+                allow dynamic registration of NavigatorPanels.
+            </p>
+        </description>
+        <class package="org.netbeans.spi.navigator" name="NavigatorPanel"/>
+    </change>
     <change id="NavigatorPanelWithToolbar">
         <api name="navigator_api"/>
         <summary>Added SPI interface <code>NavigatorPanelWithToolbar</code></summary>
diff --git a/ide/spi.navigator/manifest.mf b/ide/spi.navigator/manifest.mf
index 65c1eef362..74b9b2608c 100644
--- a/ide/spi.navigator/manifest.mf
+++ b/ide/spi.navigator/manifest.mf
@@ -2,4 +2,4 @@ Manifest-version: 1.0
 OpenIDE-Module: org.netbeans.spi.navigator/1
 OpenIDE-Module-Layer: org/netbeans/modules/navigator/resources/layer.xml
 OpenIDE-Module-Localizing-Bundle: org/netbeans/modules/navigator/resources/Bundle.properties
-OpenIDE-Module-Specification-Version: 1.40
+OpenIDE-Module-Specification-Version: 1.41
diff --git a/ide/spi.navigator/nbproject/project.properties b/ide/spi.navigator/nbproject/project.properties
index 0f4503e807..1e60860644 100644
--- a/ide/spi.navigator/nbproject/project.properties
+++ b/ide/spi.navigator/nbproject/project.properties
@@ -18,7 +18,7 @@
 is.autoload=true
 
 javac.compilerargs=-Xlint:unchecked
-javac.source=1.6
+javac.source=1.8
 javadoc.arch=${basedir}/arch.xml
 javadoc.apichanges=${basedir}/apichanges.xml
 
diff --git a/ide/spi.navigator/nbproject/project.xml b/ide/spi.navigator/nbproject/project.xml
index e0e894d9cc..d1a6e7431e 100644
--- a/ide/spi.navigator/nbproject/project.xml
+++ b/ide/spi.navigator/nbproject/project.xml
@@ -25,6 +25,15 @@
         <data xmlns="http://www.netbeans.org/ns/nb-module-project/3">
             <code-name-base>org.netbeans.spi.navigator</code-name-base>
             <module-dependencies>
+                <dependency>
+                    <code-name-base>org.netbeans.api.annotations.common</code-name-base>
+                    <build-prerequisite/>
+                    <compile-dependency/>
+                    <run-dependency>
+                        <release-version>1</release-version>
+                        <specification-version>1.30</specification-version>
+                    </run-dependency>
+                </dependency>
                 <dependency>
                     <code-name-base>org.openide.awt</code-name-base>
                     <build-prerequisite/>
@@ -58,7 +67,7 @@
                     </run-dependency>
                 </dependency>
                 <dependency>
-                    <code-name-base>org.openide.util.ui</code-name-base>
+                    <code-name-base>org.openide.util</code-name-base>
                     <build-prerequisite/>
                     <compile-dependency/>
                     <run-dependency>
@@ -66,19 +75,19 @@
                     </run-dependency>
                 </dependency>
                 <dependency>
-                    <code-name-base>org.openide.util</code-name-base>
+                    <code-name-base>org.openide.util.lookup</code-name-base>
                     <build-prerequisite/>
                     <compile-dependency/>
                     <run-dependency>
-                        <specification-version>9.3</specification-version>
+                        <specification-version>8.0</specification-version>
                     </run-dependency>
                 </dependency>
                 <dependency>
-                    <code-name-base>org.openide.util.lookup</code-name-base>
+                    <code-name-base>org.openide.util.ui</code-name-base>
                     <build-prerequisite/>
                     <compile-dependency/>
                     <run-dependency>
-                        <specification-version>8.0</specification-version>
+                        <specification-version>9.3</specification-version>
                     </run-dependency>
                 </dependency>
                 <dependency>
diff --git a/ide/spi.navigator/src/org/netbeans/modules/navigator/NavigatorController.java b/ide/spi.navigator/src/org/netbeans/modules/navigator/NavigatorController.java
index f9b1f9ad30..e6e2b6c14f 100644
--- a/ide/spi.navigator/src/org/netbeans/modules/navigator/NavigatorController.java
+++ b/ide/spi.navigator/src/org/netbeans/modules/navigator/NavigatorController.java
@@ -555,7 +555,7 @@ private void updateTCTitle (Node[] nodes) {
 
         // search in global lookup first, they had preference
         for (NavigatorLookupHint curHint : lkpHints) {
-            Collection<? extends NavigatorPanel> providers = ProviderRegistry.getInstance().getProviders(curHint.getContentType());
+            Collection<? extends NavigatorPanel> providers = ProviderRegistry.getInstance().getProviders(curHint.getContentType(), null);
             if (providers != null && !providers.isEmpty()) {
                 if (result == null) {
                         result = new ArrayList<NavigatorPanel>(providers.size() * lkpHints.size());
@@ -590,7 +590,7 @@ private void updateTCTitle (Node[] nodes) {
             }
 
             String contentType = fo.getMIMEType();
-            Collection<? extends NavigatorPanel> providers = ProviderRegistry.getInstance().getProviders(contentType);
+            Collection<? extends NavigatorPanel> providers = ProviderRegistry.getInstance().getProviders(contentType, fo);
             if (providers == null || providers.isEmpty()) {
                 fileResult = null;
                 break;
diff --git a/ide/spi.navigator/src/org/netbeans/modules/navigator/ProviderRegistry.java b/ide/spi.navigator/src/org/netbeans/modules/navigator/ProviderRegistry.java
index 1917bdf3ff..6c85b30b57 100644
--- a/ide/spi.navigator/src/org/netbeans/modules/navigator/ProviderRegistry.java
+++ b/ide/spi.navigator/src/org/netbeans/modules/navigator/ProviderRegistry.java
@@ -19,10 +19,19 @@
 
 package org.netbeans.modules.navigator;
 
+import java.lang.ref.Reference;
+import java.lang.ref.SoftReference;
+import java.net.URI;
+import java.util.ArrayList;
 import java.util.Collection;
 import java.util.HashMap;
+import java.util.List;
 import java.util.Map;
+import java.util.WeakHashMap;
+import java.util.stream.Collectors;
 import org.netbeans.spi.navigator.NavigatorPanel;
+import org.netbeans.spi.navigator.NavigatorPanel.DynamicRegistration;
+import org.openide.filesystems.FileObject;
 import org.openide.util.Lookup;
 import org.openide.util.lookup.Lookups;
 
@@ -49,6 +58,7 @@
      * no providers. This ensures no useless repetitive searches. 
      */
     private Map<String, Collection<? extends NavigatorPanel>> contentTypes2Providers;
+    private Map<FileObject, Reference<Collection<? extends NavigatorPanel>>> file2Providers;
 
 
     /** Singleton, no external instantiation */
@@ -71,7 +81,7 @@ public static ProviderRegistry getInstance () {
      * @return Collection of providers, which implements NavigatorPanel interface.
      * Never return null, only empty List if no provider exists for given content type.
      */
-    public Collection<? extends NavigatorPanel> getProviders (String contentType) {
+    public Collection<? extends NavigatorPanel> getProviders (String contentType, FileObject file) {
         if (contentTypes2Providers == null) {
             contentTypes2Providers = new HashMap<String, Collection<? extends NavigatorPanel>>(15);
         }
@@ -81,8 +91,24 @@ public static ProviderRegistry getInstance () {
             result = loadProviders(contentType);
             contentTypes2Providers.put(contentType, result);
         }
-            
-        return result;
+        if (file != null) {
+            if (file2Providers == null) {
+                file2Providers = new WeakHashMap<>();
+            }
+            URI uri = file.toURI();
+            Reference<Collection<? extends NavigatorPanel>> fileResultRef = file2Providers.computeIfAbsent(file, f ->
+                    new SoftReference<>(Lookup.getDefault().lookupAll(DynamicRegistration.class).stream().flatMap(reg -> reg.panelsFor(uri).stream()).collect(Collectors.toList()))
+            );
+            Collection<? extends NavigatorPanel> fileResult = fileResultRef != null ? fileResultRef.get() : null;
+            if (result == null) return fileResult;
+            if (fileResult == null) return result;
+            List<NavigatorPanel> panels = new ArrayList<>();
+            panels.addAll(result);
+            panels.addAll(fileResult);
+            return panels;
+        } else {
+            return result;
+        }
     }
     
     /******* private stuff ***********/
diff --git a/ide/spi.navigator/src/org/netbeans/spi/navigator/NavigatorPanel.java b/ide/spi.navigator/src/org/netbeans/spi/navigator/NavigatorPanel.java
index 8f248e8170..01b5fea4ff 100644
--- a/ide/spi.navigator/src/org/netbeans/spi/navigator/NavigatorPanel.java
+++ b/ide/spi.navigator/src/org/netbeans/spi/navigator/NavigatorPanel.java
@@ -23,7 +23,13 @@
 import java.lang.annotation.Retention;
 import java.lang.annotation.RetentionPolicy;
 import java.lang.annotation.Target;
+import java.net.URI;
+import java.util.Collection;
 import javax.swing.JComponent;
+import org.netbeans.api.annotations.common.CheckForNull;
+import org.netbeans.api.annotations.common.NonNull;
+import org.netbeans.api.annotations.common.NullAllowed;
+import org.openide.filesystems.FileObject;
 import org.openide.util.Lookup;
 
 /** Navigation related view description.
@@ -138,4 +144,21 @@
         Registration[] value();
     }
 
+    /**
+     * Dynamically create panels for files. Register in the global lookup.
+     *
+     * @since 1.41
+     */
+    interface DynamicRegistration {
+
+        /**
+         * Dynamically create {@code NavigatorPanel}s for the given file.
+         *
+         * @param file for which the panels should be created
+         * @return a collection of {@code NavigatorPanel}s for the given file
+         *         null is allowed
+         */
+        public @CheckForNull Collection<? extends NavigatorPanel> panelsFor(@NonNull URI file);
+    }
+
 }
diff --git a/ide/spi.navigator/test/unit/src/org/netbeans/modules/navigator/ProviderRegistryTest.java b/ide/spi.navigator/test/unit/src/org/netbeans/modules/navigator/ProviderRegistryTest.java
index fd03cc7472..6528367c0f 100644
--- a/ide/spi.navigator/test/unit/src/org/netbeans/modules/navigator/ProviderRegistryTest.java
+++ b/ide/spi.navigator/test/unit/src/org/netbeans/modules/navigator/ProviderRegistryTest.java
@@ -19,11 +19,18 @@
 
 package org.netbeans.modules.navigator;
 
+import java.net.URI;
 import java.util.Collection;
+import java.util.Collections;
 import javax.swing.JComponent;
 import org.netbeans.junit.NbTestCase;
 import org.netbeans.spi.navigator.NavigatorPanel;
+import org.netbeans.spi.navigator.NavigatorPanel.DynamicRegistration;
+import org.openide.filesystems.FileObject;
+import org.openide.filesystems.FileUtil;
 import org.openide.util.Lookup;
+import org.openide.util.lookup.Lookups;
+import org.openide.util.lookup.ProxyLookup;
 
 
 /**
@@ -46,13 +53,13 @@ public void testGetProviders () throws Exception {
         ProviderRegistry providerReg = ProviderRegistry.getInstance();
         
         System.out.println("Asking for non-existent type...");
-        assertEquals(0, providerReg.getProviders("image/non_existent_type").size());
+        assertEquals(0, providerReg.getProviders("image/non_existent_type", null).size());
         
         System.out.println("Asking for non-existent class...");
-        assertEquals(0, providerReg.getProviders("text/plain").size());
+        assertEquals(0, providerReg.getProviders("text/plain", null).size());
         
         System.out.println("Asking for valid type and provider...");
-        Collection<? extends NavigatorPanel> result = providerReg.getProviders(MARVELOUS_DATA_TYPE);
+        Collection<? extends NavigatorPanel> result = providerReg.getProviders(MARVELOUS_DATA_TYPE, null);
         assertEquals(1, result.size());
         NavigatorPanel np = result.iterator().next();
         assertTrue(np instanceof MarvelousDataTypeProvider);
@@ -60,6 +67,33 @@ public void testGetProviders () throws Exception {
         assertEquals(MARVELOUS_DATA_TYPE_NAME, provider.getDisplayName());
     }
     
+    public void testDynamicGetProviders () throws Exception {
+        UnitTestUtils.prepareTest(new String [] { "/org/netbeans/modules/navigator/resources/testGetProvidersLayer.xml" });
+        FileObject root = FileUtil.createMemoryFileSystem().getRoot();
+        FileObject file1 = root.createData("1");
+        FileObject file2 = root.createData("2");
+        Lookup checkingProvider = Lookups.singleton(new DynamicRegistration() {
+            @Override
+            public Collection<? extends NavigatorPanel> panelsFor(URI file) {
+                return file1.toURI().equals(file) ? Collections.singletonList(new MarvelousDataTypeProvider())
+                                                  : Collections.emptyList();
+            }
+        });
+        Lookups.executeWith(new ProxyLookup(Lookup.getDefault(), checkingProvider), () -> {
+            ProviderRegistry providerReg = ProviderRegistry.getInstance();
+
+            System.out.println("Asking for masked out file...");
+            assertEquals(0, providerReg.getProviders("image/non_existent_type", file2).size());
+
+            System.out.println("Asking for valid file...");
+            Collection<? extends NavigatorPanel> result = providerReg.getProviders("image/non_existent_type", file1);
+            assertEquals(1, result.size());
+            NavigatorPanel np = result.iterator().next();
+            assertTrue(np instanceof MarvelousDataTypeProvider);
+            MarvelousDataTypeProvider provider = (MarvelousDataTypeProvider)np;
+            assertEquals(MARVELOUS_DATA_TYPE_NAME, provider.getDisplayName());
+        });
+    }
 
     /** Dummy navigator panel provider, just to test right loading and instantiating
      * for certain data type
diff --git a/nbbuild/cluster.properties b/nbbuild/cluster.properties
index c336941944..deefb6d3f5 100644
--- a/nbbuild/cluster.properties
+++ b/nbbuild/cluster.properties
@@ -287,6 +287,7 @@ nb.cluster.ide=\
         bugtracking.bridge,\
         bugtracking.commons,\
         bugzilla,\
+        c.google.gson,\
         c.google.guava,\
         c.googlecode.javaewah.JavaEWAH,\
         c.jcraft.jsch,\
@@ -410,6 +411,7 @@ nb.cluster.ide=\
         libs.xerces,\
         localhistory,\
         localtasks,\
+        lsp.client,\
         mercurial,\
         mylyn.util,\
         notifications,\


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

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