Initial commit
This commit is contained in:
Коммит
e93126678b
|
@ -0,0 +1,24 @@
|
|||
{
|
||||
"root": true,
|
||||
"parser": "@typescript-eslint/parser",
|
||||
"parserOptions": {
|
||||
"ecmaVersion": 6,
|
||||
"sourceType": "module"
|
||||
},
|
||||
"plugins": [
|
||||
"@typescript-eslint"
|
||||
],
|
||||
"rules": {
|
||||
"@typescript-eslint/naming-convention": "warn",
|
||||
"@typescript-eslint/semi": "warn",
|
||||
"curly": "warn",
|
||||
"eqeqeq": "warn",
|
||||
"no-throw-literal": "warn",
|
||||
"semi": "off"
|
||||
},
|
||||
"ignorePatterns": [
|
||||
"out",
|
||||
"dist",
|
||||
"**/*.d.ts"
|
||||
]
|
||||
}
|
|
@ -0,0 +1,5 @@
|
|||
out
|
||||
dist
|
||||
node_modules
|
||||
.vscode-test/
|
||||
*.vsix
|
|
@ -0,0 +1,5 @@
|
|||
{
|
||||
// See http://go.microsoft.com/fwlink/?LinkId=827846
|
||||
// for the documentation about the extensions.json format
|
||||
"recommendations": ["dbaeumer.vscode-eslint", "amodio.tsl-problem-matcher"]
|
||||
}
|
|
@ -0,0 +1,35 @@
|
|||
// A launch configuration that compiles the extension and then opens it inside a new window
|
||||
// Use IntelliSense to learn about possible attributes.
|
||||
// Hover to view descriptions of existing attributes.
|
||||
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
|
||||
{
|
||||
"version": "0.2.0",
|
||||
"configurations": [
|
||||
{
|
||||
"name": "Run Extension",
|
||||
"type": "extensionHost",
|
||||
"request": "launch",
|
||||
"args": [
|
||||
"--extensionDevelopmentPath=${workspaceFolder}"
|
||||
],
|
||||
"outFiles": [
|
||||
"${workspaceFolder}/dist/**/*.js"
|
||||
],
|
||||
"preLaunchTask": "${defaultBuildTask}"
|
||||
},
|
||||
{
|
||||
"name": "Extension Tests",
|
||||
"type": "extensionHost",
|
||||
"request": "launch",
|
||||
"args": [
|
||||
"--extensionDevelopmentPath=${workspaceFolder}",
|
||||
"--extensionTestsPath=${workspaceFolder}/out/test/suite/index"
|
||||
],
|
||||
"outFiles": [
|
||||
"${workspaceFolder}/out/**/*.js",
|
||||
"${workspaceFolder}/dist/**/*.js"
|
||||
],
|
||||
"preLaunchTask": "tasks: watch-tests"
|
||||
}
|
||||
]
|
||||
}
|
|
@ -0,0 +1,13 @@
|
|||
// Place your settings in this file to overwrite default and user settings.
|
||||
{
|
||||
"files.exclude": {
|
||||
"out": false, // set this to true to hide the "out" folder with the compiled JS files
|
||||
"dist": false // set this to true to hide the "dist" folder with the compiled JS files
|
||||
},
|
||||
"search.exclude": {
|
||||
"out": true, // set this to false to include "out" folder in search results
|
||||
"dist": true // set this to false to include "dist" folder in search results
|
||||
},
|
||||
// Turn off tsc task auto detection since we have the necessary tasks as npm scripts
|
||||
"typescript.tsc.autoDetect": "off"
|
||||
}
|
|
@ -0,0 +1,43 @@
|
|||
// See https://go.microsoft.com/fwlink/?LinkId=733558
|
||||
// for the documentation about the tasks.json format
|
||||
{
|
||||
"version": "2.0.0",
|
||||
"tasks": [
|
||||
{
|
||||
"type": "npm",
|
||||
"script": "watch",
|
||||
"problemMatcher": [
|
||||
"$ts-webpack-watch",
|
||||
"$tslint-webpack-watch"
|
||||
],
|
||||
"isBackground": true,
|
||||
"presentation": {
|
||||
"reveal": "never",
|
||||
"group": "watchers"
|
||||
},
|
||||
"group": {
|
||||
"kind": "build",
|
||||
"isDefault": true
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "npm",
|
||||
"script": "watch-tests",
|
||||
"problemMatcher": "$tsc-watch",
|
||||
"isBackground": true,
|
||||
"presentation": {
|
||||
"reveal": "never",
|
||||
"group": "watchers"
|
||||
},
|
||||
"group": "build"
|
||||
},
|
||||
{
|
||||
"label": "tasks: watch-tests",
|
||||
"dependsOn": [
|
||||
"npm: watch",
|
||||
"npm: watch-tests"
|
||||
],
|
||||
"problemMatcher": []
|
||||
}
|
||||
]
|
||||
}
|
|
@ -0,0 +1,13 @@
|
|||
.vscode/**
|
||||
.vscode-test/**
|
||||
out/**
|
||||
node_modules/**
|
||||
src/**
|
||||
.gitignore
|
||||
.yarnrc
|
||||
webpack.config.js
|
||||
vsc-extension-quickstart.md
|
||||
**/tsconfig.json
|
||||
**/.eslintrc.json
|
||||
**/*.map
|
||||
**/*.ts
|
|
@ -0,0 +1,26 @@
|
|||
{
|
||||
"version": "0.2.0",
|
||||
"configurations": [
|
||||
{
|
||||
// Use IntelliSense to find out which attributes exist for C# debugging
|
||||
// Use hover for the description of the existing attributes
|
||||
// For further information visit https://github.com/OmniSharp/omnisharp-vscode/blob/master/debugger-launchjson.md
|
||||
"name": ".NET Core Launch (console)",
|
||||
"type": "coreclr",
|
||||
"request": "launch",
|
||||
"preLaunchTask": "build",
|
||||
// If you have changed target frameworks, make sure to update the program path.
|
||||
"program": "${workspaceFolder}/Avalonia.AXAML.LanguageServer/bin/Debug/net6.0/Avalonia.AXAML.LanguageServer.dll",
|
||||
"args": [],
|
||||
"cwd": "${workspaceFolder}/Avalonia.AXAML.LanguageServer",
|
||||
// For more information about the 'console' field, see https://aka.ms/VSCode-CS-LaunchJson-Console
|
||||
"console": "internalConsole",
|
||||
"stopAtEntry": false
|
||||
},
|
||||
{
|
||||
"name": ".NET Core Attach",
|
||||
"type": "coreclr",
|
||||
"request": "attach"
|
||||
}
|
||||
]
|
||||
}
|
|
@ -0,0 +1,42 @@
|
|||
{
|
||||
"version": "2.0.0",
|
||||
"tasks": [
|
||||
{
|
||||
"label": "build",
|
||||
"command": "dotnet",
|
||||
"type": "process",
|
||||
"args": [
|
||||
"build",
|
||||
"${workspaceFolder}/Avalonia.AXAML.LanguageServer/Avalonia.AXAML.LanguageServer.csproj",
|
||||
"/property:GenerateFullPaths=true",
|
||||
"/consoleloggerparameters:NoSummary"
|
||||
],
|
||||
"problemMatcher": "$msCompile"
|
||||
},
|
||||
{
|
||||
"label": "publish",
|
||||
"command": "dotnet",
|
||||
"type": "process",
|
||||
"args": [
|
||||
"publish",
|
||||
"${workspaceFolder}/Avalonia.AXAML.LanguageServer/Avalonia.AXAML.LanguageServer.csproj",
|
||||
"/property:GenerateFullPaths=true",
|
||||
"/consoleloggerparameters:NoSummary"
|
||||
],
|
||||
"problemMatcher": "$msCompile"
|
||||
},
|
||||
{
|
||||
"label": "watch",
|
||||
"command": "dotnet",
|
||||
"type": "process",
|
||||
"args": [
|
||||
"watch",
|
||||
"run",
|
||||
"${workspaceFolder}/Avalonia.AXAML.LanguageServer/Avalonia.AXAML.LanguageServer.csproj",
|
||||
"/property:GenerateFullPaths=true",
|
||||
"/consoleloggerparameters:NoSummary"
|
||||
],
|
||||
"problemMatcher": "$msCompile"
|
||||
}
|
||||
]
|
||||
}
|
|
@ -0,0 +1,34 @@
|
|||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio Version 16
|
||||
VisualStudioVersion = 16.0.30114.105
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Avalonia.AXAML.LanguageServer", "Avalonia.AXAML.LanguageServer\Avalonia.AXAML.LanguageServer.csproj", "{603EB43A-E495-43F7-ACBC-6E0170F35441}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Avalonia.Ide.CompletionEngine", "Avalonia.Ide.CompletionEngine\Avalonia.Ide.CompletionEngine.csproj", "{DC47CFF9-9811-4751-8589-3B06B62851A9}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Avalonia.Ide.CompletionEngine.DnlibMetadataProvider", "Avalonia.Ide.CompletionEngine.DnlibMetadataProvider\Avalonia.Ide.CompletionEngine.DnlibMetadataProvider.csproj", "{5FBC3652-C03D-40B9-8F97-B82BF45E882E}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
Release|Any CPU = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{603EB43A-E495-43F7-ACBC-6E0170F35441}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{603EB43A-E495-43F7-ACBC-6E0170F35441}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{603EB43A-E495-43F7-ACBC-6E0170F35441}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{603EB43A-E495-43F7-ACBC-6E0170F35441}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{DC47CFF9-9811-4751-8589-3B06B62851A9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{DC47CFF9-9811-4751-8589-3B06B62851A9}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{DC47CFF9-9811-4751-8589-3B06B62851A9}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{DC47CFF9-9811-4751-8589-3B06B62851A9}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{5FBC3652-C03D-40B9-8F97-B82BF45E882E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{5FBC3652-C03D-40B9-8F97-B82BF45E882E}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{5FBC3652-C03D-40B9-8F97-B82BF45E882E}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{5FBC3652-C03D-40B9-8F97-B82BF45E882E}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
EndGlobal
|
26
Avalonia.AXAML.LanguageServer/Avalonia.AXAML.LanguageServer/.vscode/launch.json
поставляемый
Normal file
26
Avalonia.AXAML.LanguageServer/Avalonia.AXAML.LanguageServer/.vscode/launch.json
поставляемый
Normal file
|
@ -0,0 +1,26 @@
|
|||
{
|
||||
"version": "0.2.0",
|
||||
"configurations": [
|
||||
{
|
||||
// Use IntelliSense to find out which attributes exist for C# debugging
|
||||
// Use hover for the description of the existing attributes
|
||||
// For further information visit https://github.com/OmniSharp/omnisharp-vscode/blob/master/debugger-launchjson.md
|
||||
"name": ".NET Core Launch (console)",
|
||||
"type": "coreclr",
|
||||
"request": "launch",
|
||||
"preLaunchTask": "build",
|
||||
// If you have changed target frameworks, make sure to update the program path.
|
||||
"program": "${workspaceFolder}/bin/Debug/net6.0/Avalonia.AXAML.LanguageServer.dll",
|
||||
"args": [],
|
||||
"cwd": "${workspaceFolder}",
|
||||
// For more information about the 'console' field, see https://aka.ms/VSCode-CS-LaunchJson-Console
|
||||
"console": "internalConsole",
|
||||
"stopAtEntry": false
|
||||
},
|
||||
{
|
||||
"name": ".NET Core Attach",
|
||||
"type": "coreclr",
|
||||
"request": "attach"
|
||||
}
|
||||
]
|
||||
}
|
42
Avalonia.AXAML.LanguageServer/Avalonia.AXAML.LanguageServer/.vscode/tasks.json
поставляемый
Normal file
42
Avalonia.AXAML.LanguageServer/Avalonia.AXAML.LanguageServer/.vscode/tasks.json
поставляемый
Normal file
|
@ -0,0 +1,42 @@
|
|||
{
|
||||
"version": "2.0.0",
|
||||
"tasks": [
|
||||
{
|
||||
"label": "build",
|
||||
"command": "dotnet",
|
||||
"type": "process",
|
||||
"args": [
|
||||
"build",
|
||||
"${workspaceFolder}/Avalonia.AXAML.LanguageServer.csproj",
|
||||
"/property:GenerateFullPaths=true",
|
||||
"/consoleloggerparameters:NoSummary"
|
||||
],
|
||||
"problemMatcher": "$msCompile"
|
||||
},
|
||||
{
|
||||
"label": "publish",
|
||||
"command": "dotnet",
|
||||
"type": "process",
|
||||
"args": [
|
||||
"publish",
|
||||
"${workspaceFolder}/Avalonia.AXAML.LanguageServer.csproj",
|
||||
"/property:GenerateFullPaths=true",
|
||||
"/consoleloggerparameters:NoSummary"
|
||||
],
|
||||
"problemMatcher": "$msCompile"
|
||||
},
|
||||
{
|
||||
"label": "watch",
|
||||
"command": "dotnet",
|
||||
"type": "process",
|
||||
"args": [
|
||||
"watch",
|
||||
"run",
|
||||
"${workspaceFolder}/Avalonia.AXAML.LanguageServer.csproj",
|
||||
"/property:GenerateFullPaths=true",
|
||||
"/consoleloggerparameters:NoSummary"
|
||||
],
|
||||
"problemMatcher": "$msCompile"
|
||||
}
|
||||
]
|
||||
}
|
|
@ -0,0 +1,82 @@
|
|||
using Avalonia.AXAML.LanguageServer.ProjectModel;
|
||||
using Avalonia.Ide.CompletionEngine;
|
||||
using Avalonia.Ide.CompletionEngine.DnlibMetadataProvider;
|
||||
using OmniSharp.Extensions.LanguageServer.Protocol.Models;
|
||||
using OmniSharp.Extensions.LanguageServer.Protocol.Server;
|
||||
using OmniSharp.Extensions.LanguageServer.Protocol.Server.WorkDone;
|
||||
|
||||
namespace Avalonia.AXAML.LanguageServer.AssemblyMetadata
|
||||
{
|
||||
public class AvaloniaMetadataLoader
|
||||
{
|
||||
|
||||
public AvaloniaMetadataLoader()
|
||||
{
|
||||
}
|
||||
|
||||
private async Task<Metadata> CreateMetadataForAssembly(string assemblyPath)
|
||||
{
|
||||
try
|
||||
{
|
||||
var metadataReader = new Avalonia.Ide.CompletionEngine.AssemblyMetadata.MetadataReader(new DnlibMetadataProvider());
|
||||
Metadata metadata = metadataReader.GetForTargetAssembly(assemblyPath);
|
||||
return metadata;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
//Log.Logger.Error(ex, "Error creating XAML completion metadata");
|
||||
return null;
|
||||
}
|
||||
finally
|
||||
{
|
||||
//Log.Logger.Verbose("Finished AvaloniaDesigner.CreateCompletionMetadataAsync()");
|
||||
}
|
||||
}
|
||||
|
||||
public async Task<Metadata> CreateMetadataForProject(WorkspaceProject project)
|
||||
{
|
||||
string projectName = project.Name;
|
||||
var begin = new WorkDoneProgressBegin
|
||||
{
|
||||
Title = "Avalonia",
|
||||
Message = "Loading metadata for " + projectName,
|
||||
Percentage = 0
|
||||
};
|
||||
// using IWorkDoneObserver manager = await this._languageServer.WorkDoneManager.Create(begin);
|
||||
|
||||
|
||||
var outputDllPath = project.OutputFile;
|
||||
if(outputDllPath == null)
|
||||
{
|
||||
return null;
|
||||
// manager.OnNext(new WorkDoneProgressReport
|
||||
// {
|
||||
// Message = "Failed to load metadata for " + projectName + ", building project may solve the problem",
|
||||
// Percentage = 100
|
||||
// });
|
||||
}
|
||||
|
||||
var metadata = await CreateMetadataForAssembly(outputDllPath);
|
||||
// manager.Dispose();
|
||||
|
||||
if(metadata != null)
|
||||
{
|
||||
// manager.OnNext(new WorkDoneProgressReport
|
||||
// {
|
||||
// Message = "Loaded metadata for " + projectName,
|
||||
// Percentage = 100,
|
||||
// });
|
||||
}
|
||||
else
|
||||
{
|
||||
// manager.OnNext(new WorkDoneProgressReport
|
||||
// {
|
||||
// Message = "Failed to load metadata for " + projectName,
|
||||
// Percentage = 100
|
||||
// });
|
||||
}
|
||||
|
||||
return metadata;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,37 @@
|
|||
using System.Collections.Concurrent;
|
||||
using Avalonia.AXAML.LanguageServer.ProjectModel;
|
||||
using Avalonia.Ide.CompletionEngine;
|
||||
|
||||
namespace Avalonia.AXAML.LanguageServer.AssemblyMetadata
|
||||
{
|
||||
public class AvaloniaMetadataShepard
|
||||
{
|
||||
private readonly AvaloniaMetadataLoader _metadataLoader;
|
||||
private readonly ProjectShepard _projectShepard;
|
||||
|
||||
public AvaloniaMetadataShepard(AvaloniaMetadataLoader metadataLoader, ProjectShepard projectShepard)
|
||||
{
|
||||
_metadataLoader = metadataLoader;
|
||||
_projectShepard = projectShepard;
|
||||
}
|
||||
|
||||
public ConcurrentDictionary<string, Task<Metadata>> ProjectMetadata { get; } = new ConcurrentDictionary<string, Task<Metadata>>();
|
||||
|
||||
public async Task<Metadata> GetMetadataForProject(string projectPath)
|
||||
{
|
||||
var metadataTask = await ProjectMetadata.GetOrAdd(
|
||||
projectPath,
|
||||
async n => await _metadataLoader.CreateMetadataForProject(_projectShepard.GetProject(n)));
|
||||
return metadataTask;
|
||||
}
|
||||
|
||||
internal void InvalidateMetadata(string path)
|
||||
{
|
||||
if(ProjectMetadata.TryRemove(path, out _))
|
||||
{
|
||||
// If metadata exists regenerate it
|
||||
GetMetadataForProject(path);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,38 @@
|
|||
using Avalonia.AXAML.LanguageServer.ProjectModel;
|
||||
using Avalonia.Ide.CompletionEngine;
|
||||
|
||||
namespace Avalonia.AXAML.LanguageServer.AssemblyMetadata
|
||||
{
|
||||
public class DocumentMetadataProvider
|
||||
{
|
||||
private readonly TextDocumentToProjectMapper _documentMapper;
|
||||
private readonly AvaloniaMetadataShepard _metadataRepository;
|
||||
private readonly ProjectShepard _projectShepard;
|
||||
|
||||
public DocumentMetadataProvider(
|
||||
TextDocumentToProjectMapper documentMapper,
|
||||
AvaloniaMetadataShepard metadataRepository,
|
||||
ProjectShepard projectShepard)
|
||||
{
|
||||
this._documentMapper = documentMapper;
|
||||
this._metadataRepository = metadataRepository;
|
||||
this._projectShepard = projectShepard;
|
||||
}
|
||||
|
||||
public async Task<Metadata> GetMetadataForDocument(string documentPath)
|
||||
{
|
||||
string projectPath = _documentMapper.GetProjectForDocument(documentPath);
|
||||
if (projectPath == null)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
return await this._metadataRepository.GetMetadataForProject(projectPath);
|
||||
// if (!metadataTask.IsCompletedSuccessfully)
|
||||
// {
|
||||
// return null;
|
||||
// }
|
||||
// return metadataTask.Result;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,42 @@
|
|||
using System.Collections.Concurrent;
|
||||
using Microsoft.Extensions.Logging;
|
||||
|
||||
namespace Avalonia.AXAML.LanguageServer.AssemblyMetadata
|
||||
{
|
||||
public class TextDocumentToProjectMapper
|
||||
{
|
||||
private readonly ILogger<TextDocumentToProjectMapper> _logger;
|
||||
|
||||
public TextDocumentToProjectMapper(ILogger<TextDocumentToProjectMapper> logger)
|
||||
{
|
||||
this._logger = logger;
|
||||
}
|
||||
|
||||
private ConcurrentDictionary<string, string> DocumentToCsprojMapping { get; } = new ConcurrentDictionary<string, string>();
|
||||
|
||||
public string GetProjectForDocument(string documentPath)
|
||||
{
|
||||
return DocumentToCsprojMapping.GetOrAdd(documentPath, FindProjectFor);
|
||||
}
|
||||
|
||||
private string FindProjectFor(string documentPath)
|
||||
{
|
||||
string path;
|
||||
string newPath = Path.GetDirectoryName(documentPath);
|
||||
do
|
||||
{
|
||||
path = newPath;
|
||||
string[] projects = Directory.GetFiles(path, "*.csproj");
|
||||
if (projects.Any())
|
||||
{
|
||||
return projects[0];
|
||||
}
|
||||
|
||||
newPath = Path.GetDirectoryName(path);
|
||||
}
|
||||
while (path != newPath);
|
||||
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,32 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
<PropertyGroup>
|
||||
<OutputType>Exe</OutputType>
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.Extensions.Logging" Version="*" />
|
||||
<PackageReference Include="Serilog" Version="*" />
|
||||
<PackageReference Include="Serilog.Sinks.File" Version="*" />
|
||||
<PackageReference Include="OmniSharp.Extensions.LanguageServer" Version="*" />
|
||||
<PackageReference Include="Serilog.Extensions.Logging" Version="*" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\Avalonia.Ide.CompletionEngine\Avalonia.Ide.CompletionEngine.csproj" />
|
||||
<ProjectReference Include="..\Avalonia.Ide.CompletionEngine.DnlibMetadataProvider\Avalonia.Ide.CompletionEngine.DnlibMetadataProvider.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<OutputFiles Include="$(OutputPath)\**\*.*" />
|
||||
</ItemGroup>
|
||||
|
||||
<Target Name="CustomTaskAfterBuild" AfterTargets="AfterBuild">
|
||||
<Copy
|
||||
SourceFiles="@(OutputFiles)"
|
||||
DestinationFolder="..\..\libs" />
|
||||
|
||||
<Message Text="Output files copy to ..\..\libs" />
|
||||
</Target>
|
||||
|
||||
</Project>
|
|
@ -0,0 +1,81 @@
|
|||
using Avalonia.AXAML.LanguageServer.AssemblyMetadata;
|
||||
using Avalonia.AXAML.LanguageServer.Document;
|
||||
using Avalonia.AXAML.LanguageServer.Extensions;
|
||||
using Avalonia.Ide.CompletionEngine;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using OmniSharp.Extensions.LanguageServer.Protocol.Client.Capabilities;
|
||||
using OmniSharp.Extensions.LanguageServer.Protocol.Document;
|
||||
using OmniSharp.Extensions.LanguageServer.Protocol.Models;
|
||||
|
||||
namespace Avalonia.AXAML.LanguageServer
|
||||
{
|
||||
public class AvaloniaCodeCompletionHandler : ICompletionHandler
|
||||
{
|
||||
private readonly DocumentSelector _documentSelector = new DocumentSelector(
|
||||
new DocumentFilter()
|
||||
{
|
||||
Pattern = "**/*.axaml"
|
||||
},
|
||||
new DocumentFilter()
|
||||
{
|
||||
Pattern = "**/*.xaml"
|
||||
}
|
||||
);
|
||||
private readonly ILogger<AvaloniaCodeCompletionHandler> _logger;
|
||||
private readonly TextDocumentBuffer _textDocumentBuffer;
|
||||
private readonly DocumentMetadataProvider _metadataProvider;
|
||||
|
||||
public AvaloniaCodeCompletionHandler(
|
||||
TextDocumentBuffer textDocumentBuffer,
|
||||
DocumentMetadataProvider metadataProvider,
|
||||
ILogger<AvaloniaCodeCompletionHandler> logger)
|
||||
{
|
||||
this._textDocumentBuffer = textDocumentBuffer;
|
||||
this._metadataProvider = metadataProvider;
|
||||
this._logger = logger;
|
||||
}
|
||||
|
||||
public CompletionRegistrationOptions GetRegistrationOptions(
|
||||
CompletionCapability capability,
|
||||
ClientCapabilities clientCapabilities)
|
||||
{
|
||||
this._logger.LogInformation("GetRegistrationOptions method");
|
||||
|
||||
return new CompletionRegistrationOptions
|
||||
{
|
||||
DocumentSelector = _documentSelector,
|
||||
ResolveProvider = false
|
||||
};
|
||||
}
|
||||
|
||||
public async Task<CompletionList> Handle(
|
||||
CompletionParams request,
|
||||
CancellationToken cancellationToken)
|
||||
{
|
||||
var documentPath = request.TextDocument.Uri.ToUri().LocalPath;
|
||||
|
||||
var buffer = this._textDocumentBuffer.GetBuffer(request.TextDocument.Uri);
|
||||
if (buffer == null)
|
||||
{
|
||||
return new CompletionList();
|
||||
}
|
||||
|
||||
var metadata = await this._metadataProvider.GetMetadataForDocument(documentPath);
|
||||
if(metadata == null)
|
||||
{
|
||||
return new CompletionList();
|
||||
}
|
||||
|
||||
var position = buffer.AsSpan().PositionToOffset(request.Position);
|
||||
var completionResult = new CompletionEngine()
|
||||
.GetCompletions(metadata, buffer.ToString(), position);
|
||||
|
||||
if (completionResult == null)
|
||||
{
|
||||
return new CompletionList();
|
||||
}
|
||||
|
||||
return completionResult.ToCompletionList(request.Position, buffer);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,20 @@
|
|||
using System.Text;
|
||||
using OmniSharp.Extensions.LanguageServer.Protocol;
|
||||
using OmniSharp.Extensions.LanguageServer.Protocol.Models;
|
||||
|
||||
namespace Avalonia.AXAML.LanguageServer.Document
|
||||
{
|
||||
internal class Buffer
|
||||
{
|
||||
public StringBuilder Data { get; } = new StringBuilder();
|
||||
public DocumentUri Url { get; }
|
||||
public int Version { get; }
|
||||
|
||||
public Buffer(OptionalVersionedTextDocumentIdentifier id, string initialString)
|
||||
{
|
||||
Data.Append(initialString);
|
||||
Url = id.Uri;
|
||||
Version = (int)id.Version;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,22 @@
|
|||
using Avalonia.Ide.CompletionEngine;
|
||||
|
||||
namespace Avalonia.AXAML.LanguageServer.Document
|
||||
{
|
||||
public class TextChangeAdapter : ITextChange
|
||||
{
|
||||
public int NewPosition { get; }
|
||||
|
||||
public string NewText { get; }
|
||||
|
||||
public int OldPosition { get; }
|
||||
|
||||
public string OldText { get; }
|
||||
|
||||
public TextChangeAdapter(int position, string newText, string oldText)
|
||||
{
|
||||
NewPosition = OldPosition = position;
|
||||
NewText = newText;
|
||||
OldText = oldText;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,36 @@
|
|||
using System.Collections.Concurrent;
|
||||
using OmniSharp.Extensions.LanguageServer.Protocol;
|
||||
using OmniSharp.Extensions.LanguageServer.Protocol.Models;
|
||||
|
||||
namespace Avalonia.AXAML.LanguageServer.Document
|
||||
{
|
||||
public class TextDocumentBuffer
|
||||
{
|
||||
private ConcurrentDictionary<DocumentUri, Buffer> _buffers = new ConcurrentDictionary<DocumentUri, Buffer>();
|
||||
|
||||
public void CreateBuffer(OptionalVersionedTextDocumentIdentifier id, string data)
|
||||
{
|
||||
_buffers[id.Uri] = new Buffer(id, data);
|
||||
}
|
||||
|
||||
public void UpdateBuffer(OptionalVersionedTextDocumentIdentifier id, int position, string newText, int charactersToRemove = 0)
|
||||
{
|
||||
if(!_buffers.TryGetValue(id.Uri, out var buffer))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if(charactersToRemove > 0)
|
||||
{
|
||||
buffer.Data.Remove(position, charactersToRemove);
|
||||
}
|
||||
|
||||
buffer.Data.Insert(position, newText);
|
||||
}
|
||||
|
||||
public string GetBuffer(TextDocumentIdentifier id)
|
||||
{
|
||||
return _buffers.TryGetValue(id.Uri, out var buffer) ? buffer.Data.ToString() : "";
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,92 @@
|
|||
using Avalonia.Ide.CompletionEngine;
|
||||
using OmniSharp.Extensions.LanguageServer.Protocol.Models;
|
||||
|
||||
namespace Avalonia.AXAML.LanguageServer.Extensions
|
||||
{
|
||||
public static class CompletionSetExtensions
|
||||
{
|
||||
public static CompletionList ToCompletionList(
|
||||
this CompletionSet completionSet,
|
||||
Position position,
|
||||
string buffer)
|
||||
{
|
||||
var mappedCompletionList = new List<CompletionItem>();
|
||||
|
||||
for (int i = 0; i < completionSet.Completions.Count; i++)
|
||||
{
|
||||
var completion = MapCompletions(
|
||||
completionSet.Completions[i],
|
||||
completionSet.StartPosition,
|
||||
position,
|
||||
i.ToString().PadLeft(10,'0'),
|
||||
buffer);
|
||||
mappedCompletionList.Add(completion);
|
||||
}
|
||||
|
||||
return new CompletionList(mappedCompletionList);
|
||||
}
|
||||
|
||||
private static CompletionItem MapCompletions(
|
||||
Completion completion,
|
||||
int startOffset,
|
||||
Position position,
|
||||
string sortText,
|
||||
string buffer)
|
||||
{
|
||||
Position startPosition = buffer.AsSpan().OffsetToPosition(startOffset); // Utils.OffsetToPosition(startOffset, buffer);
|
||||
|
||||
TextEdit edit = new TextEdit()
|
||||
{
|
||||
NewText = completion.InsertText,
|
||||
Range = new OmniSharp.Extensions.LanguageServer.Protocol.Models.Range(startPosition, position)
|
||||
};
|
||||
|
||||
CompletionItem item = new CompletionItem()
|
||||
{
|
||||
Kind = MapKind(completion.Kind),
|
||||
Label = completion.DisplayText,
|
||||
Detail = completion.DisplayText,
|
||||
Documentation = completion.Description,
|
||||
TextEdit = edit,
|
||||
InsertTextFormat = completion.RecommendedCursorOffset == null ? InsertTextFormat.PlainText : InsertTextFormat.Snippet,
|
||||
SortText = sortText
|
||||
};
|
||||
|
||||
if (completion.RecommendedCursorOffset != null)
|
||||
{
|
||||
edit.NewText.Insert(completion.RecommendedCursorOffset.Value, "$0");
|
||||
// edit.NewText = edit.NewText.Insert(completion.RecommendedCursorOffset.Value, "$0");
|
||||
// item.InsertTextFormat = InsertTextFormat.Snippet;
|
||||
}
|
||||
|
||||
return item;
|
||||
}
|
||||
|
||||
public static CompletionItemKind MapKind(CompletionKind kind)
|
||||
{
|
||||
switch(kind)
|
||||
{
|
||||
case CompletionKind.Class:
|
||||
return CompletionItemKind.Class;
|
||||
case CompletionKind.Property:
|
||||
return CompletionItemKind.Property;
|
||||
case CompletionKind.AttachedProperty:
|
||||
return CompletionItemKind.Property;
|
||||
case CompletionKind.StaticProperty:
|
||||
return CompletionItemKind.Property;
|
||||
case CompletionKind.Namespace:
|
||||
return CompletionItemKind.Module;
|
||||
case CompletionKind.Enum:
|
||||
return CompletionItemKind.Enum;
|
||||
case CompletionKind.MarkupExtension:
|
||||
return CompletionItemKind.Function;
|
||||
case CompletionKind.Event:
|
||||
return CompletionItemKind.Event;
|
||||
case CompletionKind.AttachedEvent:
|
||||
return CompletionItemKind.Event;
|
||||
default:
|
||||
return CompletionItemKind.Text;
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,104 @@
|
|||
using OmniSharp.Extensions.LanguageServer.Protocol.Models;
|
||||
|
||||
namespace Avalonia.AXAML.LanguageServer.Extensions
|
||||
{
|
||||
public static class ReadOnlySpanOfCharExtensions
|
||||
{
|
||||
public static int PositionToOffset(this ReadOnlySpan<char> data, Position position)
|
||||
{
|
||||
return data.PositionToOffset(position.Line, position.Character);
|
||||
}
|
||||
|
||||
public static Position OffsetToPosition(this ReadOnlySpan<char> data, int offset)
|
||||
{
|
||||
int character = 0;
|
||||
int line = 0;
|
||||
|
||||
if (offset != 0 && data.Length < offset)
|
||||
{
|
||||
offset = data.Length - 1;
|
||||
}
|
||||
|
||||
void NewLine()
|
||||
{
|
||||
line++;
|
||||
character = 0;
|
||||
}
|
||||
|
||||
int i = 0;
|
||||
for (; i < offset; i++)
|
||||
{
|
||||
if (data[i] == '\n')
|
||||
{
|
||||
NewLine();
|
||||
}
|
||||
else if (data[i] == '\r')
|
||||
{
|
||||
bool hasRn = i + 1 < data.Length && data[i + 1] == '\n';
|
||||
if (hasRn)
|
||||
{
|
||||
i++;
|
||||
}
|
||||
NewLine();
|
||||
}
|
||||
else
|
||||
{
|
||||
character++;
|
||||
}
|
||||
}
|
||||
|
||||
return new Position(line, character);
|
||||
}
|
||||
|
||||
public static int PositionToOffset(this ReadOnlySpan<char> data, int line, int character)
|
||||
{
|
||||
int position = 0;
|
||||
for (int i = 0; i < line; i++)
|
||||
{
|
||||
position = data.FindNextLine(position);
|
||||
}
|
||||
position += character;
|
||||
return position;
|
||||
}
|
||||
|
||||
private static int FindNextLine(this ReadOnlySpan<char> data, int position)
|
||||
{
|
||||
while (position < data.Length)
|
||||
{
|
||||
if (data[position] == '\n')
|
||||
{
|
||||
position++;
|
||||
return position;
|
||||
}
|
||||
else if (data[position] == '\r')
|
||||
{
|
||||
bool foundRN = false;
|
||||
if (data.Length > position + 1)
|
||||
{
|
||||
if (data[position + 1] == '\n')
|
||||
{
|
||||
foundRN = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (foundRN)
|
||||
{
|
||||
position += 2;
|
||||
return position;
|
||||
}
|
||||
else
|
||||
{
|
||||
position += 1;
|
||||
return position;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
position += 1;
|
||||
}
|
||||
}
|
||||
|
||||
return position;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,18 @@
|
|||
using MediatR;
|
||||
using OmniSharp.Extensions.LanguageServer.Protocol.Client.Capabilities;
|
||||
using OmniSharp.Extensions.LanguageServer.Protocol.Models;
|
||||
using OmniSharp.Extensions.LanguageServer.Protocol.Workspace;
|
||||
|
||||
namespace Avalonia.AXAML.LanguageServer.Handlers
|
||||
{
|
||||
public class FileChangeHandler : IDidChangeWatchedFilesHandler
|
||||
{
|
||||
public DidChangeWatchedFilesRegistrationOptions GetRegistrationOptions(
|
||||
DidChangeWatchedFilesCapability capability,
|
||||
ClientCapabilities clientCapabilities) => new DidChangeWatchedFilesRegistrationOptions();
|
||||
|
||||
public Task<Unit> Handle(
|
||||
DidChangeWatchedFilesParams request,
|
||||
CancellationToken cancellationToken) => Unit.Task;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,167 @@
|
|||
using Avalonia.AXAML.LanguageServer.Document;
|
||||
using Avalonia.AXAML.LanguageServer.Extensions;
|
||||
using Avalonia.Ide.CompletionEngine;
|
||||
using MediatR;
|
||||
using OmniSharp.Extensions.LanguageServer.Protocol;
|
||||
using OmniSharp.Extensions.LanguageServer.Protocol.Client.Capabilities;
|
||||
using OmniSharp.Extensions.LanguageServer.Protocol.Document;
|
||||
using OmniSharp.Extensions.LanguageServer.Protocol.Models;
|
||||
using OmniSharp.Extensions.LanguageServer.Protocol.Server.Capabilities;
|
||||
using Range = OmniSharp.Extensions.LanguageServer.Protocol.Models.Range;
|
||||
|
||||
namespace Avalonia.AXAML.LanguageServer.Handlers
|
||||
{
|
||||
public class TextDocumentHandler : ITextDocumentSyncHandler
|
||||
{
|
||||
private readonly TextDocumentBuffer _textDocumentBuffer;
|
||||
|
||||
private readonly DocumentSelector _documentSelector = new DocumentSelector(
|
||||
new DocumentFilter()
|
||||
{
|
||||
Pattern = "**/*.xaml"
|
||||
},
|
||||
new DocumentFilter()
|
||||
{
|
||||
Pattern = "**/*.axaml"
|
||||
}
|
||||
);
|
||||
|
||||
public TextDocumentHandler(TextDocumentBuffer textDocumentBuffer)
|
||||
{
|
||||
this._textDocumentBuffer = textDocumentBuffer;
|
||||
}
|
||||
|
||||
public TextDocumentChangeRegistrationOptions GetRegistrationOptions(
|
||||
SynchronizationCapability capability,
|
||||
ClientCapabilities clientCapabilities)
|
||||
{
|
||||
return new TextDocumentChangeRegistrationOptions()
|
||||
{
|
||||
DocumentSelector = this._documentSelector,
|
||||
SyncKind = TextDocumentSyncKind.Incremental
|
||||
};
|
||||
}
|
||||
|
||||
public TextDocumentAttributes GetTextDocumentAttributes(DocumentUri uri) => new TextDocumentAttributes(uri, "xml");
|
||||
|
||||
public async Task<Unit> Handle(DidChangeTextDocumentParams request, CancellationToken cancellationToken)
|
||||
{
|
||||
var text = request.ContentChanges.FirstOrDefault()?.Text;
|
||||
|
||||
var buffer = this._textDocumentBuffer.GetBuffer(request.TextDocument);
|
||||
int offset = 0;
|
||||
int characterToRemove = 0;
|
||||
foreach (var change in request.ContentChanges)
|
||||
{
|
||||
offset = buffer.AsSpan().PositionToOffset(change.Range.Start);
|
||||
characterToRemove = 0;
|
||||
if (change.Range.Start != change.Range.End)
|
||||
{
|
||||
characterToRemove = buffer.AsSpan().PositionToOffset(change.Range.End) - offset;
|
||||
}
|
||||
|
||||
this._textDocumentBuffer.UpdateBuffer(request.TextDocument, offset, text, characterToRemove);
|
||||
}
|
||||
if (request.ContentChanges.Count() == 1)
|
||||
{
|
||||
var bufferWithContentChange = this._textDocumentBuffer.GetBuffer(request.TextDocument);
|
||||
this.ApplyTextManipulations(request, text, buffer, bufferWithContentChange, offset, characterToRemove);
|
||||
}
|
||||
return Unit.Value;
|
||||
}
|
||||
|
||||
public Task<Unit> Handle(DidOpenTextDocumentParams request, CancellationToken cancellationToken)
|
||||
{
|
||||
this._textDocumentBuffer.CreateBuffer(new OptionalVersionedTextDocumentIdentifier()
|
||||
{
|
||||
Uri = request.TextDocument.Uri,
|
||||
Version = request.TextDocument.Version
|
||||
}, request.TextDocument.Text);
|
||||
return Unit.Task;
|
||||
}
|
||||
|
||||
public Task<Unit> Handle(DidCloseTextDocumentParams request, CancellationToken cancellationToken)
|
||||
{
|
||||
return Unit.Task;
|
||||
}
|
||||
|
||||
public Task<Unit> Handle(DidSaveTextDocumentParams request, CancellationToken cancellationToken)
|
||||
{
|
||||
return Unit.Task;
|
||||
}
|
||||
|
||||
TextDocumentOpenRegistrationOptions IRegistration<TextDocumentOpenRegistrationOptions, SynchronizationCapability>.GetRegistrationOptions(SynchronizationCapability capability, ClientCapabilities clientCapabilities)
|
||||
{
|
||||
return new TextDocumentOpenRegistrationOptions()
|
||||
{
|
||||
DocumentSelector = this._documentSelector
|
||||
};
|
||||
}
|
||||
|
||||
TextDocumentCloseRegistrationOptions IRegistration<TextDocumentCloseRegistrationOptions, SynchronizationCapability>.GetRegistrationOptions(SynchronizationCapability capability, ClientCapabilities clientCapabilities)
|
||||
{
|
||||
return new TextDocumentCloseRegistrationOptions()
|
||||
{
|
||||
DocumentSelector = this._documentSelector
|
||||
};
|
||||
}
|
||||
|
||||
TextDocumentSaveRegistrationOptions IRegistration<TextDocumentSaveRegistrationOptions, SynchronizationCapability>.GetRegistrationOptions(SynchronizationCapability capability, ClientCapabilities clientCapabilities)
|
||||
{
|
||||
return new TextDocumentSaveRegistrationOptions()
|
||||
{
|
||||
DocumentSelector = this._documentSelector,
|
||||
IncludeText = true
|
||||
};
|
||||
}
|
||||
|
||||
private void ApplyTextManipulations(DidChangeTextDocumentParams request, string text, string buffer, string changedBuffer, int position, int deletedCharacters)
|
||||
{
|
||||
var textManipulator = new TextManipulator(changedBuffer, position);
|
||||
var manipulations = textManipulator.ManipulateText(new TextChangeAdapter(position, text, buffer.Substring(position, deletedCharacters)));
|
||||
|
||||
if(manipulations.Count == 0)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
var edits = manipulations.Select(n =>
|
||||
{
|
||||
var start = changedBuffer.AsSpan().OffsetToPosition(n.Start);
|
||||
|
||||
switch (n.Type)
|
||||
{
|
||||
case ManipulationType.Insert:
|
||||
return new TextEdit()
|
||||
{
|
||||
NewText = n.Text,
|
||||
Range = new Range(start, start)
|
||||
};
|
||||
case ManipulationType.Delete:
|
||||
var end = changedBuffer.AsSpan().OffsetToPosition(n.End);
|
||||
return new TextEdit()
|
||||
{
|
||||
NewText = "",
|
||||
Range = new Range(start, end)
|
||||
};
|
||||
default:
|
||||
throw new NotSupportedException();
|
||||
}
|
||||
}).ToList();
|
||||
if (edits.Count > 0)
|
||||
{
|
||||
// await _router.ApplyWorkspaceEdit(new ApplyWorkspaceEditParams()
|
||||
// {
|
||||
// Edit = new WorkspaceEdit()
|
||||
// {
|
||||
// DocumentChanges = new Container<WorkspaceEditDocumentChange>(new WorkspaceEditDocumentChange(new TextDocumentEdit()
|
||||
// {
|
||||
// TextDocument = request.TextDocument,
|
||||
// Edits = new TextEditContainer(edits)
|
||||
// }))
|
||||
// }
|
||||
// });
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,62 @@
|
|||
using Avalonia.AXAML.LanguageServer;
|
||||
using Avalonia.AXAML.LanguageServer.AssemblyMetadata;
|
||||
using Avalonia.AXAML.LanguageServer.Document;
|
||||
using Avalonia.AXAML.LanguageServer.Handlers;
|
||||
using Avalonia.AXAML.LanguageServer.ProjectModel;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using OmniSharp.Extensions.LanguageServer.Server;
|
||||
using Serilog;
|
||||
|
||||
namespace Avalonia.axamlLanguageServer
|
||||
{
|
||||
internal class Program
|
||||
{
|
||||
private static void Main(string[] args) => MainAsync(args).Wait();
|
||||
|
||||
private static async Task MainAsync(string[] args)
|
||||
{
|
||||
Log.Logger = new LoggerConfiguration()
|
||||
.Enrich.FromLogContext()
|
||||
.WriteTo.File("Avalonia.AXAML.LanguageServer.Log.txt", rollingInterval: RollingInterval.Day)
|
||||
.MinimumLevel.Verbose()
|
||||
.CreateLogger();
|
||||
|
||||
Log.Logger.Information("Starting log...");
|
||||
|
||||
var server = await OmniSharp.Extensions.LanguageServer.Server.LanguageServer
|
||||
.From(
|
||||
options =>
|
||||
options
|
||||
.WithInput(Console.OpenStandardInput())
|
||||
.WithOutput(Console.OpenStandardOutput())
|
||||
.ConfigureLogging(
|
||||
x => x
|
||||
.AddSerilog(Log.Logger)
|
||||
.AddLanguageProtocolLogging()
|
||||
.SetMinimumLevel(LogLevel.Debug)
|
||||
)
|
||||
.WithServices(ConfigureServices)
|
||||
.WithHandler<TextDocumentHandler>()
|
||||
.WithHandler<FileChangeHandler>()
|
||||
.WithHandler<AvaloniaCodeCompletionHandler>())
|
||||
.ConfigureAwait(false);
|
||||
|
||||
await server
|
||||
.WaitForExit
|
||||
.ConfigureAwait(false);
|
||||
}
|
||||
|
||||
private static void ConfigureServices(IServiceCollection serviceCollection)
|
||||
{
|
||||
serviceCollection.AddSingleton<TextDocumentBuffer>();
|
||||
serviceCollection.AddSingleton<ProjectShepard>();
|
||||
serviceCollection.AddSingleton<AvaloniaMetadataShepard>();
|
||||
serviceCollection.AddSingleton<AvaloniaMetadataLoader>();
|
||||
serviceCollection.AddSingleton<TextDocumentToProjectMapper>();
|
||||
serviceCollection.AddSingleton<DocumentMetadataProvider>();
|
||||
|
||||
// serviceCollection.AddSingleton<ILanguageServer, LanguageServer>();
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,29 @@
|
|||
using System.Collections.Concurrent;
|
||||
|
||||
namespace Avalonia.AXAML.LanguageServer.ProjectModel
|
||||
{
|
||||
public class ProjectShepard
|
||||
{
|
||||
ConcurrentDictionary<string, WorkspaceProject> _projects = new ConcurrentDictionary<string, WorkspaceProject>();
|
||||
|
||||
public WorkspaceProject GetProject(string path)
|
||||
{
|
||||
return ProjectAdded(path);
|
||||
}
|
||||
|
||||
public WorkspaceProject ProjectAdded(string path)
|
||||
{
|
||||
return _projects.GetOrAdd(path, p => new WorkspaceProject(p));
|
||||
}
|
||||
|
||||
public void ProjectRemoved(string path)
|
||||
{
|
||||
_projects.TryRemove(path, out _);
|
||||
}
|
||||
|
||||
internal IList<WorkspaceProject> GetProjectsByName(string name)
|
||||
{
|
||||
return _projects.Values.Where(n => n.Name.Equals(name)).ToList();
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,30 @@
|
|||
namespace Avalonia.AXAML.LanguageServer.ProjectModel
|
||||
{
|
||||
public class WorkspaceProject
|
||||
{
|
||||
public string ProjectDirectory { get; }
|
||||
public string BinariesDirectory { get; }
|
||||
|
||||
public string Name { get; }
|
||||
public string FilePath { get; }
|
||||
|
||||
public string OutputFile { get; private set; }
|
||||
|
||||
public WorkspaceProject(string path)
|
||||
{
|
||||
FilePath = path;
|
||||
ProjectDirectory = Path.GetDirectoryName(path);
|
||||
BinariesDirectory = Path.Combine(ProjectDirectory, "bin");
|
||||
Name = Path.GetFileNameWithoutExtension(path);
|
||||
|
||||
OutputFile = Directory.GetFiles(BinariesDirectory, Name + ".dll", SearchOption.AllDirectories).FirstOrDefault();
|
||||
|
||||
|
||||
}
|
||||
|
||||
internal void UpdateDll(string path)
|
||||
{
|
||||
OutputFile = path;
|
||||
}
|
||||
}
|
||||
}
|
Двоичные данные
Avalonia.AXAML.LanguageServer/Avalonia.AXAML.LanguageServer/bin/Debug/net6.0/Avalonia.AXAML.LanguageServer
Executable file
Двоичные данные
Avalonia.AXAML.LanguageServer/Avalonia.AXAML.LanguageServer/bin/Debug/net6.0/Avalonia.AXAML.LanguageServer
Executable file
Двоичный файл не отображается.
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
Двоичные данные
Avalonia.AXAML.LanguageServer/Avalonia.AXAML.LanguageServer/bin/Debug/net6.0/Avalonia.AXAML.LanguageServer.dll
Normal file
Двоичные данные
Avalonia.AXAML.LanguageServer/Avalonia.AXAML.LanguageServer/bin/Debug/net6.0/Avalonia.AXAML.LanguageServer.dll
Normal file
Двоичный файл не отображается.
Двоичные данные
Avalonia.AXAML.LanguageServer/Avalonia.AXAML.LanguageServer/bin/Debug/net6.0/Avalonia.AXAML.LanguageServer.pdb
Normal file
Двоичные данные
Avalonia.AXAML.LanguageServer/Avalonia.AXAML.LanguageServer/bin/Debug/net6.0/Avalonia.AXAML.LanguageServer.pdb
Normal file
Двоичный файл не отображается.
|
@ -0,0 +1,9 @@
|
|||
{
|
||||
"runtimeOptions": {
|
||||
"tfm": "net6.0",
|
||||
"framework": {
|
||||
"name": "Microsoft.NETCore.App",
|
||||
"version": "6.0.0"
|
||||
}
|
||||
}
|
||||
}
|
Двоичный файл не отображается.
Двоичный файл не отображается.
Двоичные данные
Avalonia.AXAML.LanguageServer/Avalonia.AXAML.LanguageServer/bin/Debug/net6.0/Avalonia.Ide.CompletionEngine.dll
Normal file
Двоичные данные
Avalonia.AXAML.LanguageServer/Avalonia.AXAML.LanguageServer/bin/Debug/net6.0/Avalonia.Ide.CompletionEngine.dll
Normal file
Двоичный файл не отображается.
Двоичные данные
Avalonia.AXAML.LanguageServer/Avalonia.AXAML.LanguageServer/bin/Debug/net6.0/Avalonia.Ide.CompletionEngine.pdb
Normal file
Двоичные данные
Avalonia.AXAML.LanguageServer/Avalonia.AXAML.LanguageServer/bin/Debug/net6.0/Avalonia.Ide.CompletionEngine.pdb
Normal file
Двоичный файл не отображается.
Двоичные данные
Avalonia.AXAML.LanguageServer/Avalonia.AXAML.LanguageServer/bin/Debug/net6.0/MediatR.dll
Executable file
Двоичные данные
Avalonia.AXAML.LanguageServer/Avalonia.AXAML.LanguageServer/bin/Debug/net6.0/MediatR.dll
Executable file
Двоичный файл не отображается.
Двоичные данные
Avalonia.AXAML.LanguageServer/Avalonia.AXAML.LanguageServer/bin/Debug/net6.0/Microsoft.Bcl.AsyncInterfaces.dll
Executable file
Двоичные данные
Avalonia.AXAML.LanguageServer/Avalonia.AXAML.LanguageServer/bin/Debug/net6.0/Microsoft.Bcl.AsyncInterfaces.dll
Executable file
Двоичный файл не отображается.
Двоичные данные
Avalonia.AXAML.LanguageServer/Avalonia.AXAML.LanguageServer/bin/Debug/net6.0/Microsoft.Extensions.Configuration.Abstractions.dll
Executable file
Двоичные данные
Avalonia.AXAML.LanguageServer/Avalonia.AXAML.LanguageServer/bin/Debug/net6.0/Microsoft.Extensions.Configuration.Abstractions.dll
Executable file
Двоичный файл не отображается.
Двоичные данные
Avalonia.AXAML.LanguageServer/Avalonia.AXAML.LanguageServer/bin/Debug/net6.0/Microsoft.Extensions.Configuration.Binder.dll
Executable file
Двоичные данные
Avalonia.AXAML.LanguageServer/Avalonia.AXAML.LanguageServer/bin/Debug/net6.0/Microsoft.Extensions.Configuration.Binder.dll
Executable file
Двоичный файл не отображается.
Двоичные данные
Avalonia.AXAML.LanguageServer/Avalonia.AXAML.LanguageServer/bin/Debug/net6.0/Microsoft.Extensions.Configuration.dll
Executable file
Двоичные данные
Avalonia.AXAML.LanguageServer/Avalonia.AXAML.LanguageServer/bin/Debug/net6.0/Microsoft.Extensions.Configuration.dll
Executable file
Двоичный файл не отображается.
Двоичный файл не отображается.
Двоичные данные
Avalonia.AXAML.LanguageServer/Avalonia.AXAML.LanguageServer/bin/Debug/net6.0/Microsoft.Extensions.DependencyInjection.dll
Executable file
Двоичные данные
Avalonia.AXAML.LanguageServer/Avalonia.AXAML.LanguageServer/bin/Debug/net6.0/Microsoft.Extensions.DependencyInjection.dll
Executable file
Двоичный файл не отображается.
Двоичные данные
Avalonia.AXAML.LanguageServer/Avalonia.AXAML.LanguageServer/bin/Debug/net6.0/Microsoft.Extensions.Logging.Abstractions.dll
Executable file
Двоичные данные
Avalonia.AXAML.LanguageServer/Avalonia.AXAML.LanguageServer/bin/Debug/net6.0/Microsoft.Extensions.Logging.Abstractions.dll
Executable file
Двоичный файл не отображается.
Двоичные данные
Avalonia.AXAML.LanguageServer/Avalonia.AXAML.LanguageServer/bin/Debug/net6.0/Microsoft.Extensions.Logging.dll
Executable file
Двоичные данные
Avalonia.AXAML.LanguageServer/Avalonia.AXAML.LanguageServer/bin/Debug/net6.0/Microsoft.Extensions.Logging.dll
Executable file
Двоичный файл не отображается.
Двоичный файл не отображается.
Двоичные данные
Avalonia.AXAML.LanguageServer/Avalonia.AXAML.LanguageServer/bin/Debug/net6.0/Microsoft.Extensions.Options.dll
Executable file
Двоичные данные
Avalonia.AXAML.LanguageServer/Avalonia.AXAML.LanguageServer/bin/Debug/net6.0/Microsoft.Extensions.Options.dll
Executable file
Двоичный файл не отображается.
Двоичные данные
Avalonia.AXAML.LanguageServer/Avalonia.AXAML.LanguageServer/bin/Debug/net6.0/Microsoft.Extensions.Primitives.dll
Executable file
Двоичные данные
Avalonia.AXAML.LanguageServer/Avalonia.AXAML.LanguageServer/bin/Debug/net6.0/Microsoft.Extensions.Primitives.dll
Executable file
Двоичный файл не отображается.
Двоичные данные
Avalonia.AXAML.LanguageServer/Avalonia.AXAML.LanguageServer/bin/Debug/net6.0/Microsoft.VisualStudio.Threading.dll
Executable file
Двоичные данные
Avalonia.AXAML.LanguageServer/Avalonia.AXAML.LanguageServer/bin/Debug/net6.0/Microsoft.VisualStudio.Threading.dll
Executable file
Двоичный файл не отображается.
Двоичные данные
Avalonia.AXAML.LanguageServer/Avalonia.AXAML.LanguageServer/bin/Debug/net6.0/Microsoft.VisualStudio.Validation.dll
Executable file
Двоичные данные
Avalonia.AXAML.LanguageServer/Avalonia.AXAML.LanguageServer/bin/Debug/net6.0/Microsoft.VisualStudio.Validation.dll
Executable file
Двоичный файл не отображается.
Двоичные данные
Avalonia.AXAML.LanguageServer/Avalonia.AXAML.LanguageServer/bin/Debug/net6.0/Nerdbank.Streams.dll
Executable file
Двоичные данные
Avalonia.AXAML.LanguageServer/Avalonia.AXAML.LanguageServer/bin/Debug/net6.0/Nerdbank.Streams.dll
Executable file
Двоичный файл не отображается.
Двоичные данные
Avalonia.AXAML.LanguageServer/Avalonia.AXAML.LanguageServer/bin/Debug/net6.0/Newtonsoft.Json.dll
Executable file
Двоичные данные
Avalonia.AXAML.LanguageServer/Avalonia.AXAML.LanguageServer/bin/Debug/net6.0/Newtonsoft.Json.dll
Executable file
Двоичный файл не отображается.
Двоичные данные
Avalonia.AXAML.LanguageServer/Avalonia.AXAML.LanguageServer/bin/Debug/net6.0/OmniSharp.Extensions.JsonRpc.dll
Executable file
Двоичные данные
Avalonia.AXAML.LanguageServer/Avalonia.AXAML.LanguageServer/bin/Debug/net6.0/OmniSharp.Extensions.JsonRpc.dll
Executable file
Двоичный файл не отображается.
Двоичные данные
Avalonia.AXAML.LanguageServer/Avalonia.AXAML.LanguageServer/bin/Debug/net6.0/OmniSharp.Extensions.LanguageProtocol.dll
Executable file
Двоичные данные
Avalonia.AXAML.LanguageServer/Avalonia.AXAML.LanguageServer/bin/Debug/net6.0/OmniSharp.Extensions.LanguageProtocol.dll
Executable file
Двоичный файл не отображается.
Двоичные данные
Avalonia.AXAML.LanguageServer/Avalonia.AXAML.LanguageServer/bin/Debug/net6.0/OmniSharp.Extensions.LanguageServer.Shared.dll
Executable file
Двоичные данные
Avalonia.AXAML.LanguageServer/Avalonia.AXAML.LanguageServer/bin/Debug/net6.0/OmniSharp.Extensions.LanguageServer.Shared.dll
Executable file
Двоичный файл не отображается.
Двоичные данные
Avalonia.AXAML.LanguageServer/Avalonia.AXAML.LanguageServer/bin/Debug/net6.0/OmniSharp.Extensions.LanguageServer.dll
Executable file
Двоичные данные
Avalonia.AXAML.LanguageServer/Avalonia.AXAML.LanguageServer/bin/Debug/net6.0/OmniSharp.Extensions.LanguageServer.dll
Executable file
Двоичный файл не отображается.
Двоичные данные
Avalonia.AXAML.LanguageServer/Avalonia.AXAML.LanguageServer/bin/Debug/net6.0/Serilog.Extensions.Logging.dll
Executable file
Двоичные данные
Avalonia.AXAML.LanguageServer/Avalonia.AXAML.LanguageServer/bin/Debug/net6.0/Serilog.Extensions.Logging.dll
Executable file
Двоичный файл не отображается.
Двоичные данные
Avalonia.AXAML.LanguageServer/Avalonia.AXAML.LanguageServer/bin/Debug/net6.0/Serilog.Sinks.File.dll
Executable file
Двоичные данные
Avalonia.AXAML.LanguageServer/Avalonia.AXAML.LanguageServer/bin/Debug/net6.0/Serilog.Sinks.File.dll
Executable file
Двоичный файл не отображается.
Двоичные данные
Avalonia.AXAML.LanguageServer/Avalonia.AXAML.LanguageServer/bin/Debug/net6.0/Serilog.dll
Executable file
Двоичные данные
Avalonia.AXAML.LanguageServer/Avalonia.AXAML.LanguageServer/bin/Debug/net6.0/Serilog.dll
Executable file
Двоичный файл не отображается.
Двоичные данные
Avalonia.AXAML.LanguageServer/Avalonia.AXAML.LanguageServer/bin/Debug/net6.0/System.IO.Pipelines.dll
Executable file
Двоичные данные
Avalonia.AXAML.LanguageServer/Avalonia.AXAML.LanguageServer/bin/Debug/net6.0/System.IO.Pipelines.dll
Executable file
Двоичный файл не отображается.
Двоичные данные
Avalonia.AXAML.LanguageServer/Avalonia.AXAML.LanguageServer/bin/Debug/net6.0/System.Reactive.dll
Executable file
Двоичные данные
Avalonia.AXAML.LanguageServer/Avalonia.AXAML.LanguageServer/bin/Debug/net6.0/System.Reactive.dll
Executable file
Двоичный файл не отображается.
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
Двоичные данные
Avalonia.AXAML.LanguageServer/Avalonia.AXAML.LanguageServer/bin/Debug/net6.0/cs/Microsoft.VisualStudio.Threading.resources.dll
Executable file
Двоичные данные
Avalonia.AXAML.LanguageServer/Avalonia.AXAML.LanguageServer/bin/Debug/net6.0/cs/Microsoft.VisualStudio.Threading.resources.dll
Executable file
Двоичный файл не отображается.
Двоичные данные
Avalonia.AXAML.LanguageServer/Avalonia.AXAML.LanguageServer/bin/Debug/net6.0/cs/Microsoft.VisualStudio.Validation.resources.dll
Executable file
Двоичные данные
Avalonia.AXAML.LanguageServer/Avalonia.AXAML.LanguageServer/bin/Debug/net6.0/cs/Microsoft.VisualStudio.Validation.resources.dll
Executable file
Двоичный файл не отображается.
Двоичные данные
Avalonia.AXAML.LanguageServer/Avalonia.AXAML.LanguageServer/bin/Debug/net6.0/de/Microsoft.VisualStudio.Threading.resources.dll
Executable file
Двоичные данные
Avalonia.AXAML.LanguageServer/Avalonia.AXAML.LanguageServer/bin/Debug/net6.0/de/Microsoft.VisualStudio.Threading.resources.dll
Executable file
Двоичный файл не отображается.
Двоичные данные
Avalonia.AXAML.LanguageServer/Avalonia.AXAML.LanguageServer/bin/Debug/net6.0/de/Microsoft.VisualStudio.Validation.resources.dll
Executable file
Двоичные данные
Avalonia.AXAML.LanguageServer/Avalonia.AXAML.LanguageServer/bin/Debug/net6.0/de/Microsoft.VisualStudio.Validation.resources.dll
Executable file
Двоичный файл не отображается.
Двоичные данные
Avalonia.AXAML.LanguageServer/Avalonia.AXAML.LanguageServer/bin/Debug/net6.0/dnlib.dll
Executable file
Двоичные данные
Avalonia.AXAML.LanguageServer/Avalonia.AXAML.LanguageServer/bin/Debug/net6.0/dnlib.dll
Executable file
Двоичный файл не отображается.
Двоичные данные
Avalonia.AXAML.LanguageServer/Avalonia.AXAML.LanguageServer/bin/Debug/net6.0/es/Microsoft.VisualStudio.Threading.resources.dll
Executable file
Двоичные данные
Avalonia.AXAML.LanguageServer/Avalonia.AXAML.LanguageServer/bin/Debug/net6.0/es/Microsoft.VisualStudio.Threading.resources.dll
Executable file
Двоичный файл не отображается.
Двоичные данные
Avalonia.AXAML.LanguageServer/Avalonia.AXAML.LanguageServer/bin/Debug/net6.0/es/Microsoft.VisualStudio.Validation.resources.dll
Executable file
Двоичные данные
Avalonia.AXAML.LanguageServer/Avalonia.AXAML.LanguageServer/bin/Debug/net6.0/es/Microsoft.VisualStudio.Validation.resources.dll
Executable file
Двоичный файл не отображается.
Двоичные данные
Avalonia.AXAML.LanguageServer/Avalonia.AXAML.LanguageServer/bin/Debug/net6.0/fr/Microsoft.VisualStudio.Threading.resources.dll
Executable file
Двоичные данные
Avalonia.AXAML.LanguageServer/Avalonia.AXAML.LanguageServer/bin/Debug/net6.0/fr/Microsoft.VisualStudio.Threading.resources.dll
Executable file
Двоичный файл не отображается.
Двоичные данные
Avalonia.AXAML.LanguageServer/Avalonia.AXAML.LanguageServer/bin/Debug/net6.0/fr/Microsoft.VisualStudio.Validation.resources.dll
Executable file
Двоичные данные
Avalonia.AXAML.LanguageServer/Avalonia.AXAML.LanguageServer/bin/Debug/net6.0/fr/Microsoft.VisualStudio.Validation.resources.dll
Executable file
Двоичный файл не отображается.
Двоичные данные
Avalonia.AXAML.LanguageServer/Avalonia.AXAML.LanguageServer/bin/Debug/net6.0/it/Microsoft.VisualStudio.Threading.resources.dll
Executable file
Двоичные данные
Avalonia.AXAML.LanguageServer/Avalonia.AXAML.LanguageServer/bin/Debug/net6.0/it/Microsoft.VisualStudio.Threading.resources.dll
Executable file
Двоичный файл не отображается.
Двоичные данные
Avalonia.AXAML.LanguageServer/Avalonia.AXAML.LanguageServer/bin/Debug/net6.0/it/Microsoft.VisualStudio.Validation.resources.dll
Executable file
Двоичные данные
Avalonia.AXAML.LanguageServer/Avalonia.AXAML.LanguageServer/bin/Debug/net6.0/it/Microsoft.VisualStudio.Validation.resources.dll
Executable file
Двоичный файл не отображается.
Двоичные данные
Avalonia.AXAML.LanguageServer/Avalonia.AXAML.LanguageServer/bin/Debug/net6.0/ja/Microsoft.VisualStudio.Threading.resources.dll
Executable file
Двоичные данные
Avalonia.AXAML.LanguageServer/Avalonia.AXAML.LanguageServer/bin/Debug/net6.0/ja/Microsoft.VisualStudio.Threading.resources.dll
Executable file
Двоичный файл не отображается.
Двоичные данные
Avalonia.AXAML.LanguageServer/Avalonia.AXAML.LanguageServer/bin/Debug/net6.0/ja/Microsoft.VisualStudio.Validation.resources.dll
Executable file
Двоичные данные
Avalonia.AXAML.LanguageServer/Avalonia.AXAML.LanguageServer/bin/Debug/net6.0/ja/Microsoft.VisualStudio.Validation.resources.dll
Executable file
Двоичный файл не отображается.
Двоичные данные
Avalonia.AXAML.LanguageServer/Avalonia.AXAML.LanguageServer/bin/Debug/net6.0/ko/Microsoft.VisualStudio.Threading.resources.dll
Executable file
Двоичные данные
Avalonia.AXAML.LanguageServer/Avalonia.AXAML.LanguageServer/bin/Debug/net6.0/ko/Microsoft.VisualStudio.Threading.resources.dll
Executable file
Двоичный файл не отображается.
Двоичные данные
Avalonia.AXAML.LanguageServer/Avalonia.AXAML.LanguageServer/bin/Debug/net6.0/ko/Microsoft.VisualStudio.Validation.resources.dll
Executable file
Двоичные данные
Avalonia.AXAML.LanguageServer/Avalonia.AXAML.LanguageServer/bin/Debug/net6.0/ko/Microsoft.VisualStudio.Validation.resources.dll
Executable file
Двоичный файл не отображается.
Двоичные данные
Avalonia.AXAML.LanguageServer/Avalonia.AXAML.LanguageServer/bin/Debug/net6.0/pl/Microsoft.VisualStudio.Threading.resources.dll
Executable file
Двоичные данные
Avalonia.AXAML.LanguageServer/Avalonia.AXAML.LanguageServer/bin/Debug/net6.0/pl/Microsoft.VisualStudio.Threading.resources.dll
Executable file
Двоичный файл не отображается.
Двоичные данные
Avalonia.AXAML.LanguageServer/Avalonia.AXAML.LanguageServer/bin/Debug/net6.0/pl/Microsoft.VisualStudio.Validation.resources.dll
Executable file
Двоичные данные
Avalonia.AXAML.LanguageServer/Avalonia.AXAML.LanguageServer/bin/Debug/net6.0/pl/Microsoft.VisualStudio.Validation.resources.dll
Executable file
Двоичный файл не отображается.
Двоичный файл не отображается.
Двоичный файл не отображается.
Двоичные данные
Avalonia.AXAML.LanguageServer/Avalonia.AXAML.LanguageServer/bin/Debug/net6.0/ru/Microsoft.VisualStudio.Threading.resources.dll
Executable file
Двоичные данные
Avalonia.AXAML.LanguageServer/Avalonia.AXAML.LanguageServer/bin/Debug/net6.0/ru/Microsoft.VisualStudio.Threading.resources.dll
Executable file
Двоичный файл не отображается.
Двоичные данные
Avalonia.AXAML.LanguageServer/Avalonia.AXAML.LanguageServer/bin/Debug/net6.0/ru/Microsoft.VisualStudio.Validation.resources.dll
Executable file
Двоичные данные
Avalonia.AXAML.LanguageServer/Avalonia.AXAML.LanguageServer/bin/Debug/net6.0/ru/Microsoft.VisualStudio.Validation.resources.dll
Executable file
Двоичный файл не отображается.
Двоичные данные
Avalonia.AXAML.LanguageServer/Avalonia.AXAML.LanguageServer/bin/Debug/net6.0/tr/Microsoft.VisualStudio.Threading.resources.dll
Executable file
Двоичные данные
Avalonia.AXAML.LanguageServer/Avalonia.AXAML.LanguageServer/bin/Debug/net6.0/tr/Microsoft.VisualStudio.Threading.resources.dll
Executable file
Двоичный файл не отображается.
Двоичные данные
Avalonia.AXAML.LanguageServer/Avalonia.AXAML.LanguageServer/bin/Debug/net6.0/tr/Microsoft.VisualStudio.Validation.resources.dll
Executable file
Двоичные данные
Avalonia.AXAML.LanguageServer/Avalonia.AXAML.LanguageServer/bin/Debug/net6.0/tr/Microsoft.VisualStudio.Validation.resources.dll
Executable file
Двоичный файл не отображается.
Двоичный файл не отображается.
Двоичный файл не отображается.
Двоичный файл не отображается.
Двоичный файл не отображается.
|
@ -0,0 +1,204 @@
|
|||
{
|
||||
"format": 1,
|
||||
"restore": {
|
||||
"/home/esqueleto/myWork/avalonia-axamlautocompletion/Avalonia.AXAML.LanguageServer/Avalonia.AXAML.LanguageServer/Avalonia.AXAML.LanguageServer.csproj": {}
|
||||
},
|
||||
"projects": {
|
||||
"/home/esqueleto/myWork/avalonia-axamlautocompletion/Avalonia.AXAML.LanguageServer/Avalonia.AXAML.LanguageServer/Avalonia.AXAML.LanguageServer.csproj": {
|
||||
"version": "1.0.0",
|
||||
"restore": {
|
||||
"projectUniqueName": "/home/esqueleto/myWork/avalonia-axamlautocompletion/Avalonia.AXAML.LanguageServer/Avalonia.AXAML.LanguageServer/Avalonia.AXAML.LanguageServer.csproj",
|
||||
"projectName": "Avalonia.AXAML.LanguageServer",
|
||||
"projectPath": "/home/esqueleto/myWork/avalonia-axamlautocompletion/Avalonia.AXAML.LanguageServer/Avalonia.AXAML.LanguageServer/Avalonia.AXAML.LanguageServer.csproj",
|
||||
"packagesPath": "/home/esqueleto/.nuget/packages/",
|
||||
"outputPath": "/home/esqueleto/myWork/avalonia-axamlautocompletion/Avalonia.AXAML.LanguageServer/Avalonia.AXAML.LanguageServer/obj/",
|
||||
"projectStyle": "PackageReference",
|
||||
"configFilePaths": [
|
||||
"/home/esqueleto/.nuget/NuGet/NuGet.Config"
|
||||
],
|
||||
"originalTargetFrameworks": [
|
||||
"net6.0"
|
||||
],
|
||||
"sources": {
|
||||
"https://api.nuget.org/v3/index.json": {}
|
||||
},
|
||||
"frameworks": {
|
||||
"net6.0": {
|
||||
"targetAlias": "net6.0",
|
||||
"projectReferences": {
|
||||
"/home/esqueleto/myWork/avalonia-axamlautocompletion/Avalonia.AXAML.LanguageServer/Avalonia.Ide.CompletionEngine.DnlibMetadataProvider/Avalonia.Ide.CompletionEngine.DnlibMetadataProvider.csproj": {
|
||||
"projectPath": "/home/esqueleto/myWork/avalonia-axamlautocompletion/Avalonia.AXAML.LanguageServer/Avalonia.Ide.CompletionEngine.DnlibMetadataProvider/Avalonia.Ide.CompletionEngine.DnlibMetadataProvider.csproj"
|
||||
},
|
||||
"/home/esqueleto/myWork/avalonia-axamlautocompletion/Avalonia.AXAML.LanguageServer/Avalonia.Ide.CompletionEngine/Avalonia.Ide.CompletionEngine.csproj": {
|
||||
"projectPath": "/home/esqueleto/myWork/avalonia-axamlautocompletion/Avalonia.AXAML.LanguageServer/Avalonia.Ide.CompletionEngine/Avalonia.Ide.CompletionEngine.csproj"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"warningProperties": {
|
||||
"warnAsError": [
|
||||
"NU1605"
|
||||
]
|
||||
}
|
||||
},
|
||||
"frameworks": {
|
||||
"net6.0": {
|
||||
"targetAlias": "net6.0",
|
||||
"dependencies": {
|
||||
"Microsoft.Extensions.Logging": {
|
||||
"target": "Package",
|
||||
"version": "[*, )"
|
||||
},
|
||||
"OmniSharp.Extensions.LanguageServer": {
|
||||
"target": "Package",
|
||||
"version": "[*, )"
|
||||
},
|
||||
"Serilog": {
|
||||
"target": "Package",
|
||||
"version": "[*, )"
|
||||
},
|
||||
"Serilog.Extensions.Logging": {
|
||||
"target": "Package",
|
||||
"version": "[*, )"
|
||||
},
|
||||
"Serilog.Sinks.File": {
|
||||
"target": "Package",
|
||||
"version": "[*, )"
|
||||
}
|
||||
},
|
||||
"imports": [
|
||||
"net461",
|
||||
"net462",
|
||||
"net47",
|
||||
"net471",
|
||||
"net472",
|
||||
"net48"
|
||||
],
|
||||
"assetTargetFallback": true,
|
||||
"warn": true,
|
||||
"frameworkReferences": {
|
||||
"Microsoft.NETCore.App": {
|
||||
"privateAssets": "all"
|
||||
}
|
||||
},
|
||||
"runtimeIdentifierGraphPath": "/usr/share/dotnet/sdk/6.0.201/RuntimeIdentifierGraph.json"
|
||||
}
|
||||
}
|
||||
},
|
||||
"/home/esqueleto/myWork/avalonia-axamlautocompletion/Avalonia.AXAML.LanguageServer/Avalonia.Ide.CompletionEngine.DnlibMetadataProvider/Avalonia.Ide.CompletionEngine.DnlibMetadataProvider.csproj": {
|
||||
"version": "1.0.0",
|
||||
"restore": {
|
||||
"projectUniqueName": "/home/esqueleto/myWork/avalonia-axamlautocompletion/Avalonia.AXAML.LanguageServer/Avalonia.Ide.CompletionEngine.DnlibMetadataProvider/Avalonia.Ide.CompletionEngine.DnlibMetadataProvider.csproj",
|
||||
"projectName": "Avalonia.Ide.CompletionEngine.DnlibMetadataProvider",
|
||||
"projectPath": "/home/esqueleto/myWork/avalonia-axamlautocompletion/Avalonia.AXAML.LanguageServer/Avalonia.Ide.CompletionEngine.DnlibMetadataProvider/Avalonia.Ide.CompletionEngine.DnlibMetadataProvider.csproj",
|
||||
"packagesPath": "/home/esqueleto/.nuget/packages/",
|
||||
"outputPath": "/home/esqueleto/myWork/avalonia-axamlautocompletion/Avalonia.AXAML.LanguageServer/Avalonia.Ide.CompletionEngine.DnlibMetadataProvider/obj/",
|
||||
"projectStyle": "PackageReference",
|
||||
"configFilePaths": [
|
||||
"/home/esqueleto/.nuget/NuGet/NuGet.Config"
|
||||
],
|
||||
"originalTargetFrameworks": [
|
||||
"netstandard2.0"
|
||||
],
|
||||
"sources": {
|
||||
"https://api.nuget.org/v3/index.json": {}
|
||||
},
|
||||
"frameworks": {
|
||||
"netstandard2.0": {
|
||||
"targetAlias": "netstandard2.0",
|
||||
"projectReferences": {
|
||||
"/home/esqueleto/myWork/avalonia-axamlautocompletion/Avalonia.AXAML.LanguageServer/Avalonia.Ide.CompletionEngine/Avalonia.Ide.CompletionEngine.csproj": {
|
||||
"projectPath": "/home/esqueleto/myWork/avalonia-axamlautocompletion/Avalonia.AXAML.LanguageServer/Avalonia.Ide.CompletionEngine/Avalonia.Ide.CompletionEngine.csproj"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"warningProperties": {
|
||||
"warnAsError": [
|
||||
"NU1605"
|
||||
]
|
||||
}
|
||||
},
|
||||
"frameworks": {
|
||||
"netstandard2.0": {
|
||||
"targetAlias": "netstandard2.0",
|
||||
"dependencies": {
|
||||
"Avalonia.dnlib": {
|
||||
"target": "Package",
|
||||
"version": "[2018.11.26-git-67c321d7a4219415492a910d22c95f5efb0c30b8, )"
|
||||
},
|
||||
"NETStandard.Library": {
|
||||
"suppressParent": "All",
|
||||
"target": "Package",
|
||||
"version": "[2.0.3, )",
|
||||
"autoReferenced": true
|
||||
}
|
||||
},
|
||||
"imports": [
|
||||
"net461",
|
||||
"net462",
|
||||
"net47",
|
||||
"net471",
|
||||
"net472",
|
||||
"net48"
|
||||
],
|
||||
"assetTargetFallback": true,
|
||||
"warn": true,
|
||||
"runtimeIdentifierGraphPath": "/usr/share/dotnet/sdk/6.0.201/RuntimeIdentifierGraph.json"
|
||||
}
|
||||
}
|
||||
},
|
||||
"/home/esqueleto/myWork/avalonia-axamlautocompletion/Avalonia.AXAML.LanguageServer/Avalonia.Ide.CompletionEngine/Avalonia.Ide.CompletionEngine.csproj": {
|
||||
"version": "1.0.0",
|
||||
"restore": {
|
||||
"projectUniqueName": "/home/esqueleto/myWork/avalonia-axamlautocompletion/Avalonia.AXAML.LanguageServer/Avalonia.Ide.CompletionEngine/Avalonia.Ide.CompletionEngine.csproj",
|
||||
"projectName": "Avalonia.Ide.CompletionEngine",
|
||||
"projectPath": "/home/esqueleto/myWork/avalonia-axamlautocompletion/Avalonia.AXAML.LanguageServer/Avalonia.Ide.CompletionEngine/Avalonia.Ide.CompletionEngine.csproj",
|
||||
"packagesPath": "/home/esqueleto/.nuget/packages/",
|
||||
"outputPath": "/home/esqueleto/myWork/avalonia-axamlautocompletion/Avalonia.AXAML.LanguageServer/Avalonia.Ide.CompletionEngine/obj/",
|
||||
"projectStyle": "PackageReference",
|
||||
"configFilePaths": [
|
||||
"/home/esqueleto/.nuget/NuGet/NuGet.Config"
|
||||
],
|
||||
"originalTargetFrameworks": [
|
||||
"netstandard1.4"
|
||||
],
|
||||
"sources": {
|
||||
"https://api.nuget.org/v3/index.json": {}
|
||||
},
|
||||
"frameworks": {
|
||||
"netstandard1.4": {
|
||||
"targetAlias": "netstandard1.4",
|
||||
"projectReferences": {}
|
||||
}
|
||||
},
|
||||
"warningProperties": {
|
||||
"warnAsError": [
|
||||
"NU1605"
|
||||
]
|
||||
}
|
||||
},
|
||||
"frameworks": {
|
||||
"netstandard1.4": {
|
||||
"targetAlias": "netstandard1.4",
|
||||
"dependencies": {
|
||||
"NETStandard.Library": {
|
||||
"target": "Package",
|
||||
"version": "[1.6.1, )",
|
||||
"autoReferenced": true
|
||||
},
|
||||
"Newtonsoft.Json": {
|
||||
"target": "Package",
|
||||
"version": "[9.0.1, )"
|
||||
},
|
||||
"System.Memory": {
|
||||
"target": "Package",
|
||||
"version": "[4.5.4, )"
|
||||
}
|
||||
},
|
||||
"runtimeIdentifierGraphPath": "/usr/share/dotnet/sdk/6.0.201/RuntimeIdentifierGraph.json"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,18 @@
|
|||
<?xml version="1.0" encoding="utf-8" standalone="no"?>
|
||||
<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup Condition=" '$(ExcludeRestorePackageImports)' != 'true' ">
|
||||
<RestoreSuccess Condition=" '$(RestoreSuccess)' == '' ">True</RestoreSuccess>
|
||||
<RestoreTool Condition=" '$(RestoreTool)' == '' ">NuGet</RestoreTool>
|
||||
<ProjectAssetsFile Condition=" '$(ProjectAssetsFile)' == '' ">$(MSBuildThisFileDirectory)project.assets.json</ProjectAssetsFile>
|
||||
<NuGetPackageRoot Condition=" '$(NuGetPackageRoot)' == '' ">/home/esqueleto/.nuget/packages/</NuGetPackageRoot>
|
||||
<NuGetPackageFolders Condition=" '$(NuGetPackageFolders)' == '' ">/home/esqueleto/.nuget/packages/</NuGetPackageFolders>
|
||||
<NuGetProjectStyle Condition=" '$(NuGetProjectStyle)' == '' ">PackageReference</NuGetProjectStyle>
|
||||
<NuGetToolVersion Condition=" '$(NuGetToolVersion)' == '' ">6.1.0</NuGetToolVersion>
|
||||
</PropertyGroup>
|
||||
<ItemGroup Condition=" '$(ExcludeRestorePackageImports)' != 'true' ">
|
||||
<SourceRoot Include="/home/esqueleto/.nuget/packages/" />
|
||||
</ItemGroup>
|
||||
<PropertyGroup Condition=" '$(ExcludeRestorePackageImports)' != 'true' ">
|
||||
<PkgMicrosoft_VisualStudio_Threading_Analyzers Condition=" '$(PkgMicrosoft_VisualStudio_Threading_Analyzers)' == '' ">/home/esqueleto/.nuget/packages/microsoft.visualstudio.threading.analyzers/16.7.56</PkgMicrosoft_VisualStudio_Threading_Analyzers>
|
||||
</PropertyGroup>
|
||||
</Project>
|
|
@ -0,0 +1,6 @@
|
|||
<?xml version="1.0" encoding="utf-8" standalone="no"?>
|
||||
<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ImportGroup Condition=" '$(ExcludeRestorePackageImports)' != 'true' ">
|
||||
<Import Project="$(NuGetPackageRoot)system.reactive/4.4.1/buildTransitive/netcoreapp3.0/System.Reactive.targets" Condition="Exists('$(NuGetPackageRoot)system.reactive/4.4.1/buildTransitive/netcoreapp3.0/System.Reactive.targets')" />
|
||||
</ImportGroup>
|
||||
</Project>
|
|
@ -0,0 +1,4 @@
|
|||
// <autogenerated />
|
||||
using System;
|
||||
using System.Reflection;
|
||||
[assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETCoreApp,Version=v6.0", FrameworkDisplayName = "")]
|
|
@ -0,0 +1,23 @@
|
|||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:4.0.30319.42000
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
using System;
|
||||
using System.Reflection;
|
||||
|
||||
[assembly: System.Reflection.AssemblyCompanyAttribute("Avalonia.AXAML.LanguageServer")]
|
||||
[assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")]
|
||||
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")]
|
||||
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0")]
|
||||
[assembly: System.Reflection.AssemblyProductAttribute("Avalonia.AXAML.LanguageServer")]
|
||||
[assembly: System.Reflection.AssemblyTitleAttribute("Avalonia.AXAML.LanguageServer")]
|
||||
[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]
|
||||
|
||||
// Generated by the MSBuild WriteCodeFragment class.
|
||||
|
|
@ -0,0 +1 @@
|
|||
58a96164689c833cec1841e0b151ec7925c9df95
|
|
@ -0,0 +1,10 @@
|
|||
is_global = true
|
||||
build_property.TargetFramework = net6.0
|
||||
build_property.TargetPlatformMinVersion =
|
||||
build_property.UsingMicrosoftNETSdkWeb =
|
||||
build_property.ProjectTypeGuids =
|
||||
build_property.InvariantGlobalization =
|
||||
build_property.PlatformNeutralAssembly =
|
||||
build_property._SupportedPlatformList = Linux,macOS,Windows
|
||||
build_property.RootNamespace = Avalonia.AXAML.LanguageServer
|
||||
build_property.ProjectDir = /home/esqueleto/myWork/avalonia-axamlautocompletion/Avalonia.AXAML.LanguageServer/Avalonia.AXAML.LanguageServer/
|
|
@ -0,0 +1,8 @@
|
|||
// <auto-generated/>
|
||||
global using global::System;
|
||||
global using global::System.Collections.Generic;
|
||||
global using global::System.IO;
|
||||
global using global::System.Linq;
|
||||
global using global::System.Net.Http;
|
||||
global using global::System.Threading;
|
||||
global using global::System.Threading.Tasks;
|
Двоичный файл не отображается.
Двоичный файл не отображается.
Некоторые файлы не были показаны из-за слишком большого количества измененных файлов Показать больше
Загрузка…
Ссылка в новой задаче