mrward / monodevelop-language-server-addin

Language Server Protocol support for MonoDevelop and Visual Studio for Mac
MIT License
13 stars 0 forks source link

[Help] How to run the Java language client #4

Open tienhv opened 6 years ago

tienhv commented 6 years ago

Could you tell me how to run and see the language server client in action? I do not know how to run it.

Regards,

mrward commented 6 years ago

Currently you will have to build the Java language client project. Whilst the language server client addin is published to the extensions gallery the other prototype language server clients are not published. The best bet would be to build the language server client solution locally and run it.

You will need to change this path to point to wherever your MonoDevelop bin folder is:

https://github.com/mrward/monodevelop-language-server-addin/blob/master/src/build/Common.props#L4

The Java language client currently uses the Java Language server that can be installed with VS Code:

https://github.com/redhat-developer/vscode-java

Then you will probably want to set the MonoDevelop.Java project as the startup project and configure its run configuration so its .csproj.user file looks something like this:

<?xml version="1.0" encoding="utf-8"?>
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
  <PropertyGroup Condition=" '$(RunConfiguration)' == 'Default' ">
    <StartAction>Program</StartAction>
    <StartProgram>$(MDBinDir)\MonoDevelop.exe</StartProgram>
    <StartWorkingDirectory>$(MDBinDir)</StartWorkingDirectory>
    <ConsolePause>false</ConsolePause>
    <EnvironmentVariables>
      <Variable name="MONODEVELOP_DEV_ADDINS" value="${TargetDir}" />
    </EnvironmentVariables>
  </PropertyGroup>
</Project>

Then you should be able to run it with the debugger using Visual Studio for Mac or MonoDevelop.