Compare commits
133 Commits
028a005b01
...
refactor
Author | SHA1 | Date | |
---|---|---|---|
|
27282721bc | ||
|
144cb84c2c | ||
|
ae5f9a1771 | ||
|
c8fa373972 | ||
|
f1f0fb8bf3 | ||
|
d6dd414aba | ||
|
2b6fc2fc91 | ||
|
762b86be85 | ||
|
38166cf6f2 | ||
|
c012471a22 | ||
|
0091c9ef71 | ||
|
f6ed883ddb | ||
|
ae3b5e80d0 | ||
|
4226623abc | ||
|
637478b1c3 | ||
|
24c5cd823f | ||
|
26eedc5b32 | ||
|
c21f09496e | ||
|
39ae1d66bc | ||
|
6ee0a74b22 | ||
|
ca6fa89e3f | ||
|
8cde997c15 | ||
|
72ef89baa9 | ||
|
51edd4193f | ||
|
ade00dff4f | ||
|
a17a7a6c83 | ||
|
680e8b17b1 | ||
|
4958fd8b44 | ||
|
c85f2f3c13 | ||
|
669dc9b535 | ||
|
6b3ede2deb | ||
|
d5ee17b3d3 | ||
|
bb79020028 | ||
|
3b0c261ebe | ||
|
1eb136be73 | ||
|
a63af12365 | ||
|
4971e0762c | ||
|
f072e26e1d | ||
|
1e3fa2d315 | ||
|
119ced125d | ||
|
306204d436 | ||
|
bdc0b8a2b6 | ||
|
ecd57ceec7 | ||
|
1803fec36a | ||
|
c3d2252476 | ||
|
1dfa30e05e | ||
|
b08c921933 | ||
|
252f64a2bb | ||
|
7143126741 | ||
|
de2595cf62 | ||
|
58a895b581 | ||
|
0740f95c26 | ||
|
b192e33615 | ||
|
4219678db6 | ||
|
12781de581 | ||
|
89af1759ff | ||
|
1e117600f9 | ||
|
6f457479aa | ||
|
3b0b97841e | ||
|
fbf8704af6 | ||
|
dc896a453d | ||
|
5d41a19705 | ||
|
ae2461b99d | ||
|
234e6eed1a | ||
|
9ea1bff5f4 | ||
|
a4060225e1 | ||
|
2a72aa3a57 | ||
|
cabb7258aa | ||
|
25a1876b8f | ||
|
d9177cbdf2 | ||
|
c0b7f55491 | ||
|
6d0f243c80 | ||
|
bc09039e73 | ||
|
6d6786d3b7 | ||
|
d470a93645 | ||
|
535e121c0f | ||
|
077abb2c09 | ||
|
2b62965c44 | ||
|
a9eee2e4cf | ||
|
c47e8f4a9d | ||
|
ac99140020 | ||
|
3ee03cc788 | ||
|
80f533913c | ||
|
05ef4123f0 | ||
|
57f41cf534 | ||
|
04894b3667 | ||
|
63a2876959 | ||
|
24d01f756b | ||
|
cda180fbb8 | ||
|
ca020b2929 | ||
|
463fdc97a3 | ||
|
dd91476f04 | ||
|
e3a4a981ba | ||
|
acd5d5f09c | ||
|
b6bf0d8b17 | ||
|
2de2617a8d | ||
|
1cc5f8a4fd | ||
|
58e31a8bea | ||
|
cbeaa12d9c | ||
|
2f08a2acb6 | ||
|
856f7f4bd0 | ||
|
5bc8683665 | ||
|
2056e5504c | ||
|
a540a3f54a | ||
|
bdf3e890a5 | ||
|
46e4be9ff5 | ||
|
64124daa61 | ||
|
5da122db9c | ||
|
236be16fda | ||
|
2c6ccf0c48 | ||
|
3038cd7e68 | ||
|
d56d06f752 | ||
|
a447cd3f39 | ||
|
0173dd86da | ||
|
214e80cfa2 | ||
|
d5d562cee1 | ||
|
a236add9f6 | ||
|
28684dcaba | ||
|
43ca14194b | ||
|
32a7a6e015 | ||
|
2f25c64dc6 | ||
|
3a9468a174 | ||
|
e93058e76f | ||
|
be77b7875e | ||
|
8c6a6a0282 | ||
|
a23bf7c16c | ||
|
60f8352fb4 | ||
|
397e9e4026 | ||
|
c621d5d791 | ||
|
3a5324a718 | ||
|
b30d4e97e5 | ||
|
782ea67831 | ||
|
8acd8c7ff1 |
6
.idea/JavaTXLanguageServer.iml
generated
Normal file
6
.idea/JavaTXLanguageServer.iml
generated
Normal file
@@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<module version="4">
|
||||
<component name="AdditionalModuleElements">
|
||||
<content url="file://$MODULE_DIR$" />
|
||||
</component>
|
||||
</module>
|
42
Clients/Intellij/.gitignore
vendored
Normal file
42
Clients/Intellij/.gitignore
vendored
Normal file
@@ -0,0 +1,42 @@
|
||||
.gradle
|
||||
build/
|
||||
!gradle/wrapper/gradle-wrapper.jar
|
||||
!**/src/main/**/build/
|
||||
!**/src/test/**/build/
|
||||
|
||||
### IntelliJ IDEA ###
|
||||
.idea/modules.xml
|
||||
.idea/jarRepositories.xml
|
||||
.idea/compiler.xml
|
||||
.idea/libraries/
|
||||
*.iws
|
||||
*.iml
|
||||
*.ipr
|
||||
out/
|
||||
!**/src/main/**/out/
|
||||
!**/src/test/**/out/
|
||||
|
||||
### Eclipse ###
|
||||
.apt_generated
|
||||
.classpath
|
||||
.factorypath
|
||||
.project
|
||||
.settings
|
||||
.springBeans
|
||||
.sts4-cache
|
||||
bin/
|
||||
!**/src/main/**/bin/
|
||||
!**/src/test/**/bin/
|
||||
|
||||
### NetBeans ###
|
||||
/nbproject/private/
|
||||
/nbbuild/
|
||||
/dist/
|
||||
/nbdist/
|
||||
/.nb-gradle/
|
||||
|
||||
### VS Code ###
|
||||
.vscode/
|
||||
|
||||
### Mac OS ###
|
||||
.DS_Store
|
3
Clients/Intellij/.idea/.gitignore
generated
vendored
Normal file
3
Clients/Intellij/.idea/.gitignore
generated
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
# Default ignored files
|
||||
/shelf/
|
||||
/workspace.xml
|
17
Clients/Intellij/.idea/gradle.xml
generated
Normal file
17
Clients/Intellij/.idea/gradle.xml
generated
Normal file
@@ -0,0 +1,17 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="GradleMigrationSettings" migrationVersion="1" />
|
||||
<component name="GradleSettings">
|
||||
<option name="linkedExternalProjectsSettings">
|
||||
<GradleProjectSettings>
|
||||
<option name="externalProjectPath" value="$PROJECT_DIR$" />
|
||||
<option name="gradleHome" value="" />
|
||||
<option name="modules">
|
||||
<set>
|
||||
<option value="$PROJECT_DIR$" />
|
||||
</set>
|
||||
</option>
|
||||
</GradleProjectSettings>
|
||||
</option>
|
||||
</component>
|
||||
</project>
|
7
Clients/Intellij/.idea/misc.xml
generated
Normal file
7
Clients/Intellij/.idea/misc.xml
generated
Normal file
@@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="ExternalStorageConfigurationManager" enabled="true" />
|
||||
<component name="ProjectRootManager" version="2" languageLevel="JDK_17" project-jdk-name="openjdk-23" project-jdk-type="JavaSDK">
|
||||
<output url="file://$PROJECT_DIR$/out" />
|
||||
</component>
|
||||
</project>
|
6
Clients/Intellij/.idea/vcs.xml
generated
Normal file
6
Clients/Intellij/.idea/vcs.xml
generated
Normal file
@@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="VcsDirectoryMappings">
|
||||
<mapping directory="$PROJECT_DIR$/../.." vcs="Git" />
|
||||
</component>
|
||||
</project>
|
41
Clients/Intellij/build.gradle.kts
Normal file
41
Clients/Intellij/build.gradle.kts
Normal file
@@ -0,0 +1,41 @@
|
||||
plugins {
|
||||
id("org.jetbrains.intellij") version "1.17.3"
|
||||
kotlin("jvm") version "1.9.0"
|
||||
}
|
||||
|
||||
group = "com.example"
|
||||
version = "1.0.0"
|
||||
|
||||
repositories {
|
||||
mavenCentral()
|
||||
maven { url = uri("https://jitpack.io") }
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation(kotlin("stdlib"))
|
||||
implementation("com.github.ballerina-platform:lsp4intellij:0.9.0")
|
||||
}
|
||||
|
||||
|
||||
java {
|
||||
sourceCompatibility = JavaVersion.VERSION_17
|
||||
targetCompatibility = JavaVersion.VERSION_17
|
||||
}
|
||||
|
||||
tasks.withType<org.jetbrains.kotlin.gradle.tasks.KotlinCompile> {
|
||||
kotlinOptions {
|
||||
jvmTarget = "17"
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
intellij {
|
||||
version.set("2023.3")
|
||||
}
|
||||
|
||||
tasks {
|
||||
patchPluginXml {
|
||||
sinceBuild.set("233")
|
||||
untilBuild.set("233.*")
|
||||
}
|
||||
}
|
BIN
Clients/Intellij/gradle/wrapper/gradle-wrapper.jar
vendored
Normal file
BIN
Clients/Intellij/gradle/wrapper/gradle-wrapper.jar
vendored
Normal file
Binary file not shown.
6
Clients/Intellij/gradle/wrapper/gradle-wrapper.properties
vendored
Normal file
6
Clients/Intellij/gradle/wrapper/gradle-wrapper.properties
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
#Thu Feb 20 15:20:24 CET 2025
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.10-bin.zip
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
zipStorePath=wrapper/dists
|
234
Clients/Intellij/gradlew
vendored
Executable file
234
Clients/Intellij/gradlew
vendored
Executable file
@@ -0,0 +1,234 @@
|
||||
#!/bin/sh
|
||||
|
||||
#
|
||||
# Copyright © 2015-2021 the original authors.
|
||||
#
|
||||
# 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
|
||||
#
|
||||
# https://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.
|
||||
#
|
||||
|
||||
##############################################################################
|
||||
#
|
||||
# Gradle start up script for POSIX generated by Gradle.
|
||||
#
|
||||
# Important for running:
|
||||
#
|
||||
# (1) You need a POSIX-compliant shell to run this script. If your /bin/sh is
|
||||
# noncompliant, but you have some other compliant shell such as ksh or
|
||||
# bash, then to run this script, type that shell name before the whole
|
||||
# command line, like:
|
||||
#
|
||||
# ksh Gradle
|
||||
#
|
||||
# Busybox and similar reduced shells will NOT work, because this script
|
||||
# requires all of these POSIX shell features:
|
||||
# * functions;
|
||||
# * expansions «$var», «${var}», «${var:-default}», «${var+SET}»,
|
||||
# «${var#prefix}», «${var%suffix}», and «$( cmd )»;
|
||||
# * compound commands having a testable exit status, especially «case»;
|
||||
# * various built-in commands including «command», «set», and «ulimit».
|
||||
#
|
||||
# Important for patching:
|
||||
#
|
||||
# (2) This script targets any POSIX shell, so it avoids extensions provided
|
||||
# by Bash, Ksh, etc; in particular arrays are avoided.
|
||||
#
|
||||
# The "traditional" practice of packing multiple parameters into a
|
||||
# space-separated string is a well documented source of bugs and security
|
||||
# problems, so this is (mostly) avoided, by progressively accumulating
|
||||
# options in "$@", and eventually passing that to Java.
|
||||
#
|
||||
# Where the inherited environment variables (DEFAULT_JVM_OPTS, JAVA_OPTS,
|
||||
# and GRADLE_OPTS) rely on word-splitting, this is performed explicitly;
|
||||
# see the in-line comments for details.
|
||||
#
|
||||
# There are tweaks for specific operating systems such as AIX, CygWin,
|
||||
# Darwin, MinGW, and NonStop.
|
||||
#
|
||||
# (3) This script is generated from the Groovy template
|
||||
# https://github.com/gradle/gradle/blob/master/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
|
||||
# within the Gradle project.
|
||||
#
|
||||
# You can find Gradle at https://github.com/gradle/gradle/.
|
||||
#
|
||||
##############################################################################
|
||||
|
||||
# Attempt to set APP_HOME
|
||||
|
||||
# Resolve links: $0 may be a link
|
||||
app_path=$0
|
||||
|
||||
# Need this for daisy-chained symlinks.
|
||||
while
|
||||
APP_HOME=${app_path%"${app_path##*/}"} # leaves a trailing /; empty if no leading path
|
||||
[ -h "$app_path" ]
|
||||
do
|
||||
ls=$( ls -ld "$app_path" )
|
||||
link=${ls#*' -> '}
|
||||
case $link in #(
|
||||
/*) app_path=$link ;; #(
|
||||
*) app_path=$APP_HOME$link ;;
|
||||
esac
|
||||
done
|
||||
|
||||
APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit
|
||||
|
||||
APP_NAME="Gradle"
|
||||
APP_BASE_NAME=${0##*/}
|
||||
|
||||
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
||||
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
|
||||
|
||||
# Use the maximum available, or set MAX_FD != -1 to use that value.
|
||||
MAX_FD=maximum
|
||||
|
||||
warn () {
|
||||
echo "$*"
|
||||
} >&2
|
||||
|
||||
die () {
|
||||
echo
|
||||
echo "$*"
|
||||
echo
|
||||
exit 1
|
||||
} >&2
|
||||
|
||||
# OS specific support (must be 'true' or 'false').
|
||||
cygwin=false
|
||||
msys=false
|
||||
darwin=false
|
||||
nonstop=false
|
||||
case "$( uname )" in #(
|
||||
CYGWIN* ) cygwin=true ;; #(
|
||||
Darwin* ) darwin=true ;; #(
|
||||
MSYS* | MINGW* ) msys=true ;; #(
|
||||
NONSTOP* ) nonstop=true ;;
|
||||
esac
|
||||
|
||||
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
|
||||
|
||||
|
||||
# Determine the Java command to use to start the JVM.
|
||||
if [ -n "$JAVA_HOME" ] ; then
|
||||
if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
|
||||
# IBM's JDK on AIX uses strange locations for the executables
|
||||
JAVACMD=$JAVA_HOME/jre/sh/java
|
||||
else
|
||||
JAVACMD=$JAVA_HOME/bin/java
|
||||
fi
|
||||
if [ ! -x "$JAVACMD" ] ; then
|
||||
die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
|
||||
|
||||
Please set the JAVA_HOME variable in your environment to match the
|
||||
location of your Java installation."
|
||||
fi
|
||||
else
|
||||
JAVACMD=java
|
||||
which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
|
||||
|
||||
Please set the JAVA_HOME variable in your environment to match the
|
||||
location of your Java installation."
|
||||
fi
|
||||
|
||||
# Increase the maximum file descriptors if we can.
|
||||
if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
|
||||
case $MAX_FD in #(
|
||||
max*)
|
||||
MAX_FD=$( ulimit -H -n ) ||
|
||||
warn "Could not query maximum file descriptor limit"
|
||||
esac
|
||||
case $MAX_FD in #(
|
||||
'' | soft) :;; #(
|
||||
*)
|
||||
ulimit -n "$MAX_FD" ||
|
||||
warn "Could not set maximum file descriptor limit to $MAX_FD"
|
||||
esac
|
||||
fi
|
||||
|
||||
# Collect all arguments for the java command, stacking in reverse order:
|
||||
# * args from the command line
|
||||
# * the main class name
|
||||
# * -classpath
|
||||
# * -D...appname settings
|
||||
# * --module-path (only if needed)
|
||||
# * DEFAULT_JVM_OPTS, JAVA_OPTS, and GRADLE_OPTS environment variables.
|
||||
|
||||
# For Cygwin or MSYS, switch paths to Windows format before running java
|
||||
if "$cygwin" || "$msys" ; then
|
||||
APP_HOME=$( cygpath --path --mixed "$APP_HOME" )
|
||||
CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" )
|
||||
|
||||
JAVACMD=$( cygpath --unix "$JAVACMD" )
|
||||
|
||||
# Now convert the arguments - kludge to limit ourselves to /bin/sh
|
||||
for arg do
|
||||
if
|
||||
case $arg in #(
|
||||
-*) false ;; # don't mess with options #(
|
||||
/?*) t=${arg#/} t=/${t%%/*} # looks like a POSIX filepath
|
||||
[ -e "$t" ] ;; #(
|
||||
*) false ;;
|
||||
esac
|
||||
then
|
||||
arg=$( cygpath --path --ignore --mixed "$arg" )
|
||||
fi
|
||||
# Roll the args list around exactly as many times as the number of
|
||||
# args, so each arg winds up back in the position where it started, but
|
||||
# possibly modified.
|
||||
#
|
||||
# NB: a `for` loop captures its iteration list before it begins, so
|
||||
# changing the positional parameters here affects neither the number of
|
||||
# iterations, nor the values presented in `arg`.
|
||||
shift # remove old arg
|
||||
set -- "$@" "$arg" # push replacement arg
|
||||
done
|
||||
fi
|
||||
|
||||
# Collect all arguments for the java command;
|
||||
# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of
|
||||
# shell script including quotes and variable substitutions, so put them in
|
||||
# double quotes to make sure that they get re-expanded; and
|
||||
# * put everything else in single quotes, so that it's not re-expanded.
|
||||
|
||||
set -- \
|
||||
"-Dorg.gradle.appname=$APP_BASE_NAME" \
|
||||
-classpath "$CLASSPATH" \
|
||||
org.gradle.wrapper.GradleWrapperMain \
|
||||
"$@"
|
||||
|
||||
# Use "xargs" to parse quoted args.
|
||||
#
|
||||
# With -n1 it outputs one arg per line, with the quotes and backslashes removed.
|
||||
#
|
||||
# In Bash we could simply go:
|
||||
#
|
||||
# readarray ARGS < <( xargs -n1 <<<"$var" ) &&
|
||||
# set -- "${ARGS[@]}" "$@"
|
||||
#
|
||||
# but POSIX shell has neither arrays nor command substitution, so instead we
|
||||
# post-process each arg (as a line of input to sed) to backslash-escape any
|
||||
# character that might be a shell metacharacter, then use eval to reverse
|
||||
# that process (while maintaining the separation between arguments), and wrap
|
||||
# the whole thing up as a single "set" statement.
|
||||
#
|
||||
# This will of course break if any of these variables contains a newline or
|
||||
# an unmatched quote.
|
||||
#
|
||||
|
||||
eval "set -- $(
|
||||
printf '%s\n' "$DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS" |
|
||||
xargs -n1 |
|
||||
sed ' s~[^-[:alnum:]+,./:=@_]~\\&~g; ' |
|
||||
tr '\n' ' '
|
||||
)" '"$@"'
|
||||
|
||||
exec "$JAVACMD" "$@"
|
89
Clients/Intellij/gradlew.bat
vendored
Normal file
89
Clients/Intellij/gradlew.bat
vendored
Normal file
@@ -0,0 +1,89 @@
|
||||
@rem
|
||||
@rem Copyright 2015 the original author or authors.
|
||||
@rem
|
||||
@rem Licensed under the Apache License, Version 2.0 (the "License");
|
||||
@rem you may not use this file except in compliance with the License.
|
||||
@rem You may obtain a copy of the License at
|
||||
@rem
|
||||
@rem https://www.apache.org/licenses/LICENSE-2.0
|
||||
@rem
|
||||
@rem Unless required by applicable law or agreed to in writing, software
|
||||
@rem distributed under the License is distributed on an "AS IS" BASIS,
|
||||
@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
@rem See the License for the specific language governing permissions and
|
||||
@rem limitations under the License.
|
||||
@rem
|
||||
|
||||
@if "%DEBUG%" == "" @echo off
|
||||
@rem ##########################################################################
|
||||
@rem
|
||||
@rem Gradle startup script for Windows
|
||||
@rem
|
||||
@rem ##########################################################################
|
||||
|
||||
@rem Set local scope for the variables with windows NT shell
|
||||
if "%OS%"=="Windows_NT" setlocal
|
||||
|
||||
set DIRNAME=%~dp0
|
||||
if "%DIRNAME%" == "" set DIRNAME=.
|
||||
set APP_BASE_NAME=%~n0
|
||||
set APP_HOME=%DIRNAME%
|
||||
|
||||
@rem Resolve any "." and ".." in APP_HOME to make it shorter.
|
||||
for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi
|
||||
|
||||
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
||||
set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
|
||||
|
||||
@rem Find java.exe
|
||||
if defined JAVA_HOME goto findJavaFromJavaHome
|
||||
|
||||
set JAVA_EXE=java.exe
|
||||
%JAVA_EXE% -version >NUL 2>&1
|
||||
if "%ERRORLEVEL%" == "0" goto execute
|
||||
|
||||
echo.
|
||||
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
|
||||
echo.
|
||||
echo Please set the JAVA_HOME variable in your environment to match the
|
||||
echo location of your Java installation.
|
||||
|
||||
goto fail
|
||||
|
||||
:findJavaFromJavaHome
|
||||
set JAVA_HOME=%JAVA_HOME:"=%
|
||||
set JAVA_EXE=%JAVA_HOME%/bin/java.exe
|
||||
|
||||
if exist "%JAVA_EXE%" goto execute
|
||||
|
||||
echo.
|
||||
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
|
||||
echo.
|
||||
echo Please set the JAVA_HOME variable in your environment to match the
|
||||
echo location of your Java installation.
|
||||
|
||||
goto fail
|
||||
|
||||
:execute
|
||||
@rem Setup the command line
|
||||
|
||||
set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
|
||||
|
||||
|
||||
@rem Execute Gradle
|
||||
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %*
|
||||
|
||||
:end
|
||||
@rem End local scope for the variables with windows NT shell
|
||||
if "%ERRORLEVEL%"=="0" goto mainEnd
|
||||
|
||||
:fail
|
||||
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
|
||||
rem the _cmd.exe /c_ return code!
|
||||
if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
|
||||
exit /b 1
|
||||
|
||||
:mainEnd
|
||||
if "%OS%"=="Windows_NT" endlocal
|
||||
|
||||
:omega
|
2
Clients/Intellij/settings.gradle
Normal file
2
Clients/Intellij/settings.gradle
Normal file
@@ -0,0 +1,2 @@
|
||||
rootProject.name = 'Intellij'
|
||||
|
17
Clients/Intellij/src/main/java/org/example/Main.java
Normal file
17
Clients/Intellij/src/main/java/org/example/Main.java
Normal file
@@ -0,0 +1,17 @@
|
||||
package org.example;
|
||||
|
||||
//TIP To <b>Run</b> code, press <shortcut actionId="Run"/> or
|
||||
// click the <icon src="AllIcons.Actions.Execute"/> icon in the gutter.
|
||||
public class Main {
|
||||
public static void main(String[] args) {
|
||||
//TIP Press <shortcut actionId="ShowIntentionActions"/> with your caret at the highlighted text
|
||||
// to see how IntelliJ IDEA suggests fixing it.
|
||||
System.out.printf("Hello and welcome!");
|
||||
|
||||
for (int i = 1; i <= 5; i++) {
|
||||
//TIP Press <shortcut actionId="Debug"/> to start debugging your code. We have set one <icon src="AllIcons.Debugger.Db_set_breakpoint"/> breakpoint
|
||||
// for you, but you can always add more by pressing <shortcut actionId="ToggleLineBreakpoint"/>.
|
||||
System.out.println("i = " + i);
|
||||
}
|
||||
}
|
||||
}
|
@@ -0,0 +1,14 @@
|
||||
package kotlin.com.example.lsp;
|
||||
|
||||
import com.intellij.openapi.application.PreloadingActivity;
|
||||
import com.intellij.openapi.progress.ProgressIndicator;
|
||||
import org.wso2.lsp4intellij.IntellijLanguageClient;
|
||||
import org.wso2.lsp4intellij.client.languageserver.serverdefinition.RawCommandServerDefinition;
|
||||
|
||||
public class PreloadActivityTX extends PreloadingActivity {
|
||||
@Override
|
||||
public void preload(ProgressIndicator indicator) {
|
||||
String[] command = new String[]{"java", "-jar", "/JavaTXLanguageServer-1.0-SNAPSHOT-jar-with-dependencies.jar"};
|
||||
IntellijLanguageClient.addServerDefinition(new RawCommandServerDefinition("jav", command));
|
||||
}
|
||||
}
|
76
Clients/Intellij/src/resources/META-INF/plugin.xml
Normal file
76
Clients/Intellij/src/resources/META-INF/plugin.xml
Normal file
@@ -0,0 +1,76 @@
|
||||
<!--
|
||||
an example how you can configure an plugin xml with you plugin
|
||||
see also jetbrains documentation: https://plugins.jetbrains.com/docs/intellij/plugin-configuration-file.html -->
|
||||
<idea-plugin>
|
||||
<id>your.plugin.namespace</id>
|
||||
<name>Your Plugin Name</name>
|
||||
<vendor>your company/org</vendor>
|
||||
<description>a description of your plugin</description>
|
||||
|
||||
<!-- Product and plugin compatibility requirements -->
|
||||
<!-- https://www.jetbrains.org/intellij/sdk/docs/basics/getting_started/plugin_compatibility.html -->
|
||||
<depends>com.intellij.modules.platform</depends>
|
||||
|
||||
<extensions defaultExtensionNs="com.intellij">
|
||||
<!-- register a preloading activity. You need to init IntellijLanguageClient with your config, see readme -->
|
||||
<preloadingActivity implementation="kotlin.com.example.lsp.PreloadActivityTX" id="kotlin.com.example.lsp.PreloadActivityTX"/>
|
||||
|
||||
<!-- register intellijLanguageClient as a Service OR as a plugin component (see readme)... -->
|
||||
<applicationService serviceImplementation="org.wso2.lsp4intellij.IntellijLanguageClient"/>
|
||||
|
||||
<!-- register a listener on editor events, required for lsp file sync -->
|
||||
<editorFactoryListener implementation="org.wso2.lsp4intellij.listeners.LSPEditorListener"/>
|
||||
<fileDocumentManagerListener implementation="org.wso2.lsp4intellij.listeners.LSPFileDocumentManagerListener"/>
|
||||
|
||||
<!-- for displaying notifications by lsp -->
|
||||
<notificationGroup id="lsp" displayType="STICKY_BALLOON"/>
|
||||
|
||||
<!-- for displaying progress notifications by lsp in the Event Log -->
|
||||
<notificationGroup id="LSPProgressNotification" displayType="NONE" />
|
||||
|
||||
<!-- for displaying the statusbar icon -->
|
||||
<statusBarWidgetFactory implementation="org.wso2.lsp4intellij.statusbar.LSPServerStatusWidgetFactory"
|
||||
id="org.wso2.lsp4intellij.statusbar.LSPServerStatusWidgetFactory"
|
||||
order="first" />
|
||||
|
||||
<!-- needed for completion -->
|
||||
<completion.contributor implementationClass="org.wso2.lsp4intellij.contributors.LSPCompletionContributor"
|
||||
id="org.wso2.lsp4intellij.contributors.LSPCompletionContributor" language="YOUR_LANGUAGE_ID"/>
|
||||
<!-- needed for completion as well as signature help -->
|
||||
<typedHandler implementation="org.wso2.lsp4intellij.listeners.LSPTypedHandler"
|
||||
id="LSPTypedHandler"/>
|
||||
|
||||
<!-- needed for code diagnostics -->
|
||||
<externalAnnotator id="LSPAnnotator" language="YOUR_LANGUAGE_ID"
|
||||
implementationClass="org.wso2.lsp4intellij.contributors.annotator.LSPAnnotator"/>
|
||||
|
||||
<!-- needed for Workspace Symbols -->
|
||||
<gotoSymbolContributor implementation="org.wso2.lsp4intellij.contributors.symbol.LSPSymbolContributor"
|
||||
id="LSPSymbolContributor"/>
|
||||
|
||||
<!-- needed for renaming -->
|
||||
<renameHandler implementation="org.wso2.lsp4intellij.contributors.rename.LSPRenameHandler" id="LSPRenameHandler" order="first"/>
|
||||
<renamePsiElementProcessor implementation="org.wso2.lsp4intellij.contributors.rename.LSPRenameProcessor" id="LSPRenameProcessor" order="first"/>
|
||||
|
||||
<!-- needed for folding support -->
|
||||
<lang.foldingBuilder language="YOUR_LANGUAGE_ID" implementationClass="org.wso2.lsp4intellij.contributors.LSPFoldingRangeProvider" id="LSPFoldingRangeProvider" order="first" />
|
||||
</extensions>
|
||||
|
||||
<actions>
|
||||
<!-- needed for hover -->
|
||||
<action id="org.intellij.sdk.action.QuickDocAction" class="org.wso2.lsp4intellij.actions.LSPQuickDocAction">
|
||||
</action>
|
||||
|
||||
<!-- needed for find references -->
|
||||
<action class="org.wso2.lsp4intellij.actions.LSPReferencesAction" id="LSPFindUsages">
|
||||
<keyboard-shortcut first-keystroke="shift alt F7" keymap="$default"/>
|
||||
</action>
|
||||
</actions>
|
||||
<applicationListeners>
|
||||
<!-- required for lsp file sync -->
|
||||
<listener class="org.wso2.lsp4intellij.listeners.VFSListener"
|
||||
topic="com.intellij.openapi.vfs.VirtualFileListener"/>
|
||||
<listener class="org.wso2.lsp4intellij.listeners.LSPProjectManagerListener"
|
||||
topic="com.intellij.openapi.project.ProjectManagerListener"/>
|
||||
</applicationListeners>
|
||||
</idea-plugin>
|
@@ -9,3 +9,7 @@ vsc-extension-quickstart.md
|
||||
**/*.map
|
||||
**/*.ts
|
||||
**/.vscode-test.*
|
||||
|
||||
!JavaTXLanguageServer-1.0-SNAPSHOT-jar-with-dependencies.jar
|
||||
|
||||
!JavaTXLanguageServer-1.0-SNAPSHOT-jar-with-dependencies.jar
|
||||
|
Binary file not shown.
@@ -1,71 +1,3 @@
|
||||
# lspclient README
|
||||
|
||||
This is the README for your extension "lspclient". After writing up a brief description, we recommend including the following sections.
|
||||
|
||||
## Features
|
||||
|
||||
Describe specific features of your extension including screenshots of your extension in action. Image paths are relative to this README file.
|
||||
|
||||
For example if there is an image subfolder under your extension project workspace:
|
||||
|
||||
\!\[feature X\]\(images/feature-x.png\)
|
||||
|
||||
> Tip: Many popular extensions utilize animations. This is an excellent way to show off your extension! We recommend short, focused animations that are easy to follow.
|
||||
|
||||
## Requirements
|
||||
|
||||
If you have any requirements or dependencies, add a section describing those and how to install and configure them.
|
||||
|
||||
## Extension Settings
|
||||
|
||||
Include if your extension adds any VS Code settings through the `contributes.configuration` extension point.
|
||||
|
||||
For example:
|
||||
|
||||
This extension contributes the following settings:
|
||||
|
||||
* `myExtension.enable`: Enable/disable this extension.
|
||||
* `myExtension.thing`: Set to `blah` to do something.
|
||||
|
||||
## Known Issues
|
||||
|
||||
Calling out known issues can help limit users opening duplicate issues against your extension.
|
||||
|
||||
## Release Notes
|
||||
|
||||
Users appreciate release notes as you update your extension.
|
||||
|
||||
### 1.0.0
|
||||
|
||||
Initial release of ...
|
||||
|
||||
### 1.0.1
|
||||
|
||||
Fixed issue #.
|
||||
|
||||
### 1.1.0
|
||||
|
||||
Added features X, Y, and Z.
|
||||
|
||||
---
|
||||
|
||||
## Following extension guidelines
|
||||
|
||||
Ensure that you've read through the extensions guidelines and follow the best practices for creating your extension.
|
||||
|
||||
* [Extension Guidelines](https://code.visualstudio.com/api/references/extension-guidelines)
|
||||
|
||||
## Working with Markdown
|
||||
|
||||
You can author your README using Visual Studio Code. Here are some useful editor keyboard shortcuts:
|
||||
|
||||
* Split the editor (`Cmd+\` on macOS or `Ctrl+\` on Windows and Linux).
|
||||
* Toggle preview (`Shift+Cmd+V` on macOS or `Shift+Ctrl+V` on Windows and Linux).
|
||||
* Press `Ctrl+Space` (Windows, Linux, macOS) to see a list of Markdown snippets.
|
||||
|
||||
## For more information
|
||||
|
||||
* [Visual Studio Code's Markdown Support](http://code.visualstudio.com/docs/languages/markdown)
|
||||
* [Markdown Syntax Reference](https://help.github.com/articles/markdown-basics/)
|
||||
|
||||
**Enjoy!**
|
||||
This is the README for the Java-TX LSP Client.
|
4
Clients/VisualStudioCode/package-lock.json
generated
4
Clients/VisualStudioCode/package-lock.json
generated
@@ -1,12 +1,12 @@
|
||||
{
|
||||
"name": "lspclient",
|
||||
"version": "0.0.1",
|
||||
"version": "0.0.2",
|
||||
"lockfileVersion": 3,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "lspclient",
|
||||
"version": "0.0.1",
|
||||
"version": "0.0.2",
|
||||
"dependencies": {
|
||||
"vscode-languageclient": "^9.0.1"
|
||||
},
|
||||
|
@@ -9,7 +9,9 @@
|
||||
"categories": [
|
||||
"Other"
|
||||
],
|
||||
"activationEvents": [],
|
||||
"activationEvents": [
|
||||
"onLanguage:java"
|
||||
],
|
||||
"main": "./out/extension.js",
|
||||
"contributes": {
|
||||
"commands": [
|
||||
|
@@ -4,52 +4,60 @@
|
||||
import * as vscode from 'vscode';
|
||||
import { workspace, ExtensionContext } from 'vscode';
|
||||
import {
|
||||
LanguageClient,
|
||||
LanguageClientOptions,
|
||||
ServerOptions,
|
||||
TransportKind
|
||||
LanguageClient,
|
||||
LanguageClientOptions,
|
||||
ServerOptions,
|
||||
TransportKind
|
||||
} from 'vscode-languageclient/node';
|
||||
|
||||
|
||||
|
||||
|
||||
// This method is called when your extension is activated
|
||||
// Your extension is activated the very first time the command is executed
|
||||
export function activate(context: vscode.ExtensionContext) {
|
||||
|
||||
|
||||
|
||||
const workspaceFolder = context.extensionPath;
|
||||
const serverOptions: ServerOptions = {
|
||||
run: {
|
||||
command: 'java',
|
||||
args: ['-jar', "C:\\Users\\ruben\\JavaTXLanguageServer\\JavaTXLanguageServer\\LanguageServer\\target\\JavaTXLanguageServer-1.0-SNAPSHOT-jar-with-dependencies.jar"], // Absolute Pfadangabe
|
||||
args: ['-jar', workspaceFolder + "/JavaTXLanguageServer-1.0-SNAPSHOT-jar-with-dependencies.jar"], // Absolute Pfadangabe
|
||||
},
|
||||
debug: {
|
||||
command: 'java',
|
||||
args: ['-jar', "C:\\Users\\ruben\\JavaTXLanguageServer\\JavaTXLanguageServer\\LanguageServer\\target\\JavaTXLanguageServer-1.0-SNAPSHOT-jar-with-dependencies.jar"], // Absolute Pfadangabe für Debug
|
||||
args: ['-jar', workspaceFolder + "/JavaTXLanguageServer-1.0-SNAPSHOT-jar-with-dependencies.jar"], // Absolute Pfadangabe für Debug
|
||||
}
|
||||
};
|
||||
|
||||
console.log("SERVER CREATED.")
|
||||
// Clientoptionen: definiere, welche Dateitypen der Client unterstützt
|
||||
const clientOptions: LanguageClientOptions = {
|
||||
documentSelector: [{ scheme: 'file', language: 'java' }],
|
||||
synchronize: {
|
||||
fileEvents: vscode.workspace.createFileSystemWatcher('**/*.java')
|
||||
}
|
||||
};
|
||||
console.log(workspaceFolder)
|
||||
// Clientoptionen: definiere, welche Dateitypen der Client unterstützt
|
||||
const clientOptions: LanguageClientOptions = {
|
||||
documentSelector: [{ scheme: 'file', language: 'java' }],
|
||||
synchronize: {
|
||||
fileEvents: vscode.workspace.createFileSystemWatcher('**/*.jav')
|
||||
},
|
||||
revealOutputChannelOn: 4
|
||||
};
|
||||
|
||||
// Language Client erstellen und starten
|
||||
const client = new LanguageClient(
|
||||
'javaLanguageServer', // ID des Clients
|
||||
'Java Language Server', // Name des Clients
|
||||
serverOptions,
|
||||
clientOptions
|
||||
);
|
||||
|
||||
// Language Client erstellen und starten
|
||||
const client = new LanguageClient(
|
||||
'javaTxLanguageServer', // ID des Clients
|
||||
'Java-TX Language Server', // Name des Clients
|
||||
serverOptions,
|
||||
clientOptions
|
||||
);
|
||||
|
||||
// Client starten
|
||||
// Client starten
|
||||
client.start().then(() => {
|
||||
console.log("Language Client erfolgreich gestartet");
|
||||
}).catch(error => {
|
||||
console.error("Fehler beim Starten des Language Clients:", error);
|
||||
});
|
||||
|
||||
console.log("Language Client erfolgreich gestartet");
|
||||
}).catch(error => {
|
||||
console.error("Fehler beim Starten des Language Clients:", error);
|
||||
});
|
||||
|
||||
// Use the console to output diagnostic information (console.log) and errors (console.error)
|
||||
// This line of code will only be executed once when your extension is activated
|
||||
console.log('Congratulations, your extension "tx" is now active!');
|
||||
@@ -67,4 +75,4 @@ export function activate(context: vscode.ExtensionContext) {
|
||||
}
|
||||
|
||||
// This method is called when your extension is deactivated
|
||||
export function deactivate() {}
|
||||
export function deactivate() { }
|
||||
|
@@ -8,17 +8,84 @@
|
||||
<version>1.0-SNAPSHOT</version>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>junit</groupId>
|
||||
<artifactId>junit</artifactId>
|
||||
<version>4.11</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<!-- https://mvnrepository.com/artifact/org.antlr/antlr4 -->
|
||||
<dependency>
|
||||
<groupId>org.antlr</groupId>
|
||||
<artifactId>antlr4-runtime</artifactId>
|
||||
<version>4.13.0</version>
|
||||
<artifactId>antlr4</artifactId>
|
||||
<version>4.11.1</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>io.github.java-diff-utils</groupId>
|
||||
<artifactId>java-diff-utils</artifactId>
|
||||
<version>4.12</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>log4j</groupId>
|
||||
<artifactId>log4j</artifactId>
|
||||
<version>1.2.17</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.logging.log4j</groupId>
|
||||
<artifactId>log4j-api</artifactId>
|
||||
<version>2.20.0</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.apache.logging.log4j</groupId>
|
||||
<artifactId>log4j-core</artifactId>
|
||||
<version>2.20.0</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.junit.jupiter</groupId>
|
||||
<artifactId>junit-jupiter</artifactId>
|
||||
<version>5.10.0</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>commons-io</groupId>
|
||||
<artifactId>commons-io</artifactId>
|
||||
<version>2.6</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>io.github.classgraph</groupId>
|
||||
<artifactId>classgraph</artifactId>
|
||||
<version>4.8.172</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.google.guava</groupId>
|
||||
<artifactId>guava</artifactId>
|
||||
<version>33.2.0-jre</version>
|
||||
</dependency>
|
||||
<!-- https://mvnrepository.com/artifact/org.ow2.asm/asm -->
|
||||
<dependency>
|
||||
<groupId>org.ow2.asm</groupId>
|
||||
<artifactId>asm</artifactId>
|
||||
<version>9.5</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.lsp4j</groupId>
|
||||
<artifactId>org.eclipse.lsp4j</artifactId>
|
||||
<version>0.23.1</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>de.dhbwstuttgart</groupId>
|
||||
<artifactId>JavaTXcompiler</artifactId>
|
||||
<version>0.1</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
<properties>
|
||||
<!-- Setzt Java 21 als globale Version -->
|
||||
<maven.compiler.source>21</maven.compiler.source>
|
||||
<maven.compiler.target>21</maven.compiler.target>
|
||||
<maven.compiler.release>21</maven.compiler.release>
|
||||
</properties>
|
||||
|
||||
<build>
|
||||
<plugins>
|
||||
@@ -38,8 +105,9 @@
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-compiler-plugin</artifactId>
|
||||
<configuration>
|
||||
<source>11</source> <!-- Stelle sicher, dass dies mit deiner installierten Java-Version übereinstimmt -->
|
||||
<target>11</target>
|
||||
<source>21</source>
|
||||
<target>21</target>
|
||||
<release>21</release>
|
||||
</configuration>
|
||||
</plugin>
|
||||
|
||||
@@ -53,7 +121,7 @@
|
||||
</descriptorRefs>
|
||||
<archive>
|
||||
<manifest>
|
||||
<mainClass>com.dhbw.JavaTXLanguageServerLauncher</mainClass> <!-- Deine Main-Klasse -->
|
||||
<mainClass>de.dhbw.JavaTXLanguageServerLauncher</mainClass> <!-- Deine Main-Klasse -->
|
||||
</manifest>
|
||||
</archive>
|
||||
</configuration>
|
||||
|
@@ -1,295 +0,0 @@
|
||||
package com.dhbw;
|
||||
|
||||
import com.dhbw.helper.CodeSnippetOptions;
|
||||
import com.dhbw.model.ParseError.DiagnoseErrorListener;
|
||||
import com.dhbw.model.SnippetWithName;
|
||||
import com.dhbw.parser.Java17Lexer;
|
||||
import com.dhbw.parser.Java17Parser;
|
||||
import com.dhbw.parser.Java17ParserBaseListener;
|
||||
import org.eclipse.lsp4j.*;
|
||||
import org.eclipse.lsp4j.jsonrpc.messages.Either;
|
||||
import org.eclipse.lsp4j.services.LanguageClient;
|
||||
import org.eclipse.lsp4j.services.TextDocumentService;
|
||||
|
||||
import java.io.File;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
import java.util.*;
|
||||
import java.util.concurrent.CompletableFuture;
|
||||
import java.util.concurrent.atomic.AtomicReference;
|
||||
|
||||
import org.antlr.v4.runtime.CharStreams;
|
||||
import org.antlr.v4.runtime.CommonTokenStream;
|
||||
import org.antlr.v4.runtime.CharStream;
|
||||
import org.antlr.v4.runtime.tree.ParseTree;
|
||||
import org.antlr.v4.runtime.tree.ParseTreeWalker;
|
||||
|
||||
public class JavaTXTextDocumentService implements org.eclipse.lsp4j.services.TextDocumentService {
|
||||
LanguageClient client;
|
||||
|
||||
String currentTextDocument;
|
||||
|
||||
CodeSnippetOptions codeSnippetOptions = new CodeSnippetOptions();
|
||||
|
||||
public void setClient(LanguageClient client) {
|
||||
this.client = client;
|
||||
}
|
||||
|
||||
@Override
|
||||
public CompletableFuture<Either<List<CompletionItem>, CompletionList>> completion(CompletionParams params) {
|
||||
List<CompletionItem> completions = new ArrayList<>();
|
||||
|
||||
|
||||
for(SnippetWithName elem : codeSnippetOptions.getSnippets()) {
|
||||
CompletionItem item = new CompletionItem(elem.getName());
|
||||
item.setKind(CompletionItemKind.Text);
|
||||
item.setInsertText(elem.getSnippet());
|
||||
completions.add(item);
|
||||
}
|
||||
client.showMessage(new MessageParams(MessageType.Info, "Returning completion suggestions: " + completions));
|
||||
|
||||
return CompletableFuture.completedFuture(Either.forLeft(completions));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void didOpen(DidOpenTextDocumentParams params) {
|
||||
client.showMessage(new MessageParams(MessageType.Info, "Datei geöffnet: " + params.getTextDocument().getUri()));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void didChange(DidChangeTextDocumentParams params) {
|
||||
|
||||
AtomicReference<String> summedUp = new AtomicReference<>("");
|
||||
params.getContentChanges().forEach(el -> summedUp.set(summedUp.get() + el.getText()));
|
||||
currentTextDocument = summedUp.get();
|
||||
DiagnoseErrorListener errorListener = new DiagnoseErrorListener();
|
||||
String input = summedUp.get();
|
||||
CharStream charStream = CharStreams.fromString(input);
|
||||
|
||||
Java17Lexer lexer = new Java17Lexer(charStream);
|
||||
CommonTokenStream tokens = new CommonTokenStream(lexer);
|
||||
|
||||
Java17Parser parser = new Java17Parser(tokens);
|
||||
parser.removeErrorListeners();
|
||||
parser.addErrorListener(errorListener);
|
||||
|
||||
|
||||
ParseTree tree = parser.sourceFile();
|
||||
ParseTreeWalker walker = new ParseTreeWalker();
|
||||
Java17ParserBaseListener listener = new Java17ParserBaseListener();
|
||||
walker.walk(listener, tree);
|
||||
|
||||
client.showMessage(new MessageParams(MessageType.Info, " " + errorListener.getErrorMessages().size()));
|
||||
PublishDiagnosticsParams diagnosticsParams = new PublishDiagnosticsParams(params.getTextDocument().getUri(), errorListener.getErrorMessages());
|
||||
client.publishDiagnostics(diagnosticsParams);
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public CompletableFuture<List<? extends TextEdit>> formatting(DocumentFormattingParams params) {
|
||||
List<TextEdit> edits = new ArrayList<>();
|
||||
|
||||
|
||||
String[] lines = currentTextDocument.split("\n");
|
||||
StringBuilder formattedText = new StringBuilder();
|
||||
|
||||
for (String line : lines) {
|
||||
formattedText.append(line.stripTrailing()).append("\n");
|
||||
}
|
||||
|
||||
TextEdit edit = new TextEdit();
|
||||
edit.setRange(new Range(new Position(0, 0), new Position(lines.length, 0)));
|
||||
edit.setNewText(formattedText.toString().trim());
|
||||
|
||||
edits.add(edit);
|
||||
return CompletableFuture.completedFuture(edits);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void didClose(DidCloseTextDocumentParams params) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void didSave(DidSaveTextDocumentParams didSaveTextDocumentParams) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void willSave(WillSaveTextDocumentParams params) {
|
||||
TextDocumentService.super.willSave(params);
|
||||
}
|
||||
|
||||
@Override
|
||||
public CompletableFuture<List<TextEdit>> willSaveWaitUntil(WillSaveTextDocumentParams params) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public CompletableFuture<List<DocumentLink>> documentLink(DocumentLinkParams params) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public CompletableFuture<DocumentLink> documentLinkResolve(DocumentLink params) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public CompletableFuture<List<ColorInformation>> documentColor(DocumentColorParams params) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public CompletableFuture<List<ColorPresentation>> colorPresentation(ColorPresentationParams params) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public CompletableFuture<List<FoldingRange>> foldingRange(FoldingRangeRequestParams params) {
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public CompletableFuture<List<CallHierarchyItem>> prepareCallHierarchy(CallHierarchyPrepareParams params) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public CompletableFuture<List<CallHierarchyIncomingCall>> callHierarchyIncomingCalls(CallHierarchyIncomingCallsParams params) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public CompletableFuture<List<CallHierarchyOutgoingCall>> callHierarchyOutgoingCalls(CallHierarchyOutgoingCallsParams params) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public CompletableFuture<List<SelectionRange>> selectionRange(SelectionRangeParams params) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public CompletableFuture<SemanticTokens> semanticTokensFull(SemanticTokensParams params) {
|
||||
return TextDocumentService.super.semanticTokensFull(params);
|
||||
}
|
||||
|
||||
@Override
|
||||
public CompletableFuture<Either<SemanticTokens, SemanticTokensDelta>> semanticTokensFullDelta(SemanticTokensDeltaParams params) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public CompletableFuture<SemanticTokens> semanticTokensRange(SemanticTokensRangeParams params) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public CompletableFuture<List<Moniker>> moniker(MonikerParams params) {
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public CompletableFuture<CompletionItem> resolveCompletionItem(CompletionItem unresolved) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public CompletableFuture<Hover> hover(HoverParams params) {
|
||||
|
||||
String hoverText = "Test";
|
||||
|
||||
// Verwende MarkupContent für den Hover-Inhalt
|
||||
MarkupContent markupContent = new MarkupContent();
|
||||
markupContent.setKind("markdown"); // Optional: Kann auch "plaintext" sein
|
||||
markupContent.setValue(hoverText);
|
||||
|
||||
// Gib das Hover-Objekt mit dem MarkupContent zurück
|
||||
return CompletableFuture.completedFuture(new Hover(markupContent));
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public CompletableFuture<SignatureHelp> signatureHelp(SignatureHelpParams params) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public CompletableFuture<Either<List<? extends Location>, List<? extends LocationLink>>> declaration(DeclarationParams params) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public CompletableFuture<Either<List<? extends Location>, List<? extends LocationLink>>> definition(DefinitionParams params) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public CompletableFuture<Either<List<? extends Location>, List<? extends LocationLink>>> typeDefinition(TypeDefinitionParams params) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public CompletableFuture<Either<List<? extends Location>, List<? extends LocationLink>>> implementation(ImplementationParams params) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public CompletableFuture<List<? extends Location>> references(ReferenceParams params) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public CompletableFuture<List<? extends DocumentHighlight>> documentHighlight(DocumentHighlightParams params) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public CompletableFuture<List<Either<SymbolInformation, DocumentSymbol>>> documentSymbol(DocumentSymbolParams params) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public CompletableFuture<List<Either<Command, CodeAction>>> codeAction(CodeActionParams params) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public CompletableFuture<CodeAction> resolveCodeAction(CodeAction unresolved) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public CompletableFuture<List<? extends CodeLens>> codeLens(CodeLensParams params) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public CompletableFuture<CodeLens> resolveCodeLens(CodeLens unresolved) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public CompletableFuture<List<? extends TextEdit>> rangeFormatting(DocumentRangeFormattingParams params) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public CompletableFuture<List<? extends TextEdit>> onTypeFormatting(DocumentOnTypeFormattingParams params) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public CompletableFuture<WorkspaceEdit> rename(RenameParams params) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public CompletableFuture<LinkedEditingRanges> linkedEditingRange(LinkedEditingRangeParams params) {
|
||||
return null;
|
||||
}
|
||||
}
|
@@ -1,20 +0,0 @@
|
||||
package com.dhbw;
|
||||
|
||||
import org.eclipse.lsp4j.DidChangeConfigurationParams;
|
||||
import org.eclipse.lsp4j.services.WorkspaceService;
|
||||
import org.eclipse.lsp4j.DidChangeWatchedFilesParams;
|
||||
|
||||
public class JavaTXWorkspaceService implements WorkspaceService {
|
||||
|
||||
|
||||
@Override
|
||||
public void didChangeConfiguration(DidChangeConfigurationParams didChangeConfigurationParams) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void didChangeWatchedFiles(DidChangeWatchedFilesParams params) {
|
||||
// Reagiere auf Änderungen im Dateisystem
|
||||
System.out.println("Dateiänderungen im Arbeitsbereich: " + params.getChanges());
|
||||
}
|
||||
}
|
File diff suppressed because one or more lines are too long
@@ -1,870 +0,0 @@
|
||||
package com.dhbw.parser;// Generated from /home/ruben/Documents/JavaCompilerCore/src/main/antlr4/de/dhbwstuttgart/parser/antlr/Java17Lexer.g4 by ANTLR 4.13.1
|
||||
import org.antlr.v4.runtime.Lexer;
|
||||
import org.antlr.v4.runtime.CharStream;
|
||||
import org.antlr.v4.runtime.*;
|
||||
import org.antlr.v4.runtime.atn.*;
|
||||
import org.antlr.v4.runtime.dfa.DFA;
|
||||
|
||||
@SuppressWarnings({"all", "warnings", "unchecked", "unused", "cast", "CheckReturnValue", "this-escape"})
|
||||
public class Java17Lexer extends Lexer {
|
||||
static { RuntimeMetaData.checkVersion("4.13.1", RuntimeMetaData.VERSION); }
|
||||
|
||||
protected static final DFA[] _decisionToDFA;
|
||||
protected static final PredictionContextCache _sharedContextCache =
|
||||
new PredictionContextCache();
|
||||
public static final int
|
||||
ABSTRACT=1, ASSERT=2, BOOLEAN=3, BREAK=4, BYTE=5, CASE=6, CATCH=7, CHAR=8,
|
||||
CLASS=9, CONST=10, CONTINUE=11, DEFAULT=12, DO=13, DOUBLE=14, ELSE=15,
|
||||
ENUM=16, EXTENDS=17, FINAL=18, FINALLY=19, FLOAT=20, FOR=21, IF=22, GOTO=23,
|
||||
IMPLEMENTS=24, IMPORT=25, INSTANCEOF=26, INT=27, INTERFACE=28, LONG=29,
|
||||
NATIVE=30, NEW=31, PACKAGE=32, PRIVATE=33, PROTECTED=34, PUBLIC=35, RETURN=36,
|
||||
SHORT=37, STATIC=38, STRICTFP=39, SUPER=40, SWITCH=41, SYNCHRONIZED=42,
|
||||
THIS=43, THROW=44, THROWS=45, TRANSIENT=46, TRY=47, VOID=48, VOLATILE=49,
|
||||
WHILE=50, MODULE=51, OPEN=52, REQUIRES=53, EXPORTS=54, OPENS=55, TO=56,
|
||||
USES=57, PROVIDES=58, WITH=59, TRANSITIVE=60, VAR=61, YIELD=62, RECORD=63,
|
||||
SEALED=64, PERMITS=65, NON_SEALED=66, DECIMAL_LITERAL=67, HEX_LITERAL=68,
|
||||
OCT_LITERAL=69, BINARY_LITERAL=70, FLOAT_LITERAL=71, HEX_FLOAT_LITERAL=72,
|
||||
BOOL_LITERAL=73, CHAR_LITERAL=74, STRING_LITERAL=75, TEXT_BLOCK=76, NULL_LITERAL=77,
|
||||
LPAREN=78, RPAREN=79, LBRACE=80, RBRACE=81, LBRACK=82, RBRACK=83, SEMI=84,
|
||||
COMMA=85, DOT=86, ASSIGN=87, GT=88, LT=89, BANG=90, TILDE=91, QUESTION=92,
|
||||
COLON=93, EQUAL=94, LE=95, GE=96, NOTEQUAL=97, AND=98, OR=99, INC=100,
|
||||
DEC=101, ADD=102, SUB=103, MUL=104, DIV=105, BITAND=106, BITOR=107, CARET=108,
|
||||
MOD=109, ADD_ASSIGN=110, SUB_ASSIGN=111, MUL_ASSIGN=112, DIV_ASSIGN=113,
|
||||
AND_ASSIGN=114, OR_ASSIGN=115, XOR_ASSIGN=116, MOD_ASSIGN=117, LSHIFT_ASSIGN=118,
|
||||
RSHIFT_ASSIGN=119, URSHIFT_ASSIGN=120, ARROW=121, COLONCOLON=122, AT=123,
|
||||
ELLIPSIS=124, WS=125, COMMENT=126, LINE_COMMENT=127, IDENTIFIER=128;
|
||||
public static String[] channelNames = {
|
||||
"DEFAULT_TOKEN_CHANNEL", "HIDDEN"
|
||||
};
|
||||
|
||||
public static String[] modeNames = {
|
||||
"DEFAULT_MODE"
|
||||
};
|
||||
|
||||
private static String[] makeRuleNames() {
|
||||
return new String[] {
|
||||
"ABSTRACT", "ASSERT", "BOOLEAN", "BREAK", "BYTE", "CASE", "CATCH", "CHAR",
|
||||
"CLASS", "CONST", "CONTINUE", "DEFAULT", "DO", "DOUBLE", "ELSE", "ENUM",
|
||||
"EXTENDS", "FINAL", "FINALLY", "FLOAT", "FOR", "IF", "GOTO", "IMPLEMENTS",
|
||||
"IMPORT", "INSTANCEOF", "INT", "INTERFACE", "LONG", "NATIVE", "NEW",
|
||||
"PACKAGE", "PRIVATE", "PROTECTED", "PUBLIC", "RETURN", "SHORT", "STATIC",
|
||||
"STRICTFP", "SUPER", "SWITCH", "SYNCHRONIZED", "THIS", "THROW", "THROWS",
|
||||
"TRANSIENT", "TRY", "VOID", "VOLATILE", "WHILE", "MODULE", "OPEN", "REQUIRES",
|
||||
"EXPORTS", "OPENS", "TO", "USES", "PROVIDES", "WITH", "TRANSITIVE", "VAR",
|
||||
"YIELD", "RECORD", "SEALED", "PERMITS", "NON_SEALED", "DECIMAL_LITERAL",
|
||||
"HEX_LITERAL", "OCT_LITERAL", "BINARY_LITERAL", "FLOAT_LITERAL", "HEX_FLOAT_LITERAL",
|
||||
"BOOL_LITERAL", "CHAR_LITERAL", "STRING_LITERAL", "TEXT_BLOCK", "NULL_LITERAL",
|
||||
"LPAREN", "RPAREN", "LBRACE", "RBRACE", "LBRACK", "RBRACK", "SEMI", "COMMA",
|
||||
"DOT", "ASSIGN", "GT", "LT", "BANG", "TILDE", "QUESTION", "COLON", "EQUAL",
|
||||
"LE", "GE", "NOTEQUAL", "AND", "OR", "INC", "DEC", "ADD", "SUB", "MUL",
|
||||
"DIV", "BITAND", "BITOR", "CARET", "MOD", "ADD_ASSIGN", "SUB_ASSIGN",
|
||||
"MUL_ASSIGN", "DIV_ASSIGN", "AND_ASSIGN", "OR_ASSIGN", "XOR_ASSIGN",
|
||||
"MOD_ASSIGN", "LSHIFT_ASSIGN", "RSHIFT_ASSIGN", "URSHIFT_ASSIGN", "ARROW",
|
||||
"COLONCOLON", "AT", "ELLIPSIS", "WS", "COMMENT", "LINE_COMMENT", "IDENTIFIER",
|
||||
"ExponentPart", "EscapeSequence", "HexDigits", "HexDigit", "Digits",
|
||||
"LetterOrDigit", "Letter"
|
||||
};
|
||||
}
|
||||
public static final String[] ruleNames = makeRuleNames();
|
||||
|
||||
private static String[] makeLiteralNames() {
|
||||
return new String[] {
|
||||
null, "'abstract'", "'assert'", "'boolean'", "'break'", "'byte'", "'case'",
|
||||
"'catch'", "'char'", "'class'", "'const'", "'continue'", "'default'",
|
||||
"'do'", "'double'", "'else'", "'enum'", "'extends'", "'final'", "'finally'",
|
||||
"'float'", "'for'", "'if'", "'goto'", "'implements'", "'import'", "'instanceof'",
|
||||
"'int'", "'interface'", "'long'", "'native'", "'new'", "'package'", "'private'",
|
||||
"'protected'", "'public'", "'return'", "'short'", "'static'", "'strictfp'",
|
||||
"'super'", "'switch'", "'synchronized'", "'this'", "'throw'", "'throws'",
|
||||
"'transient'", "'try'", "'void'", "'volatile'", "'while'", "'module'",
|
||||
"'open'", "'requires'", "'exports'", "'opens'", "'to'", "'uses'", "'provides'",
|
||||
"'with'", "'transitive'", "'var'", "'yield'", "'record'", "'sealed'",
|
||||
"'permits'", "'non-sealed'", null, null, null, null, null, null, null,
|
||||
null, null, null, "'null'", "'('", "')'", "'{'", "'}'", "'['", "']'",
|
||||
"';'", "','", "'.'", "'='", "'>'", "'<'", "'!'", "'~'", "'?'", "':'",
|
||||
"'=='", "'<='", "'>='", "'!='", "'&&'", "'||'", "'++'", "'--'", "'+'",
|
||||
"'-'", "'*'", "'/'", "'&'", "'|'", "'^'", "'%'", "'+='", "'-='", "'*='",
|
||||
"'/='", "'&='", "'|='", "'^='", "'%='", "'<<='", "'>>='", "'>>>='", "'->'",
|
||||
"'::'", "'@'", "'...'"
|
||||
};
|
||||
}
|
||||
private static final String[] _LITERAL_NAMES = makeLiteralNames();
|
||||
private static String[] makeSymbolicNames() {
|
||||
return new String[] {
|
||||
null, "ABSTRACT", "ASSERT", "BOOLEAN", "BREAK", "BYTE", "CASE", "CATCH",
|
||||
"CHAR", "CLASS", "CONST", "CONTINUE", "DEFAULT", "DO", "DOUBLE", "ELSE",
|
||||
"ENUM", "EXTENDS", "FINAL", "FINALLY", "FLOAT", "FOR", "IF", "GOTO",
|
||||
"IMPLEMENTS", "IMPORT", "INSTANCEOF", "INT", "INTERFACE", "LONG", "NATIVE",
|
||||
"NEW", "PACKAGE", "PRIVATE", "PROTECTED", "PUBLIC", "RETURN", "SHORT",
|
||||
"STATIC", "STRICTFP", "SUPER", "SWITCH", "SYNCHRONIZED", "THIS", "THROW",
|
||||
"THROWS", "TRANSIENT", "TRY", "VOID", "VOLATILE", "WHILE", "MODULE",
|
||||
"OPEN", "REQUIRES", "EXPORTS", "OPENS", "TO", "USES", "PROVIDES", "WITH",
|
||||
"TRANSITIVE", "VAR", "YIELD", "RECORD", "SEALED", "PERMITS", "NON_SEALED",
|
||||
"DECIMAL_LITERAL", "HEX_LITERAL", "OCT_LITERAL", "BINARY_LITERAL", "FLOAT_LITERAL",
|
||||
"HEX_FLOAT_LITERAL", "BOOL_LITERAL", "CHAR_LITERAL", "STRING_LITERAL",
|
||||
"TEXT_BLOCK", "NULL_LITERAL", "LPAREN", "RPAREN", "LBRACE", "RBRACE",
|
||||
"LBRACK", "RBRACK", "SEMI", "COMMA", "DOT", "ASSIGN", "GT", "LT", "BANG",
|
||||
"TILDE", "QUESTION", "COLON", "EQUAL", "LE", "GE", "NOTEQUAL", "AND",
|
||||
"OR", "INC", "DEC", "ADD", "SUB", "MUL", "DIV", "BITAND", "BITOR", "CARET",
|
||||
"MOD", "ADD_ASSIGN", "SUB_ASSIGN", "MUL_ASSIGN", "DIV_ASSIGN", "AND_ASSIGN",
|
||||
"OR_ASSIGN", "XOR_ASSIGN", "MOD_ASSIGN", "LSHIFT_ASSIGN", "RSHIFT_ASSIGN",
|
||||
"URSHIFT_ASSIGN", "ARROW", "COLONCOLON", "AT", "ELLIPSIS", "WS", "COMMENT",
|
||||
"LINE_COMMENT", "IDENTIFIER"
|
||||
};
|
||||
}
|
||||
private static final String[] _SYMBOLIC_NAMES = makeSymbolicNames();
|
||||
public static final Vocabulary VOCABULARY = new VocabularyImpl(_LITERAL_NAMES, _SYMBOLIC_NAMES);
|
||||
|
||||
/**
|
||||
* @deprecated Use {@link #VOCABULARY} instead.
|
||||
*/
|
||||
@Deprecated
|
||||
public static final String[] tokenNames;
|
||||
static {
|
||||
tokenNames = new String[_SYMBOLIC_NAMES.length];
|
||||
for (int i = 0; i < tokenNames.length; i++) {
|
||||
tokenNames[i] = VOCABULARY.getLiteralName(i);
|
||||
if (tokenNames[i] == null) {
|
||||
tokenNames[i] = VOCABULARY.getSymbolicName(i);
|
||||
}
|
||||
|
||||
if (tokenNames[i] == null) {
|
||||
tokenNames[i] = "<INVALID>";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@Deprecated
|
||||
public String[] getTokenNames() {
|
||||
return tokenNames;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
public Vocabulary getVocabulary() {
|
||||
return VOCABULARY;
|
||||
}
|
||||
|
||||
|
||||
public Java17Lexer(CharStream input) {
|
||||
super(input);
|
||||
_interp = new LexerATNSimulator(this,_ATN,_decisionToDFA,_sharedContextCache);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getGrammarFileName() { return "Java17Lexer.g4"; }
|
||||
|
||||
@Override
|
||||
public String[] getRuleNames() { return ruleNames; }
|
||||
|
||||
@Override
|
||||
public String getSerializedATN() { return _serializedATN; }
|
||||
|
||||
@Override
|
||||
public String[] getChannelNames() { return channelNames; }
|
||||
|
||||
@Override
|
||||
public String[] getModeNames() { return modeNames; }
|
||||
|
||||
@Override
|
||||
public ATN getATN() { return _ATN; }
|
||||
|
||||
public static final String _serializedATN =
|
||||
"\u0004\u0000\u0080\u0458\u0006\uffff\uffff\u0002\u0000\u0007\u0000\u0002"+
|
||||
"\u0001\u0007\u0001\u0002\u0002\u0007\u0002\u0002\u0003\u0007\u0003\u0002"+
|
||||
"\u0004\u0007\u0004\u0002\u0005\u0007\u0005\u0002\u0006\u0007\u0006\u0002"+
|
||||
"\u0007\u0007\u0007\u0002\b\u0007\b\u0002\t\u0007\t\u0002\n\u0007\n\u0002"+
|
||||
"\u000b\u0007\u000b\u0002\f\u0007\f\u0002\r\u0007\r\u0002\u000e\u0007\u000e"+
|
||||
"\u0002\u000f\u0007\u000f\u0002\u0010\u0007\u0010\u0002\u0011\u0007\u0011"+
|
||||
"\u0002\u0012\u0007\u0012\u0002\u0013\u0007\u0013\u0002\u0014\u0007\u0014"+
|
||||
"\u0002\u0015\u0007\u0015\u0002\u0016\u0007\u0016\u0002\u0017\u0007\u0017"+
|
||||
"\u0002\u0018\u0007\u0018\u0002\u0019\u0007\u0019\u0002\u001a\u0007\u001a"+
|
||||
"\u0002\u001b\u0007\u001b\u0002\u001c\u0007\u001c\u0002\u001d\u0007\u001d"+
|
||||
"\u0002\u001e\u0007\u001e\u0002\u001f\u0007\u001f\u0002 \u0007 \u0002!"+
|
||||
"\u0007!\u0002\"\u0007\"\u0002#\u0007#\u0002$\u0007$\u0002%\u0007%\u0002"+
|
||||
"&\u0007&\u0002\'\u0007\'\u0002(\u0007(\u0002)\u0007)\u0002*\u0007*\u0002"+
|
||||
"+\u0007+\u0002,\u0007,\u0002-\u0007-\u0002.\u0007.\u0002/\u0007/\u0002"+
|
||||
"0\u00070\u00021\u00071\u00022\u00072\u00023\u00073\u00024\u00074\u0002"+
|
||||
"5\u00075\u00026\u00076\u00027\u00077\u00028\u00078\u00029\u00079\u0002"+
|
||||
":\u0007:\u0002;\u0007;\u0002<\u0007<\u0002=\u0007=\u0002>\u0007>\u0002"+
|
||||
"?\u0007?\u0002@\u0007@\u0002A\u0007A\u0002B\u0007B\u0002C\u0007C\u0002"+
|
||||
"D\u0007D\u0002E\u0007E\u0002F\u0007F\u0002G\u0007G\u0002H\u0007H\u0002"+
|
||||
"I\u0007I\u0002J\u0007J\u0002K\u0007K\u0002L\u0007L\u0002M\u0007M\u0002"+
|
||||
"N\u0007N\u0002O\u0007O\u0002P\u0007P\u0002Q\u0007Q\u0002R\u0007R\u0002"+
|
||||
"S\u0007S\u0002T\u0007T\u0002U\u0007U\u0002V\u0007V\u0002W\u0007W\u0002"+
|
||||
"X\u0007X\u0002Y\u0007Y\u0002Z\u0007Z\u0002[\u0007[\u0002\\\u0007\\\u0002"+
|
||||
"]\u0007]\u0002^\u0007^\u0002_\u0007_\u0002`\u0007`\u0002a\u0007a\u0002"+
|
||||
"b\u0007b\u0002c\u0007c\u0002d\u0007d\u0002e\u0007e\u0002f\u0007f\u0002"+
|
||||
"g\u0007g\u0002h\u0007h\u0002i\u0007i\u0002j\u0007j\u0002k\u0007k\u0002"+
|
||||
"l\u0007l\u0002m\u0007m\u0002n\u0007n\u0002o\u0007o\u0002p\u0007p\u0002"+
|
||||
"q\u0007q\u0002r\u0007r\u0002s\u0007s\u0002t\u0007t\u0002u\u0007u\u0002"+
|
||||
"v\u0007v\u0002w\u0007w\u0002x\u0007x\u0002y\u0007y\u0002z\u0007z\u0002"+
|
||||
"{\u0007{\u0002|\u0007|\u0002}\u0007}\u0002~\u0007~\u0002\u007f\u0007\u007f"+
|
||||
"\u0002\u0080\u0007\u0080\u0002\u0081\u0007\u0081\u0002\u0082\u0007\u0082"+
|
||||
"\u0002\u0083\u0007\u0083\u0002\u0084\u0007\u0084\u0002\u0085\u0007\u0085"+
|
||||
"\u0002\u0086\u0007\u0086\u0001\u0000\u0001\u0000\u0001\u0000\u0001\u0000"+
|
||||
"\u0001\u0000\u0001\u0000\u0001\u0000\u0001\u0000\u0001\u0000\u0001\u0001"+
|
||||
"\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0001"+
|
||||
"\u0001\u0002\u0001\u0002\u0001\u0002\u0001\u0002\u0001\u0002\u0001\u0002"+
|
||||
"\u0001\u0002\u0001\u0002\u0001\u0003\u0001\u0003\u0001\u0003\u0001\u0003"+
|
||||
"\u0001\u0003\u0001\u0003\u0001\u0004\u0001\u0004\u0001\u0004\u0001\u0004"+
|
||||
"\u0001\u0004\u0001\u0005\u0001\u0005\u0001\u0005\u0001\u0005\u0001\u0005"+
|
||||
"\u0001\u0006\u0001\u0006\u0001\u0006\u0001\u0006\u0001\u0006\u0001\u0006"+
|
||||
"\u0001\u0007\u0001\u0007\u0001\u0007\u0001\u0007\u0001\u0007\u0001\b\u0001"+
|
||||
"\b\u0001\b\u0001\b\u0001\b\u0001\b\u0001\t\u0001\t\u0001\t\u0001\t\u0001"+
|
||||
"\t\u0001\t\u0001\n\u0001\n\u0001\n\u0001\n\u0001\n\u0001\n\u0001\n\u0001"+
|
||||
"\n\u0001\n\u0001\u000b\u0001\u000b\u0001\u000b\u0001\u000b\u0001\u000b"+
|
||||
"\u0001\u000b\u0001\u000b\u0001\u000b\u0001\f\u0001\f\u0001\f\u0001\r\u0001"+
|
||||
"\r\u0001\r\u0001\r\u0001\r\u0001\r\u0001\r\u0001\u000e\u0001\u000e\u0001"+
|
||||
"\u000e\u0001\u000e\u0001\u000e\u0001\u000f\u0001\u000f\u0001\u000f\u0001"+
|
||||
"\u000f\u0001\u000f\u0001\u0010\u0001\u0010\u0001\u0010\u0001\u0010\u0001"+
|
||||
"\u0010\u0001\u0010\u0001\u0010\u0001\u0010\u0001\u0011\u0001\u0011\u0001"+
|
||||
"\u0011\u0001\u0011\u0001\u0011\u0001\u0011\u0001\u0012\u0001\u0012\u0001"+
|
||||
"\u0012\u0001\u0012\u0001\u0012\u0001\u0012\u0001\u0012\u0001\u0012\u0001"+
|
||||
"\u0013\u0001\u0013\u0001\u0013\u0001\u0013\u0001\u0013\u0001\u0013\u0001"+
|
||||
"\u0014\u0001\u0014\u0001\u0014\u0001\u0014\u0001\u0015\u0001\u0015\u0001"+
|
||||
"\u0015\u0001\u0016\u0001\u0016\u0001\u0016\u0001\u0016\u0001\u0016\u0001"+
|
||||
"\u0017\u0001\u0017\u0001\u0017\u0001\u0017\u0001\u0017\u0001\u0017\u0001"+
|
||||
"\u0017\u0001\u0017\u0001\u0017\u0001\u0017\u0001\u0017\u0001\u0018\u0001"+
|
||||
"\u0018\u0001\u0018\u0001\u0018\u0001\u0018\u0001\u0018\u0001\u0018\u0001"+
|
||||
"\u0019\u0001\u0019\u0001\u0019\u0001\u0019\u0001\u0019\u0001\u0019\u0001"+
|
||||
"\u0019\u0001\u0019\u0001\u0019\u0001\u0019\u0001\u0019\u0001\u001a\u0001"+
|
||||
"\u001a\u0001\u001a\u0001\u001a\u0001\u001b\u0001\u001b\u0001\u001b\u0001"+
|
||||
"\u001b\u0001\u001b\u0001\u001b\u0001\u001b\u0001\u001b\u0001\u001b\u0001"+
|
||||
"\u001b\u0001\u001c\u0001\u001c\u0001\u001c\u0001\u001c\u0001\u001c\u0001"+
|
||||
"\u001d\u0001\u001d\u0001\u001d\u0001\u001d\u0001\u001d\u0001\u001d\u0001"+
|
||||
"\u001d\u0001\u001e\u0001\u001e\u0001\u001e\u0001\u001e\u0001\u001f\u0001"+
|
||||
"\u001f\u0001\u001f\u0001\u001f\u0001\u001f\u0001\u001f\u0001\u001f\u0001"+
|
||||
"\u001f\u0001 \u0001 \u0001 \u0001 \u0001 \u0001 \u0001 \u0001 \u0001!"+
|
||||
"\u0001!\u0001!\u0001!\u0001!\u0001!\u0001!\u0001!\u0001!\u0001!\u0001"+
|
||||
"\"\u0001\"\u0001\"\u0001\"\u0001\"\u0001\"\u0001\"\u0001#\u0001#\u0001"+
|
||||
"#\u0001#\u0001#\u0001#\u0001#\u0001$\u0001$\u0001$\u0001$\u0001$\u0001"+
|
||||
"$\u0001%\u0001%\u0001%\u0001%\u0001%\u0001%\u0001%\u0001&\u0001&\u0001"+
|
||||
"&\u0001&\u0001&\u0001&\u0001&\u0001&\u0001&\u0001\'\u0001\'\u0001\'\u0001"+
|
||||
"\'\u0001\'\u0001\'\u0001(\u0001(\u0001(\u0001(\u0001(\u0001(\u0001(\u0001"+
|
||||
")\u0001)\u0001)\u0001)\u0001)\u0001)\u0001)\u0001)\u0001)\u0001)\u0001"+
|
||||
")\u0001)\u0001)\u0001*\u0001*\u0001*\u0001*\u0001*\u0001+\u0001+\u0001"+
|
||||
"+\u0001+\u0001+\u0001+\u0001,\u0001,\u0001,\u0001,\u0001,\u0001,\u0001"+
|
||||
",\u0001-\u0001-\u0001-\u0001-\u0001-\u0001-\u0001-\u0001-\u0001-\u0001"+
|
||||
"-\u0001.\u0001.\u0001.\u0001.\u0001/\u0001/\u0001/\u0001/\u0001/\u0001"+
|
||||
"0\u00010\u00010\u00010\u00010\u00010\u00010\u00010\u00010\u00011\u0001"+
|
||||
"1\u00011\u00011\u00011\u00011\u00012\u00012\u00012\u00012\u00012\u0001"+
|
||||
"2\u00012\u00013\u00013\u00013\u00013\u00013\u00014\u00014\u00014\u0001"+
|
||||
"4\u00014\u00014\u00014\u00014\u00014\u00015\u00015\u00015\u00015\u0001"+
|
||||
"5\u00015\u00015\u00015\u00016\u00016\u00016\u00016\u00016\u00016\u0001"+
|
||||
"7\u00017\u00017\u00018\u00018\u00018\u00018\u00018\u00019\u00019\u0001"+
|
||||
"9\u00019\u00019\u00019\u00019\u00019\u00019\u0001:\u0001:\u0001:\u0001"+
|
||||
":\u0001:\u0001;\u0001;\u0001;\u0001;\u0001;\u0001;\u0001;\u0001;\u0001"+
|
||||
";\u0001;\u0001;\u0001<\u0001<\u0001<\u0001<\u0001=\u0001=\u0001=\u0001"+
|
||||
"=\u0001=\u0001=\u0001>\u0001>\u0001>\u0001>\u0001>\u0001>\u0001>\u0001"+
|
||||
"?\u0001?\u0001?\u0001?\u0001?\u0001?\u0001?\u0001@\u0001@\u0001@\u0001"+
|
||||
"@\u0001@\u0001@\u0001@\u0001@\u0001A\u0001A\u0001A\u0001A\u0001A\u0001"+
|
||||
"A\u0001A\u0001A\u0001A\u0001A\u0001A\u0001B\u0001B\u0001B\u0003B\u02d5"+
|
||||
"\bB\u0001B\u0004B\u02d8\bB\u000bB\fB\u02d9\u0001B\u0003B\u02dd\bB\u0003"+
|
||||
"B\u02df\bB\u0001B\u0003B\u02e2\bB\u0001C\u0001C\u0001C\u0001C\u0005C\u02e8"+
|
||||
"\bC\nC\fC\u02eb\tC\u0001C\u0003C\u02ee\bC\u0001C\u0003C\u02f1\bC\u0001"+
|
||||
"D\u0001D\u0005D\u02f5\bD\nD\fD\u02f8\tD\u0001D\u0001D\u0005D\u02fc\bD"+
|
||||
"\nD\fD\u02ff\tD\u0001D\u0003D\u0302\bD\u0001D\u0003D\u0305\bD\u0001E\u0001"+
|
||||
"E\u0001E\u0001E\u0005E\u030b\bE\nE\fE\u030e\tE\u0001E\u0003E\u0311\bE"+
|
||||
"\u0001E\u0003E\u0314\bE\u0001F\u0001F\u0001F\u0003F\u0319\bF\u0001F\u0001"+
|
||||
"F\u0003F\u031d\bF\u0001F\u0003F\u0320\bF\u0001F\u0003F\u0323\bF\u0001"+
|
||||
"F\u0001F\u0001F\u0003F\u0328\bF\u0001F\u0003F\u032b\bF\u0003F\u032d\b"+
|
||||
"F\u0001G\u0001G\u0001G\u0001G\u0003G\u0333\bG\u0001G\u0003G\u0336\bG\u0001"+
|
||||
"G\u0001G\u0003G\u033a\bG\u0001G\u0001G\u0003G\u033e\bG\u0001G\u0001G\u0003"+
|
||||
"G\u0342\bG\u0001H\u0001H\u0001H\u0001H\u0001H\u0001H\u0001H\u0001H\u0001"+
|
||||
"H\u0003H\u034d\bH\u0001I\u0001I\u0001I\u0003I\u0352\bI\u0001I\u0001I\u0001"+
|
||||
"J\u0001J\u0001J\u0005J\u0359\bJ\nJ\fJ\u035c\tJ\u0001J\u0001J\u0001K\u0001"+
|
||||
"K\u0001K\u0001K\u0001K\u0005K\u0365\bK\nK\fK\u0368\tK\u0001K\u0001K\u0001"+
|
||||
"K\u0005K\u036d\bK\nK\fK\u0370\tK\u0001K\u0001K\u0001K\u0001K\u0001L\u0001"+
|
||||
"L\u0001L\u0001L\u0001L\u0001M\u0001M\u0001N\u0001N\u0001O\u0001O\u0001"+
|
||||
"P\u0001P\u0001Q\u0001Q\u0001R\u0001R\u0001S\u0001S\u0001T\u0001T\u0001"+
|
||||
"U\u0001U\u0001V\u0001V\u0001W\u0001W\u0001X\u0001X\u0001Y\u0001Y\u0001"+
|
||||
"Z\u0001Z\u0001[\u0001[\u0001\\\u0001\\\u0001]\u0001]\u0001]\u0001^\u0001"+
|
||||
"^\u0001^\u0001_\u0001_\u0001_\u0001`\u0001`\u0001`\u0001a\u0001a\u0001"+
|
||||
"a\u0001b\u0001b\u0001b\u0001c\u0001c\u0001c\u0001d\u0001d\u0001d\u0001"+
|
||||
"e\u0001e\u0001f\u0001f\u0001g\u0001g\u0001h\u0001h\u0001i\u0001i\u0001"+
|
||||
"j\u0001j\u0001k\u0001k\u0001l\u0001l\u0001m\u0001m\u0001m\u0001n\u0001"+
|
||||
"n\u0001n\u0001o\u0001o\u0001o\u0001p\u0001p\u0001p\u0001q\u0001q\u0001"+
|
||||
"q\u0001r\u0001r\u0001r\u0001s\u0001s\u0001s\u0001t\u0001t\u0001t\u0001"+
|
||||
"u\u0001u\u0001u\u0001u\u0001v\u0001v\u0001v\u0001v\u0001w\u0001w\u0001"+
|
||||
"w\u0001w\u0001w\u0001x\u0001x\u0001x\u0001y\u0001y\u0001y\u0001z\u0001"+
|
||||
"z\u0001{\u0001{\u0001{\u0001{\u0001|\u0004|\u03f5\b|\u000b|\f|\u03f6\u0001"+
|
||||
"|\u0001|\u0001}\u0001}\u0001}\u0001}\u0005}\u03ff\b}\n}\f}\u0402\t}\u0001"+
|
||||
"}\u0001}\u0001}\u0001}\u0001}\u0001~\u0001~\u0001~\u0001~\u0005~\u040d"+
|
||||
"\b~\n~\f~\u0410\t~\u0001~\u0001~\u0001\u007f\u0001\u007f\u0005\u007f\u0416"+
|
||||
"\b\u007f\n\u007f\f\u007f\u0419\t\u007f\u0001\u0080\u0001\u0080\u0003\u0080"+
|
||||
"\u041d\b\u0080\u0001\u0080\u0001\u0080\u0001\u0081\u0001\u0081\u0001\u0081"+
|
||||
"\u0001\u0081\u0003\u0081\u0425\b\u0081\u0001\u0081\u0003\u0081\u0428\b"+
|
||||
"\u0081\u0001\u0081\u0001\u0081\u0001\u0081\u0004\u0081\u042d\b\u0081\u000b"+
|
||||
"\u0081\f\u0081\u042e\u0001\u0081\u0001\u0081\u0001\u0081\u0001\u0081\u0001"+
|
||||
"\u0081\u0003\u0081\u0436\b\u0081\u0001\u0082\u0001\u0082\u0001\u0082\u0005"+
|
||||
"\u0082\u043b\b\u0082\n\u0082\f\u0082\u043e\t\u0082\u0001\u0082\u0003\u0082"+
|
||||
"\u0441\b\u0082\u0001\u0083\u0001\u0083\u0001\u0084\u0001\u0084\u0005\u0084"+
|
||||
"\u0447\b\u0084\n\u0084\f\u0084\u044a\t\u0084\u0001\u0084\u0003\u0084\u044d"+
|
||||
"\b\u0084\u0001\u0085\u0001\u0085\u0003\u0085\u0451\b\u0085\u0001\u0086"+
|
||||
"\u0001\u0086\u0001\u0086\u0001\u0086\u0003\u0086\u0457\b\u0086\u0002\u036e"+
|
||||
"\u0400\u0000\u0087\u0001\u0001\u0003\u0002\u0005\u0003\u0007\u0004\t\u0005"+
|
||||
"\u000b\u0006\r\u0007\u000f\b\u0011\t\u0013\n\u0015\u000b\u0017\f\u0019"+
|
||||
"\r\u001b\u000e\u001d\u000f\u001f\u0010!\u0011#\u0012%\u0013\'\u0014)\u0015"+
|
||||
"+\u0016-\u0017/\u00181\u00193\u001a5\u001b7\u001c9\u001d;\u001e=\u001f"+
|
||||
"? A!C\"E#G$I%K&M\'O(Q)S*U+W,Y-[.]/_0a1c2e3g4i5k6m7o8q9s:u;w<y={>}?\u007f"+
|
||||
"@\u0081A\u0083B\u0085C\u0087D\u0089E\u008bF\u008dG\u008fH\u0091I\u0093"+
|
||||
"J\u0095K\u0097L\u0099M\u009bN\u009dO\u009fP\u00a1Q\u00a3R\u00a5S\u00a7"+
|
||||
"T\u00a9U\u00abV\u00adW\u00afX\u00b1Y\u00b3Z\u00b5[\u00b7\\\u00b9]\u00bb"+
|
||||
"^\u00bd_\u00bf`\u00c1a\u00c3b\u00c5c\u00c7d\u00c9e\u00cbf\u00cdg\u00cf"+
|
||||
"h\u00d1i\u00d3j\u00d5k\u00d7l\u00d9m\u00dbn\u00ddo\u00dfp\u00e1q\u00e3"+
|
||||
"r\u00e5s\u00e7t\u00e9u\u00ebv\u00edw\u00efx\u00f1y\u00f3z\u00f5{\u00f7"+
|
||||
"|\u00f9}\u00fb~\u00fd\u007f\u00ff\u0080\u0101\u0000\u0103\u0000\u0105"+
|
||||
"\u0000\u0107\u0000\u0109\u0000\u010b\u0000\u010d\u0000\u0001\u0000\u001b"+
|
||||
"\u0001\u000019\u0002\u0000LLll\u0002\u0000XXxx\u0003\u000009AFaf\u0004"+
|
||||
"\u000009AF__af\u0001\u000007\u0002\u000007__\u0002\u0000BBbb\u0001\u0000"+
|
||||
"01\u0002\u000001__\u0004\u0000DDFFddff\u0002\u0000PPpp\u0002\u0000++-"+
|
||||
"-\u0004\u0000\n\n\r\r\'\'\\\\\u0004\u0000\n\n\r\r\"\"\\\\\u0002\u0000"+
|
||||
"\t\t \u0002\u0000\n\n\r\r\u0003\u0000\t\n\f\r \u0002\u0000EEee\b\u0000"+
|
||||
"\"\"\'\'\\\\bbffnnrrtt\u0001\u000003\u0001\u000009\u0002\u000009__\u0004"+
|
||||
"\u0000$$AZ__az\u0002\u0000\u0000\u007f\u8000\ud800\u8000\udbff\u0001\u0000"+
|
||||
"\u8000\ud800\u8000\udbff\u0001\u0000\u8000\udc00\u8000\udfff\u0484\u0000"+
|
||||
"\u0001\u0001\u0000\u0000\u0000\u0000\u0003\u0001\u0000\u0000\u0000\u0000"+
|
||||
"\u0005\u0001\u0000\u0000\u0000\u0000\u0007\u0001\u0000\u0000\u0000\u0000"+
|
||||
"\t\u0001\u0000\u0000\u0000\u0000\u000b\u0001\u0000\u0000\u0000\u0000\r"+
|
||||
"\u0001\u0000\u0000\u0000\u0000\u000f\u0001\u0000\u0000\u0000\u0000\u0011"+
|
||||
"\u0001\u0000\u0000\u0000\u0000\u0013\u0001\u0000\u0000\u0000\u0000\u0015"+
|
||||
"\u0001\u0000\u0000\u0000\u0000\u0017\u0001\u0000\u0000\u0000\u0000\u0019"+
|
||||
"\u0001\u0000\u0000\u0000\u0000\u001b\u0001\u0000\u0000\u0000\u0000\u001d"+
|
||||
"\u0001\u0000\u0000\u0000\u0000\u001f\u0001\u0000\u0000\u0000\u0000!\u0001"+
|
||||
"\u0000\u0000\u0000\u0000#\u0001\u0000\u0000\u0000\u0000%\u0001\u0000\u0000"+
|
||||
"\u0000\u0000\'\u0001\u0000\u0000\u0000\u0000)\u0001\u0000\u0000\u0000"+
|
||||
"\u0000+\u0001\u0000\u0000\u0000\u0000-\u0001\u0000\u0000\u0000\u0000/"+
|
||||
"\u0001\u0000\u0000\u0000\u00001\u0001\u0000\u0000\u0000\u00003\u0001\u0000"+
|
||||
"\u0000\u0000\u00005\u0001\u0000\u0000\u0000\u00007\u0001\u0000\u0000\u0000"+
|
||||
"\u00009\u0001\u0000\u0000\u0000\u0000;\u0001\u0000\u0000\u0000\u0000="+
|
||||
"\u0001\u0000\u0000\u0000\u0000?\u0001\u0000\u0000\u0000\u0000A\u0001\u0000"+
|
||||
"\u0000\u0000\u0000C\u0001\u0000\u0000\u0000\u0000E\u0001\u0000\u0000\u0000"+
|
||||
"\u0000G\u0001\u0000\u0000\u0000\u0000I\u0001\u0000\u0000\u0000\u0000K"+
|
||||
"\u0001\u0000\u0000\u0000\u0000M\u0001\u0000\u0000\u0000\u0000O\u0001\u0000"+
|
||||
"\u0000\u0000\u0000Q\u0001\u0000\u0000\u0000\u0000S\u0001\u0000\u0000\u0000"+
|
||||
"\u0000U\u0001\u0000\u0000\u0000\u0000W\u0001\u0000\u0000\u0000\u0000Y"+
|
||||
"\u0001\u0000\u0000\u0000\u0000[\u0001\u0000\u0000\u0000\u0000]\u0001\u0000"+
|
||||
"\u0000\u0000\u0000_\u0001\u0000\u0000\u0000\u0000a\u0001\u0000\u0000\u0000"+
|
||||
"\u0000c\u0001\u0000\u0000\u0000\u0000e\u0001\u0000\u0000\u0000\u0000g"+
|
||||
"\u0001\u0000\u0000\u0000\u0000i\u0001\u0000\u0000\u0000\u0000k\u0001\u0000"+
|
||||
"\u0000\u0000\u0000m\u0001\u0000\u0000\u0000\u0000o\u0001\u0000\u0000\u0000"+
|
||||
"\u0000q\u0001\u0000\u0000\u0000\u0000s\u0001\u0000\u0000\u0000\u0000u"+
|
||||
"\u0001\u0000\u0000\u0000\u0000w\u0001\u0000\u0000\u0000\u0000y\u0001\u0000"+
|
||||
"\u0000\u0000\u0000{\u0001\u0000\u0000\u0000\u0000}\u0001\u0000\u0000\u0000"+
|
||||
"\u0000\u007f\u0001\u0000\u0000\u0000\u0000\u0081\u0001\u0000\u0000\u0000"+
|
||||
"\u0000\u0083\u0001\u0000\u0000\u0000\u0000\u0085\u0001\u0000\u0000\u0000"+
|
||||
"\u0000\u0087\u0001\u0000\u0000\u0000\u0000\u0089\u0001\u0000\u0000\u0000"+
|
||||
"\u0000\u008b\u0001\u0000\u0000\u0000\u0000\u008d\u0001\u0000\u0000\u0000"+
|
||||
"\u0000\u008f\u0001\u0000\u0000\u0000\u0000\u0091\u0001\u0000\u0000\u0000"+
|
||||
"\u0000\u0093\u0001\u0000\u0000\u0000\u0000\u0095\u0001\u0000\u0000\u0000"+
|
||||
"\u0000\u0097\u0001\u0000\u0000\u0000\u0000\u0099\u0001\u0000\u0000\u0000"+
|
||||
"\u0000\u009b\u0001\u0000\u0000\u0000\u0000\u009d\u0001\u0000\u0000\u0000"+
|
||||
"\u0000\u009f\u0001\u0000\u0000\u0000\u0000\u00a1\u0001\u0000\u0000\u0000"+
|
||||
"\u0000\u00a3\u0001\u0000\u0000\u0000\u0000\u00a5\u0001\u0000\u0000\u0000"+
|
||||
"\u0000\u00a7\u0001\u0000\u0000\u0000\u0000\u00a9\u0001\u0000\u0000\u0000"+
|
||||
"\u0000\u00ab\u0001\u0000\u0000\u0000\u0000\u00ad\u0001\u0000\u0000\u0000"+
|
||||
"\u0000\u00af\u0001\u0000\u0000\u0000\u0000\u00b1\u0001\u0000\u0000\u0000"+
|
||||
"\u0000\u00b3\u0001\u0000\u0000\u0000\u0000\u00b5\u0001\u0000\u0000\u0000"+
|
||||
"\u0000\u00b7\u0001\u0000\u0000\u0000\u0000\u00b9\u0001\u0000\u0000\u0000"+
|
||||
"\u0000\u00bb\u0001\u0000\u0000\u0000\u0000\u00bd\u0001\u0000\u0000\u0000"+
|
||||
"\u0000\u00bf\u0001\u0000\u0000\u0000\u0000\u00c1\u0001\u0000\u0000\u0000"+
|
||||
"\u0000\u00c3\u0001\u0000\u0000\u0000\u0000\u00c5\u0001\u0000\u0000\u0000"+
|
||||
"\u0000\u00c7\u0001\u0000\u0000\u0000\u0000\u00c9\u0001\u0000\u0000\u0000"+
|
||||
"\u0000\u00cb\u0001\u0000\u0000\u0000\u0000\u00cd\u0001\u0000\u0000\u0000"+
|
||||
"\u0000\u00cf\u0001\u0000\u0000\u0000\u0000\u00d1\u0001\u0000\u0000\u0000"+
|
||||
"\u0000\u00d3\u0001\u0000\u0000\u0000\u0000\u00d5\u0001\u0000\u0000\u0000"+
|
||||
"\u0000\u00d7\u0001\u0000\u0000\u0000\u0000\u00d9\u0001\u0000\u0000\u0000"+
|
||||
"\u0000\u00db\u0001\u0000\u0000\u0000\u0000\u00dd\u0001\u0000\u0000\u0000"+
|
||||
"\u0000\u00df\u0001\u0000\u0000\u0000\u0000\u00e1\u0001\u0000\u0000\u0000"+
|
||||
"\u0000\u00e3\u0001\u0000\u0000\u0000\u0000\u00e5\u0001\u0000\u0000\u0000"+
|
||||
"\u0000\u00e7\u0001\u0000\u0000\u0000\u0000\u00e9\u0001\u0000\u0000\u0000"+
|
||||
"\u0000\u00eb\u0001\u0000\u0000\u0000\u0000\u00ed\u0001\u0000\u0000\u0000"+
|
||||
"\u0000\u00ef\u0001\u0000\u0000\u0000\u0000\u00f1\u0001\u0000\u0000\u0000"+
|
||||
"\u0000\u00f3\u0001\u0000\u0000\u0000\u0000\u00f5\u0001\u0000\u0000\u0000"+
|
||||
"\u0000\u00f7\u0001\u0000\u0000\u0000\u0000\u00f9\u0001\u0000\u0000\u0000"+
|
||||
"\u0000\u00fb\u0001\u0000\u0000\u0000\u0000\u00fd\u0001\u0000\u0000\u0000"+
|
||||
"\u0000\u00ff\u0001\u0000\u0000\u0000\u0001\u010f\u0001\u0000\u0000\u0000"+
|
||||
"\u0003\u0118\u0001\u0000\u0000\u0000\u0005\u011f\u0001\u0000\u0000\u0000"+
|
||||
"\u0007\u0127\u0001\u0000\u0000\u0000\t\u012d\u0001\u0000\u0000\u0000\u000b"+
|
||||
"\u0132\u0001\u0000\u0000\u0000\r\u0137\u0001\u0000\u0000\u0000\u000f\u013d"+
|
||||
"\u0001\u0000\u0000\u0000\u0011\u0142\u0001\u0000\u0000\u0000\u0013\u0148"+
|
||||
"\u0001\u0000\u0000\u0000\u0015\u014e\u0001\u0000\u0000\u0000\u0017\u0157"+
|
||||
"\u0001\u0000\u0000\u0000\u0019\u015f\u0001\u0000\u0000\u0000\u001b\u0162"+
|
||||
"\u0001\u0000\u0000\u0000\u001d\u0169\u0001\u0000\u0000\u0000\u001f\u016e"+
|
||||
"\u0001\u0000\u0000\u0000!\u0173\u0001\u0000\u0000\u0000#\u017b\u0001\u0000"+
|
||||
"\u0000\u0000%\u0181\u0001\u0000\u0000\u0000\'\u0189\u0001\u0000\u0000"+
|
||||
"\u0000)\u018f\u0001\u0000\u0000\u0000+\u0193\u0001\u0000\u0000\u0000-"+
|
||||
"\u0196\u0001\u0000\u0000\u0000/\u019b\u0001\u0000\u0000\u00001\u01a6\u0001"+
|
||||
"\u0000\u0000\u00003\u01ad\u0001\u0000\u0000\u00005\u01b8\u0001\u0000\u0000"+
|
||||
"\u00007\u01bc\u0001\u0000\u0000\u00009\u01c6\u0001\u0000\u0000\u0000;"+
|
||||
"\u01cb\u0001\u0000\u0000\u0000=\u01d2\u0001\u0000\u0000\u0000?\u01d6\u0001"+
|
||||
"\u0000\u0000\u0000A\u01de\u0001\u0000\u0000\u0000C\u01e6\u0001\u0000\u0000"+
|
||||
"\u0000E\u01f0\u0001\u0000\u0000\u0000G\u01f7\u0001\u0000\u0000\u0000I"+
|
||||
"\u01fe\u0001\u0000\u0000\u0000K\u0204\u0001\u0000\u0000\u0000M\u020b\u0001"+
|
||||
"\u0000\u0000\u0000O\u0214\u0001\u0000\u0000\u0000Q\u021a\u0001\u0000\u0000"+
|
||||
"\u0000S\u0221\u0001\u0000\u0000\u0000U\u022e\u0001\u0000\u0000\u0000W"+
|
||||
"\u0233\u0001\u0000\u0000\u0000Y\u0239\u0001\u0000\u0000\u0000[\u0240\u0001"+
|
||||
"\u0000\u0000\u0000]\u024a\u0001\u0000\u0000\u0000_\u024e\u0001\u0000\u0000"+
|
||||
"\u0000a\u0253\u0001\u0000\u0000\u0000c\u025c\u0001\u0000\u0000\u0000e"+
|
||||
"\u0262\u0001\u0000\u0000\u0000g\u0269\u0001\u0000\u0000\u0000i\u026e\u0001"+
|
||||
"\u0000\u0000\u0000k\u0277\u0001\u0000\u0000\u0000m\u027f\u0001\u0000\u0000"+
|
||||
"\u0000o\u0285\u0001\u0000\u0000\u0000q\u0288\u0001\u0000\u0000\u0000s"+
|
||||
"\u028d\u0001\u0000\u0000\u0000u\u0296\u0001\u0000\u0000\u0000w\u029b\u0001"+
|
||||
"\u0000\u0000\u0000y\u02a6\u0001\u0000\u0000\u0000{\u02aa\u0001\u0000\u0000"+
|
||||
"\u0000}\u02b0\u0001\u0000\u0000\u0000\u007f\u02b7\u0001\u0000\u0000\u0000"+
|
||||
"\u0081\u02be\u0001\u0000\u0000\u0000\u0083\u02c6\u0001\u0000\u0000\u0000"+
|
||||
"\u0085\u02de\u0001\u0000\u0000\u0000\u0087\u02e3\u0001\u0000\u0000\u0000"+
|
||||
"\u0089\u02f2\u0001\u0000\u0000\u0000\u008b\u0306\u0001\u0000\u0000\u0000"+
|
||||
"\u008d\u032c\u0001\u0000\u0000\u0000\u008f\u032e\u0001\u0000\u0000\u0000"+
|
||||
"\u0091\u034c\u0001\u0000\u0000\u0000\u0093\u034e\u0001\u0000\u0000\u0000"+
|
||||
"\u0095\u0355\u0001\u0000\u0000\u0000\u0097\u035f\u0001\u0000\u0000\u0000"+
|
||||
"\u0099\u0375\u0001\u0000\u0000\u0000\u009b\u037a\u0001\u0000\u0000\u0000"+
|
||||
"\u009d\u037c\u0001\u0000\u0000\u0000\u009f\u037e\u0001\u0000\u0000\u0000"+
|
||||
"\u00a1\u0380\u0001\u0000\u0000\u0000\u00a3\u0382\u0001\u0000\u0000\u0000"+
|
||||
"\u00a5\u0384\u0001\u0000\u0000\u0000\u00a7\u0386\u0001\u0000\u0000\u0000"+
|
||||
"\u00a9\u0388\u0001\u0000\u0000\u0000\u00ab\u038a\u0001\u0000\u0000\u0000"+
|
||||
"\u00ad\u038c\u0001\u0000\u0000\u0000\u00af\u038e\u0001\u0000\u0000\u0000"+
|
||||
"\u00b1\u0390\u0001\u0000\u0000\u0000\u00b3\u0392\u0001\u0000\u0000\u0000"+
|
||||
"\u00b5\u0394\u0001\u0000\u0000\u0000\u00b7\u0396\u0001\u0000\u0000\u0000"+
|
||||
"\u00b9\u0398\u0001\u0000\u0000\u0000\u00bb\u039a\u0001\u0000\u0000\u0000"+
|
||||
"\u00bd\u039d\u0001\u0000\u0000\u0000\u00bf\u03a0\u0001\u0000\u0000\u0000"+
|
||||
"\u00c1\u03a3\u0001\u0000\u0000\u0000\u00c3\u03a6\u0001\u0000\u0000\u0000"+
|
||||
"\u00c5\u03a9\u0001\u0000\u0000\u0000\u00c7\u03ac\u0001\u0000\u0000\u0000"+
|
||||
"\u00c9\u03af\u0001\u0000\u0000\u0000\u00cb\u03b2\u0001\u0000\u0000\u0000"+
|
||||
"\u00cd\u03b4\u0001\u0000\u0000\u0000\u00cf\u03b6\u0001\u0000\u0000\u0000"+
|
||||
"\u00d1\u03b8\u0001\u0000\u0000\u0000\u00d3\u03ba\u0001\u0000\u0000\u0000"+
|
||||
"\u00d5\u03bc\u0001\u0000\u0000\u0000\u00d7\u03be\u0001\u0000\u0000\u0000"+
|
||||
"\u00d9\u03c0\u0001\u0000\u0000\u0000\u00db\u03c2\u0001\u0000\u0000\u0000"+
|
||||
"\u00dd\u03c5\u0001\u0000\u0000\u0000\u00df\u03c8\u0001\u0000\u0000\u0000"+
|
||||
"\u00e1\u03cb\u0001\u0000\u0000\u0000\u00e3\u03ce\u0001\u0000\u0000\u0000"+
|
||||
"\u00e5\u03d1\u0001\u0000\u0000\u0000\u00e7\u03d4\u0001\u0000\u0000\u0000"+
|
||||
"\u00e9\u03d7\u0001\u0000\u0000\u0000\u00eb\u03da\u0001\u0000\u0000\u0000"+
|
||||
"\u00ed\u03de\u0001\u0000\u0000\u0000\u00ef\u03e2\u0001\u0000\u0000\u0000"+
|
||||
"\u00f1\u03e7\u0001\u0000\u0000\u0000\u00f3\u03ea\u0001\u0000\u0000\u0000"+
|
||||
"\u00f5\u03ed\u0001\u0000\u0000\u0000\u00f7\u03ef\u0001\u0000\u0000\u0000"+
|
||||
"\u00f9\u03f4\u0001\u0000\u0000\u0000\u00fb\u03fa\u0001\u0000\u0000\u0000"+
|
||||
"\u00fd\u0408\u0001\u0000\u0000\u0000\u00ff\u0413\u0001\u0000\u0000\u0000"+
|
||||
"\u0101\u041a\u0001\u0000\u0000\u0000\u0103\u0435\u0001\u0000\u0000\u0000"+
|
||||
"\u0105\u0437\u0001\u0000\u0000\u0000\u0107\u0442\u0001\u0000\u0000\u0000"+
|
||||
"\u0109\u0444\u0001\u0000\u0000\u0000\u010b\u0450\u0001\u0000\u0000\u0000"+
|
||||
"\u010d\u0456\u0001\u0000\u0000\u0000\u010f\u0110\u0005a\u0000\u0000\u0110"+
|
||||
"\u0111\u0005b\u0000\u0000\u0111\u0112\u0005s\u0000\u0000\u0112\u0113\u0005"+
|
||||
"t\u0000\u0000\u0113\u0114\u0005r\u0000\u0000\u0114\u0115\u0005a\u0000"+
|
||||
"\u0000\u0115\u0116\u0005c\u0000\u0000\u0116\u0117\u0005t\u0000\u0000\u0117"+
|
||||
"\u0002\u0001\u0000\u0000\u0000\u0118\u0119\u0005a\u0000\u0000\u0119\u011a"+
|
||||
"\u0005s\u0000\u0000\u011a\u011b\u0005s\u0000\u0000\u011b\u011c\u0005e"+
|
||||
"\u0000\u0000\u011c\u011d\u0005r\u0000\u0000\u011d\u011e\u0005t\u0000\u0000"+
|
||||
"\u011e\u0004\u0001\u0000\u0000\u0000\u011f\u0120\u0005b\u0000\u0000\u0120"+
|
||||
"\u0121\u0005o\u0000\u0000\u0121\u0122\u0005o\u0000\u0000\u0122\u0123\u0005"+
|
||||
"l\u0000\u0000\u0123\u0124\u0005e\u0000\u0000\u0124\u0125\u0005a\u0000"+
|
||||
"\u0000\u0125\u0126\u0005n\u0000\u0000\u0126\u0006\u0001\u0000\u0000\u0000"+
|
||||
"\u0127\u0128\u0005b\u0000\u0000\u0128\u0129\u0005r\u0000\u0000\u0129\u012a"+
|
||||
"\u0005e\u0000\u0000\u012a\u012b\u0005a\u0000\u0000\u012b\u012c\u0005k"+
|
||||
"\u0000\u0000\u012c\b\u0001\u0000\u0000\u0000\u012d\u012e\u0005b\u0000"+
|
||||
"\u0000\u012e\u012f\u0005y\u0000\u0000\u012f\u0130\u0005t\u0000\u0000\u0130"+
|
||||
"\u0131\u0005e\u0000\u0000\u0131\n\u0001\u0000\u0000\u0000\u0132\u0133"+
|
||||
"\u0005c\u0000\u0000\u0133\u0134\u0005a\u0000\u0000\u0134\u0135\u0005s"+
|
||||
"\u0000\u0000\u0135\u0136\u0005e\u0000\u0000\u0136\f\u0001\u0000\u0000"+
|
||||
"\u0000\u0137\u0138\u0005c\u0000\u0000\u0138\u0139\u0005a\u0000\u0000\u0139"+
|
||||
"\u013a\u0005t\u0000\u0000\u013a\u013b\u0005c\u0000\u0000\u013b\u013c\u0005"+
|
||||
"h\u0000\u0000\u013c\u000e\u0001\u0000\u0000\u0000\u013d\u013e\u0005c\u0000"+
|
||||
"\u0000\u013e\u013f\u0005h\u0000\u0000\u013f\u0140\u0005a\u0000\u0000\u0140"+
|
||||
"\u0141\u0005r\u0000\u0000\u0141\u0010\u0001\u0000\u0000\u0000\u0142\u0143"+
|
||||
"\u0005c\u0000\u0000\u0143\u0144\u0005l\u0000\u0000\u0144\u0145\u0005a"+
|
||||
"\u0000\u0000\u0145\u0146\u0005s\u0000\u0000\u0146\u0147\u0005s\u0000\u0000"+
|
||||
"\u0147\u0012\u0001\u0000\u0000\u0000\u0148\u0149\u0005c\u0000\u0000\u0149"+
|
||||
"\u014a\u0005o\u0000\u0000\u014a\u014b\u0005n\u0000\u0000\u014b\u014c\u0005"+
|
||||
"s\u0000\u0000\u014c\u014d\u0005t\u0000\u0000\u014d\u0014\u0001\u0000\u0000"+
|
||||
"\u0000\u014e\u014f\u0005c\u0000\u0000\u014f\u0150\u0005o\u0000\u0000\u0150"+
|
||||
"\u0151\u0005n\u0000\u0000\u0151\u0152\u0005t\u0000\u0000\u0152\u0153\u0005"+
|
||||
"i\u0000\u0000\u0153\u0154\u0005n\u0000\u0000\u0154\u0155\u0005u\u0000"+
|
||||
"\u0000\u0155\u0156\u0005e\u0000\u0000\u0156\u0016\u0001\u0000\u0000\u0000"+
|
||||
"\u0157\u0158\u0005d\u0000\u0000\u0158\u0159\u0005e\u0000\u0000\u0159\u015a"+
|
||||
"\u0005f\u0000\u0000\u015a\u015b\u0005a\u0000\u0000\u015b\u015c\u0005u"+
|
||||
"\u0000\u0000\u015c\u015d\u0005l\u0000\u0000\u015d\u015e\u0005t\u0000\u0000"+
|
||||
"\u015e\u0018\u0001\u0000\u0000\u0000\u015f\u0160\u0005d\u0000\u0000\u0160"+
|
||||
"\u0161\u0005o\u0000\u0000\u0161\u001a\u0001\u0000\u0000\u0000\u0162\u0163"+
|
||||
"\u0005d\u0000\u0000\u0163\u0164\u0005o\u0000\u0000\u0164\u0165\u0005u"+
|
||||
"\u0000\u0000\u0165\u0166\u0005b\u0000\u0000\u0166\u0167\u0005l\u0000\u0000"+
|
||||
"\u0167\u0168\u0005e\u0000\u0000\u0168\u001c\u0001\u0000\u0000\u0000\u0169"+
|
||||
"\u016a\u0005e\u0000\u0000\u016a\u016b\u0005l\u0000\u0000\u016b\u016c\u0005"+
|
||||
"s\u0000\u0000\u016c\u016d\u0005e\u0000\u0000\u016d\u001e\u0001\u0000\u0000"+
|
||||
"\u0000\u016e\u016f\u0005e\u0000\u0000\u016f\u0170\u0005n\u0000\u0000\u0170"+
|
||||
"\u0171\u0005u\u0000\u0000\u0171\u0172\u0005m\u0000\u0000\u0172 \u0001"+
|
||||
"\u0000\u0000\u0000\u0173\u0174\u0005e\u0000\u0000\u0174\u0175\u0005x\u0000"+
|
||||
"\u0000\u0175\u0176\u0005t\u0000\u0000\u0176\u0177\u0005e\u0000\u0000\u0177"+
|
||||
"\u0178\u0005n\u0000\u0000\u0178\u0179\u0005d\u0000\u0000\u0179\u017a\u0005"+
|
||||
"s\u0000\u0000\u017a\"\u0001\u0000\u0000\u0000\u017b\u017c\u0005f\u0000"+
|
||||
"\u0000\u017c\u017d\u0005i\u0000\u0000\u017d\u017e\u0005n\u0000\u0000\u017e"+
|
||||
"\u017f\u0005a\u0000\u0000\u017f\u0180\u0005l\u0000\u0000\u0180$\u0001"+
|
||||
"\u0000\u0000\u0000\u0181\u0182\u0005f\u0000\u0000\u0182\u0183\u0005i\u0000"+
|
||||
"\u0000\u0183\u0184\u0005n\u0000\u0000\u0184\u0185\u0005a\u0000\u0000\u0185"+
|
||||
"\u0186\u0005l\u0000\u0000\u0186\u0187\u0005l\u0000\u0000\u0187\u0188\u0005"+
|
||||
"y\u0000\u0000\u0188&\u0001\u0000\u0000\u0000\u0189\u018a\u0005f\u0000"+
|
||||
"\u0000\u018a\u018b\u0005l\u0000\u0000\u018b\u018c\u0005o\u0000\u0000\u018c"+
|
||||
"\u018d\u0005a\u0000\u0000\u018d\u018e\u0005t\u0000\u0000\u018e(\u0001"+
|
||||
"\u0000\u0000\u0000\u018f\u0190\u0005f\u0000\u0000\u0190\u0191\u0005o\u0000"+
|
||||
"\u0000\u0191\u0192\u0005r\u0000\u0000\u0192*\u0001\u0000\u0000\u0000\u0193"+
|
||||
"\u0194\u0005i\u0000\u0000\u0194\u0195\u0005f\u0000\u0000\u0195,\u0001"+
|
||||
"\u0000\u0000\u0000\u0196\u0197\u0005g\u0000\u0000\u0197\u0198\u0005o\u0000"+
|
||||
"\u0000\u0198\u0199\u0005t\u0000\u0000\u0199\u019a\u0005o\u0000\u0000\u019a"+
|
||||
".\u0001\u0000\u0000\u0000\u019b\u019c\u0005i\u0000\u0000\u019c\u019d\u0005"+
|
||||
"m\u0000\u0000\u019d\u019e\u0005p\u0000\u0000\u019e\u019f\u0005l\u0000"+
|
||||
"\u0000\u019f\u01a0\u0005e\u0000\u0000\u01a0\u01a1\u0005m\u0000\u0000\u01a1"+
|
||||
"\u01a2\u0005e\u0000\u0000\u01a2\u01a3\u0005n\u0000\u0000\u01a3\u01a4\u0005"+
|
||||
"t\u0000\u0000\u01a4\u01a5\u0005s\u0000\u0000\u01a50\u0001\u0000\u0000"+
|
||||
"\u0000\u01a6\u01a7\u0005i\u0000\u0000\u01a7\u01a8\u0005m\u0000\u0000\u01a8"+
|
||||
"\u01a9\u0005p\u0000\u0000\u01a9\u01aa\u0005o\u0000\u0000\u01aa\u01ab\u0005"+
|
||||
"r\u0000\u0000\u01ab\u01ac\u0005t\u0000\u0000\u01ac2\u0001\u0000\u0000"+
|
||||
"\u0000\u01ad\u01ae\u0005i\u0000\u0000\u01ae\u01af\u0005n\u0000\u0000\u01af"+
|
||||
"\u01b0\u0005s\u0000\u0000\u01b0\u01b1\u0005t\u0000\u0000\u01b1\u01b2\u0005"+
|
||||
"a\u0000\u0000\u01b2\u01b3\u0005n\u0000\u0000\u01b3\u01b4\u0005c\u0000"+
|
||||
"\u0000\u01b4\u01b5\u0005e\u0000\u0000\u01b5\u01b6\u0005o\u0000\u0000\u01b6"+
|
||||
"\u01b7\u0005f\u0000\u0000\u01b74\u0001\u0000\u0000\u0000\u01b8\u01b9\u0005"+
|
||||
"i\u0000\u0000\u01b9\u01ba\u0005n\u0000\u0000\u01ba\u01bb\u0005t\u0000"+
|
||||
"\u0000\u01bb6\u0001\u0000\u0000\u0000\u01bc\u01bd\u0005i\u0000\u0000\u01bd"+
|
||||
"\u01be\u0005n\u0000\u0000\u01be\u01bf\u0005t\u0000\u0000\u01bf\u01c0\u0005"+
|
||||
"e\u0000\u0000\u01c0\u01c1\u0005r\u0000\u0000\u01c1\u01c2\u0005f\u0000"+
|
||||
"\u0000\u01c2\u01c3\u0005a\u0000\u0000\u01c3\u01c4\u0005c\u0000\u0000\u01c4"+
|
||||
"\u01c5\u0005e\u0000\u0000\u01c58\u0001\u0000\u0000\u0000\u01c6\u01c7\u0005"+
|
||||
"l\u0000\u0000\u01c7\u01c8\u0005o\u0000\u0000\u01c8\u01c9\u0005n\u0000"+
|
||||
"\u0000\u01c9\u01ca\u0005g\u0000\u0000\u01ca:\u0001\u0000\u0000\u0000\u01cb"+
|
||||
"\u01cc\u0005n\u0000\u0000\u01cc\u01cd\u0005a\u0000\u0000\u01cd\u01ce\u0005"+
|
||||
"t\u0000\u0000\u01ce\u01cf\u0005i\u0000\u0000\u01cf\u01d0\u0005v\u0000"+
|
||||
"\u0000\u01d0\u01d1\u0005e\u0000\u0000\u01d1<\u0001\u0000\u0000\u0000\u01d2"+
|
||||
"\u01d3\u0005n\u0000\u0000\u01d3\u01d4\u0005e\u0000\u0000\u01d4\u01d5\u0005"+
|
||||
"w\u0000\u0000\u01d5>\u0001\u0000\u0000\u0000\u01d6\u01d7\u0005p\u0000"+
|
||||
"\u0000\u01d7\u01d8\u0005a\u0000\u0000\u01d8\u01d9\u0005c\u0000\u0000\u01d9"+
|
||||
"\u01da\u0005k\u0000\u0000\u01da\u01db\u0005a\u0000\u0000\u01db\u01dc\u0005"+
|
||||
"g\u0000\u0000\u01dc\u01dd\u0005e\u0000\u0000\u01dd@\u0001\u0000\u0000"+
|
||||
"\u0000\u01de\u01df\u0005p\u0000\u0000\u01df\u01e0\u0005r\u0000\u0000\u01e0"+
|
||||
"\u01e1\u0005i\u0000\u0000\u01e1\u01e2\u0005v\u0000\u0000\u01e2\u01e3\u0005"+
|
||||
"a\u0000\u0000\u01e3\u01e4\u0005t\u0000\u0000\u01e4\u01e5\u0005e\u0000"+
|
||||
"\u0000\u01e5B\u0001\u0000\u0000\u0000\u01e6\u01e7\u0005p\u0000\u0000\u01e7"+
|
||||
"\u01e8\u0005r\u0000\u0000\u01e8\u01e9\u0005o\u0000\u0000\u01e9\u01ea\u0005"+
|
||||
"t\u0000\u0000\u01ea\u01eb\u0005e\u0000\u0000\u01eb\u01ec\u0005c\u0000"+
|
||||
"\u0000\u01ec\u01ed\u0005t\u0000\u0000\u01ed\u01ee\u0005e\u0000\u0000\u01ee"+
|
||||
"\u01ef\u0005d\u0000\u0000\u01efD\u0001\u0000\u0000\u0000\u01f0\u01f1\u0005"+
|
||||
"p\u0000\u0000\u01f1\u01f2\u0005u\u0000\u0000\u01f2\u01f3\u0005b\u0000"+
|
||||
"\u0000\u01f3\u01f4\u0005l\u0000\u0000\u01f4\u01f5\u0005i\u0000\u0000\u01f5"+
|
||||
"\u01f6\u0005c\u0000\u0000\u01f6F\u0001\u0000\u0000\u0000\u01f7\u01f8\u0005"+
|
||||
"r\u0000\u0000\u01f8\u01f9\u0005e\u0000\u0000\u01f9\u01fa\u0005t\u0000"+
|
||||
"\u0000\u01fa\u01fb\u0005u\u0000\u0000\u01fb\u01fc\u0005r\u0000\u0000\u01fc"+
|
||||
"\u01fd\u0005n\u0000\u0000\u01fdH\u0001\u0000\u0000\u0000\u01fe\u01ff\u0005"+
|
||||
"s\u0000\u0000\u01ff\u0200\u0005h\u0000\u0000\u0200\u0201\u0005o\u0000"+
|
||||
"\u0000\u0201\u0202\u0005r\u0000\u0000\u0202\u0203\u0005t\u0000\u0000\u0203"+
|
||||
"J\u0001\u0000\u0000\u0000\u0204\u0205\u0005s\u0000\u0000\u0205\u0206\u0005"+
|
||||
"t\u0000\u0000\u0206\u0207\u0005a\u0000\u0000\u0207\u0208\u0005t\u0000"+
|
||||
"\u0000\u0208\u0209\u0005i\u0000\u0000\u0209\u020a\u0005c\u0000\u0000\u020a"+
|
||||
"L\u0001\u0000\u0000\u0000\u020b\u020c\u0005s\u0000\u0000\u020c\u020d\u0005"+
|
||||
"t\u0000\u0000\u020d\u020e\u0005r\u0000\u0000\u020e\u020f\u0005i\u0000"+
|
||||
"\u0000\u020f\u0210\u0005c\u0000\u0000\u0210\u0211\u0005t\u0000\u0000\u0211"+
|
||||
"\u0212\u0005f\u0000\u0000\u0212\u0213\u0005p\u0000\u0000\u0213N\u0001"+
|
||||
"\u0000\u0000\u0000\u0214\u0215\u0005s\u0000\u0000\u0215\u0216\u0005u\u0000"+
|
||||
"\u0000\u0216\u0217\u0005p\u0000\u0000\u0217\u0218\u0005e\u0000\u0000\u0218"+
|
||||
"\u0219\u0005r\u0000\u0000\u0219P\u0001\u0000\u0000\u0000\u021a\u021b\u0005"+
|
||||
"s\u0000\u0000\u021b\u021c\u0005w\u0000\u0000\u021c\u021d\u0005i\u0000"+
|
||||
"\u0000\u021d\u021e\u0005t\u0000\u0000\u021e\u021f\u0005c\u0000\u0000\u021f"+
|
||||
"\u0220\u0005h\u0000\u0000\u0220R\u0001\u0000\u0000\u0000\u0221\u0222\u0005"+
|
||||
"s\u0000\u0000\u0222\u0223\u0005y\u0000\u0000\u0223\u0224\u0005n\u0000"+
|
||||
"\u0000\u0224\u0225\u0005c\u0000\u0000\u0225\u0226\u0005h\u0000\u0000\u0226"+
|
||||
"\u0227\u0005r\u0000\u0000\u0227\u0228\u0005o\u0000\u0000\u0228\u0229\u0005"+
|
||||
"n\u0000\u0000\u0229\u022a\u0005i\u0000\u0000\u022a\u022b\u0005z\u0000"+
|
||||
"\u0000\u022b\u022c\u0005e\u0000\u0000\u022c\u022d\u0005d\u0000\u0000\u022d"+
|
||||
"T\u0001\u0000\u0000\u0000\u022e\u022f\u0005t\u0000\u0000\u022f\u0230\u0005"+
|
||||
"h\u0000\u0000\u0230\u0231\u0005i\u0000\u0000\u0231\u0232\u0005s\u0000"+
|
||||
"\u0000\u0232V\u0001\u0000\u0000\u0000\u0233\u0234\u0005t\u0000\u0000\u0234"+
|
||||
"\u0235\u0005h\u0000\u0000\u0235\u0236\u0005r\u0000\u0000\u0236\u0237\u0005"+
|
||||
"o\u0000\u0000\u0237\u0238\u0005w\u0000\u0000\u0238X\u0001\u0000\u0000"+
|
||||
"\u0000\u0239\u023a\u0005t\u0000\u0000\u023a\u023b\u0005h\u0000\u0000\u023b"+
|
||||
"\u023c\u0005r\u0000\u0000\u023c\u023d\u0005o\u0000\u0000\u023d\u023e\u0005"+
|
||||
"w\u0000\u0000\u023e\u023f\u0005s\u0000\u0000\u023fZ\u0001\u0000\u0000"+
|
||||
"\u0000\u0240\u0241\u0005t\u0000\u0000\u0241\u0242\u0005r\u0000\u0000\u0242"+
|
||||
"\u0243\u0005a\u0000\u0000\u0243\u0244\u0005n\u0000\u0000\u0244\u0245\u0005"+
|
||||
"s\u0000\u0000\u0245\u0246\u0005i\u0000\u0000\u0246\u0247\u0005e\u0000"+
|
||||
"\u0000\u0247\u0248\u0005n\u0000\u0000\u0248\u0249\u0005t\u0000\u0000\u0249"+
|
||||
"\\\u0001\u0000\u0000\u0000\u024a\u024b\u0005t\u0000\u0000\u024b\u024c"+
|
||||
"\u0005r\u0000\u0000\u024c\u024d\u0005y\u0000\u0000\u024d^\u0001\u0000"+
|
||||
"\u0000\u0000\u024e\u024f\u0005v\u0000\u0000\u024f\u0250\u0005o\u0000\u0000"+
|
||||
"\u0250\u0251\u0005i\u0000\u0000\u0251\u0252\u0005d\u0000\u0000\u0252`"+
|
||||
"\u0001\u0000\u0000\u0000\u0253\u0254\u0005v\u0000\u0000\u0254\u0255\u0005"+
|
||||
"o\u0000\u0000\u0255\u0256\u0005l\u0000\u0000\u0256\u0257\u0005a\u0000"+
|
||||
"\u0000\u0257\u0258\u0005t\u0000\u0000\u0258\u0259\u0005i\u0000\u0000\u0259"+
|
||||
"\u025a\u0005l\u0000\u0000\u025a\u025b\u0005e\u0000\u0000\u025bb\u0001"+
|
||||
"\u0000\u0000\u0000\u025c\u025d\u0005w\u0000\u0000\u025d\u025e\u0005h\u0000"+
|
||||
"\u0000\u025e\u025f\u0005i\u0000\u0000\u025f\u0260\u0005l\u0000\u0000\u0260"+
|
||||
"\u0261\u0005e\u0000\u0000\u0261d\u0001\u0000\u0000\u0000\u0262\u0263\u0005"+
|
||||
"m\u0000\u0000\u0263\u0264\u0005o\u0000\u0000\u0264\u0265\u0005d\u0000"+
|
||||
"\u0000\u0265\u0266\u0005u\u0000\u0000\u0266\u0267\u0005l\u0000\u0000\u0267"+
|
||||
"\u0268\u0005e\u0000\u0000\u0268f\u0001\u0000\u0000\u0000\u0269\u026a\u0005"+
|
||||
"o\u0000\u0000\u026a\u026b\u0005p\u0000\u0000\u026b\u026c\u0005e\u0000"+
|
||||
"\u0000\u026c\u026d\u0005n\u0000\u0000\u026dh\u0001\u0000\u0000\u0000\u026e"+
|
||||
"\u026f\u0005r\u0000\u0000\u026f\u0270\u0005e\u0000\u0000\u0270\u0271\u0005"+
|
||||
"q\u0000\u0000\u0271\u0272\u0005u\u0000\u0000\u0272\u0273\u0005i\u0000"+
|
||||
"\u0000\u0273\u0274\u0005r\u0000\u0000\u0274\u0275\u0005e\u0000\u0000\u0275"+
|
||||
"\u0276\u0005s\u0000\u0000\u0276j\u0001\u0000\u0000\u0000\u0277\u0278\u0005"+
|
||||
"e\u0000\u0000\u0278\u0279\u0005x\u0000\u0000\u0279\u027a\u0005p\u0000"+
|
||||
"\u0000\u027a\u027b\u0005o\u0000\u0000\u027b\u027c\u0005r\u0000\u0000\u027c"+
|
||||
"\u027d\u0005t\u0000\u0000\u027d\u027e\u0005s\u0000\u0000\u027el\u0001"+
|
||||
"\u0000\u0000\u0000\u027f\u0280\u0005o\u0000\u0000\u0280\u0281\u0005p\u0000"+
|
||||
"\u0000\u0281\u0282\u0005e\u0000\u0000\u0282\u0283\u0005n\u0000\u0000\u0283"+
|
||||
"\u0284\u0005s\u0000\u0000\u0284n\u0001\u0000\u0000\u0000\u0285\u0286\u0005"+
|
||||
"t\u0000\u0000\u0286\u0287\u0005o\u0000\u0000\u0287p\u0001\u0000\u0000"+
|
||||
"\u0000\u0288\u0289\u0005u\u0000\u0000\u0289\u028a\u0005s\u0000\u0000\u028a"+
|
||||
"\u028b\u0005e\u0000\u0000\u028b\u028c\u0005s\u0000\u0000\u028cr\u0001"+
|
||||
"\u0000\u0000\u0000\u028d\u028e\u0005p\u0000\u0000\u028e\u028f\u0005r\u0000"+
|
||||
"\u0000\u028f\u0290\u0005o\u0000\u0000\u0290\u0291\u0005v\u0000\u0000\u0291"+
|
||||
"\u0292\u0005i\u0000\u0000\u0292\u0293\u0005d\u0000\u0000\u0293\u0294\u0005"+
|
||||
"e\u0000\u0000\u0294\u0295\u0005s\u0000\u0000\u0295t\u0001\u0000\u0000"+
|
||||
"\u0000\u0296\u0297\u0005w\u0000\u0000\u0297\u0298\u0005i\u0000\u0000\u0298"+
|
||||
"\u0299\u0005t\u0000\u0000\u0299\u029a\u0005h\u0000\u0000\u029av\u0001"+
|
||||
"\u0000\u0000\u0000\u029b\u029c\u0005t\u0000\u0000\u029c\u029d\u0005r\u0000"+
|
||||
"\u0000\u029d\u029e\u0005a\u0000\u0000\u029e\u029f\u0005n\u0000\u0000\u029f"+
|
||||
"\u02a0\u0005s\u0000\u0000\u02a0\u02a1\u0005i\u0000\u0000\u02a1\u02a2\u0005"+
|
||||
"t\u0000\u0000\u02a2\u02a3\u0005i\u0000\u0000\u02a3\u02a4\u0005v\u0000"+
|
||||
"\u0000\u02a4\u02a5\u0005e\u0000\u0000\u02a5x\u0001\u0000\u0000\u0000\u02a6"+
|
||||
"\u02a7\u0005v\u0000\u0000\u02a7\u02a8\u0005a\u0000\u0000\u02a8\u02a9\u0005"+
|
||||
"r\u0000\u0000\u02a9z\u0001\u0000\u0000\u0000\u02aa\u02ab\u0005y\u0000"+
|
||||
"\u0000\u02ab\u02ac\u0005i\u0000\u0000\u02ac\u02ad\u0005e\u0000\u0000\u02ad"+
|
||||
"\u02ae\u0005l\u0000\u0000\u02ae\u02af\u0005d\u0000\u0000\u02af|\u0001"+
|
||||
"\u0000\u0000\u0000\u02b0\u02b1\u0005r\u0000\u0000\u02b1\u02b2\u0005e\u0000"+
|
||||
"\u0000\u02b2\u02b3\u0005c\u0000\u0000\u02b3\u02b4\u0005o\u0000\u0000\u02b4"+
|
||||
"\u02b5\u0005r\u0000\u0000\u02b5\u02b6\u0005d\u0000\u0000\u02b6~\u0001"+
|
||||
"\u0000\u0000\u0000\u02b7\u02b8\u0005s\u0000\u0000\u02b8\u02b9\u0005e\u0000"+
|
||||
"\u0000\u02b9\u02ba\u0005a\u0000\u0000\u02ba\u02bb\u0005l\u0000\u0000\u02bb"+
|
||||
"\u02bc\u0005e\u0000\u0000\u02bc\u02bd\u0005d\u0000\u0000\u02bd\u0080\u0001"+
|
||||
"\u0000\u0000\u0000\u02be\u02bf\u0005p\u0000\u0000\u02bf\u02c0\u0005e\u0000"+
|
||||
"\u0000\u02c0\u02c1\u0005r\u0000\u0000\u02c1\u02c2\u0005m\u0000\u0000\u02c2"+
|
||||
"\u02c3\u0005i\u0000\u0000\u02c3\u02c4\u0005t\u0000\u0000\u02c4\u02c5\u0005"+
|
||||
"s\u0000\u0000\u02c5\u0082\u0001\u0000\u0000\u0000\u02c6\u02c7\u0005n\u0000"+
|
||||
"\u0000\u02c7\u02c8\u0005o\u0000\u0000\u02c8\u02c9\u0005n\u0000\u0000\u02c9"+
|
||||
"\u02ca\u0005-\u0000\u0000\u02ca\u02cb\u0005s\u0000\u0000\u02cb\u02cc\u0005"+
|
||||
"e\u0000\u0000\u02cc\u02cd\u0005a\u0000\u0000\u02cd\u02ce\u0005l\u0000"+
|
||||
"\u0000\u02ce\u02cf\u0005e\u0000\u0000\u02cf\u02d0\u0005d\u0000\u0000\u02d0"+
|
||||
"\u0084\u0001\u0000\u0000\u0000\u02d1\u02df\u00050\u0000\u0000\u02d2\u02dc"+
|
||||
"\u0007\u0000\u0000\u0000\u02d3\u02d5\u0003\u0109\u0084\u0000\u02d4\u02d3"+
|
||||
"\u0001\u0000\u0000\u0000\u02d4\u02d5\u0001\u0000\u0000\u0000\u02d5\u02dd"+
|
||||
"\u0001\u0000\u0000\u0000\u02d6\u02d8\u0005_\u0000\u0000\u02d7\u02d6\u0001"+
|
||||
"\u0000\u0000\u0000\u02d8\u02d9\u0001\u0000\u0000\u0000\u02d9\u02d7\u0001"+
|
||||
"\u0000\u0000\u0000\u02d9\u02da\u0001\u0000\u0000\u0000\u02da\u02db\u0001"+
|
||||
"\u0000\u0000\u0000\u02db\u02dd\u0003\u0109\u0084\u0000\u02dc\u02d4\u0001"+
|
||||
"\u0000\u0000\u0000\u02dc\u02d7\u0001\u0000\u0000\u0000\u02dd\u02df\u0001"+
|
||||
"\u0000\u0000\u0000\u02de\u02d1\u0001\u0000\u0000\u0000\u02de\u02d2\u0001"+
|
||||
"\u0000\u0000\u0000\u02df\u02e1\u0001\u0000\u0000\u0000\u02e0\u02e2\u0007"+
|
||||
"\u0001\u0000\u0000\u02e1\u02e0\u0001\u0000\u0000\u0000\u02e1\u02e2\u0001"+
|
||||
"\u0000\u0000\u0000\u02e2\u0086\u0001\u0000\u0000\u0000\u02e3\u02e4\u0005"+
|
||||
"0\u0000\u0000\u02e4\u02e5\u0007\u0002\u0000\u0000\u02e5\u02ed\u0007\u0003"+
|
||||
"\u0000\u0000\u02e6\u02e8\u0007\u0004\u0000\u0000\u02e7\u02e6\u0001\u0000"+
|
||||
"\u0000\u0000\u02e8\u02eb\u0001\u0000\u0000\u0000\u02e9\u02e7\u0001\u0000"+
|
||||
"\u0000\u0000\u02e9\u02ea\u0001\u0000\u0000\u0000\u02ea\u02ec\u0001\u0000"+
|
||||
"\u0000\u0000\u02eb\u02e9\u0001\u0000\u0000\u0000\u02ec\u02ee\u0007\u0003"+
|
||||
"\u0000\u0000\u02ed\u02e9\u0001\u0000\u0000\u0000\u02ed\u02ee\u0001\u0000"+
|
||||
"\u0000\u0000\u02ee\u02f0\u0001\u0000\u0000\u0000\u02ef\u02f1\u0007\u0001"+
|
||||
"\u0000\u0000\u02f0\u02ef\u0001\u0000\u0000\u0000\u02f0\u02f1\u0001\u0000"+
|
||||
"\u0000\u0000\u02f1\u0088\u0001\u0000\u0000\u0000\u02f2\u02f6\u00050\u0000"+
|
||||
"\u0000\u02f3\u02f5\u0005_\u0000\u0000\u02f4\u02f3\u0001\u0000\u0000\u0000"+
|
||||
"\u02f5\u02f8\u0001\u0000\u0000\u0000\u02f6\u02f4\u0001\u0000\u0000\u0000"+
|
||||
"\u02f6\u02f7\u0001\u0000\u0000\u0000\u02f7\u02f9\u0001\u0000\u0000\u0000"+
|
||||
"\u02f8\u02f6\u0001\u0000\u0000\u0000\u02f9\u0301\u0007\u0005\u0000\u0000"+
|
||||
"\u02fa\u02fc\u0007\u0006\u0000\u0000\u02fb\u02fa\u0001\u0000\u0000\u0000"+
|
||||
"\u02fc\u02ff\u0001\u0000\u0000\u0000\u02fd\u02fb\u0001\u0000\u0000\u0000"+
|
||||
"\u02fd\u02fe\u0001\u0000\u0000\u0000\u02fe\u0300\u0001\u0000\u0000\u0000"+
|
||||
"\u02ff\u02fd\u0001\u0000\u0000\u0000\u0300\u0302\u0007\u0005\u0000\u0000"+
|
||||
"\u0301\u02fd\u0001\u0000\u0000\u0000\u0301\u0302\u0001\u0000\u0000\u0000"+
|
||||
"\u0302\u0304\u0001\u0000\u0000\u0000\u0303\u0305\u0007\u0001\u0000\u0000"+
|
||||
"\u0304\u0303\u0001\u0000\u0000\u0000\u0304\u0305\u0001\u0000\u0000\u0000"+
|
||||
"\u0305\u008a\u0001\u0000\u0000\u0000\u0306\u0307\u00050\u0000\u0000\u0307"+
|
||||
"\u0308\u0007\u0007\u0000\u0000\u0308\u0310\u0007\b\u0000\u0000\u0309\u030b"+
|
||||
"\u0007\t\u0000\u0000\u030a\u0309\u0001\u0000\u0000\u0000\u030b\u030e\u0001"+
|
||||
"\u0000\u0000\u0000\u030c\u030a\u0001\u0000\u0000\u0000\u030c\u030d\u0001"+
|
||||
"\u0000\u0000\u0000\u030d\u030f\u0001\u0000\u0000\u0000\u030e\u030c\u0001"+
|
||||
"\u0000\u0000\u0000\u030f\u0311\u0007\b\u0000\u0000\u0310\u030c\u0001\u0000"+
|
||||
"\u0000\u0000\u0310\u0311\u0001\u0000\u0000\u0000\u0311\u0313\u0001\u0000"+
|
||||
"\u0000\u0000\u0312\u0314\u0007\u0001\u0000\u0000\u0313\u0312\u0001\u0000"+
|
||||
"\u0000\u0000\u0313\u0314\u0001\u0000\u0000\u0000\u0314\u008c\u0001\u0000"+
|
||||
"\u0000\u0000\u0315\u0316\u0003\u0109\u0084\u0000\u0316\u0318\u0005.\u0000"+
|
||||
"\u0000\u0317\u0319\u0003\u0109\u0084\u0000\u0318\u0317\u0001\u0000\u0000"+
|
||||
"\u0000\u0318\u0319\u0001\u0000\u0000\u0000\u0319\u031d\u0001\u0000\u0000"+
|
||||
"\u0000\u031a\u031b\u0005.\u0000\u0000\u031b\u031d\u0003\u0109\u0084\u0000"+
|
||||
"\u031c\u0315\u0001\u0000\u0000\u0000\u031c\u031a\u0001\u0000\u0000\u0000"+
|
||||
"\u031d\u031f\u0001\u0000\u0000\u0000\u031e\u0320\u0003\u0101\u0080\u0000"+
|
||||
"\u031f\u031e\u0001\u0000\u0000\u0000\u031f\u0320\u0001\u0000\u0000\u0000"+
|
||||
"\u0320\u0322\u0001\u0000\u0000\u0000\u0321\u0323\u0007\n\u0000\u0000\u0322"+
|
||||
"\u0321\u0001\u0000\u0000\u0000\u0322\u0323\u0001\u0000\u0000\u0000\u0323"+
|
||||
"\u032d\u0001\u0000\u0000\u0000\u0324\u032a\u0003\u0109\u0084\u0000\u0325"+
|
||||
"\u0327\u0003\u0101\u0080\u0000\u0326\u0328\u0007\n\u0000\u0000\u0327\u0326"+
|
||||
"\u0001\u0000\u0000\u0000\u0327\u0328\u0001\u0000\u0000\u0000\u0328\u032b"+
|
||||
"\u0001\u0000\u0000\u0000\u0329\u032b\u0007\n\u0000\u0000\u032a\u0325\u0001"+
|
||||
"\u0000\u0000\u0000\u032a\u0329\u0001\u0000\u0000\u0000\u032b\u032d\u0001"+
|
||||
"\u0000\u0000\u0000\u032c\u031c\u0001\u0000\u0000\u0000\u032c\u0324\u0001"+
|
||||
"\u0000\u0000\u0000\u032d\u008e\u0001\u0000\u0000\u0000\u032e\u032f\u0005"+
|
||||
"0\u0000\u0000\u032f\u0339\u0007\u0002\u0000\u0000\u0330\u0332\u0003\u0105"+
|
||||
"\u0082\u0000\u0331\u0333\u0005.\u0000\u0000\u0332\u0331\u0001\u0000\u0000"+
|
||||
"\u0000\u0332\u0333\u0001\u0000\u0000\u0000\u0333\u033a\u0001\u0000\u0000"+
|
||||
"\u0000\u0334\u0336\u0003\u0105\u0082\u0000\u0335\u0334\u0001\u0000\u0000"+
|
||||
"\u0000\u0335\u0336\u0001\u0000\u0000\u0000\u0336\u0337\u0001\u0000\u0000"+
|
||||
"\u0000\u0337\u0338\u0005.\u0000\u0000\u0338\u033a\u0003\u0105\u0082\u0000"+
|
||||
"\u0339\u0330\u0001\u0000\u0000\u0000\u0339\u0335\u0001\u0000\u0000\u0000"+
|
||||
"\u033a\u033b\u0001\u0000\u0000\u0000\u033b\u033d\u0007\u000b\u0000\u0000"+
|
||||
"\u033c\u033e\u0007\f\u0000\u0000\u033d\u033c\u0001\u0000\u0000\u0000\u033d"+
|
||||
"\u033e\u0001\u0000\u0000\u0000\u033e\u033f\u0001\u0000\u0000\u0000\u033f"+
|
||||
"\u0341\u0003\u0109\u0084\u0000\u0340\u0342\u0007\n\u0000\u0000\u0341\u0340"+
|
||||
"\u0001\u0000\u0000\u0000\u0341\u0342\u0001\u0000\u0000\u0000\u0342\u0090"+
|
||||
"\u0001\u0000\u0000\u0000\u0343\u0344\u0005t\u0000\u0000\u0344\u0345\u0005"+
|
||||
"r\u0000\u0000\u0345\u0346\u0005u\u0000\u0000\u0346\u034d\u0005e\u0000"+
|
||||
"\u0000\u0347\u0348\u0005f\u0000\u0000\u0348\u0349\u0005a\u0000\u0000\u0349"+
|
||||
"\u034a\u0005l\u0000\u0000\u034a\u034b\u0005s\u0000\u0000\u034b\u034d\u0005"+
|
||||
"e\u0000\u0000\u034c\u0343\u0001\u0000\u0000\u0000\u034c\u0347\u0001\u0000"+
|
||||
"\u0000\u0000\u034d\u0092\u0001\u0000\u0000\u0000\u034e\u0351\u0005\'\u0000"+
|
||||
"\u0000\u034f\u0352\b\r\u0000\u0000\u0350\u0352\u0003\u0103\u0081\u0000"+
|
||||
"\u0351\u034f\u0001\u0000\u0000\u0000\u0351\u0350\u0001\u0000\u0000\u0000"+
|
||||
"\u0352\u0353\u0001\u0000\u0000\u0000\u0353\u0354\u0005\'\u0000\u0000\u0354"+
|
||||
"\u0094\u0001\u0000\u0000\u0000\u0355\u035a\u0005\"\u0000\u0000\u0356\u0359"+
|
||||
"\b\u000e\u0000\u0000\u0357\u0359\u0003\u0103\u0081\u0000\u0358\u0356\u0001"+
|
||||
"\u0000\u0000\u0000\u0358\u0357\u0001\u0000\u0000\u0000\u0359\u035c\u0001"+
|
||||
"\u0000\u0000\u0000\u035a\u0358\u0001\u0000\u0000\u0000\u035a\u035b\u0001"+
|
||||
"\u0000\u0000\u0000\u035b\u035d\u0001\u0000\u0000\u0000\u035c\u035a\u0001"+
|
||||
"\u0000\u0000\u0000\u035d\u035e\u0005\"\u0000\u0000\u035e\u0096\u0001\u0000"+
|
||||
"\u0000\u0000\u035f\u0360\u0005\"\u0000\u0000\u0360\u0361\u0005\"\u0000"+
|
||||
"\u0000\u0361\u0362\u0005\"\u0000\u0000\u0362\u0366\u0001\u0000\u0000\u0000"+
|
||||
"\u0363\u0365\u0007\u000f\u0000\u0000\u0364\u0363\u0001\u0000\u0000\u0000"+
|
||||
"\u0365\u0368\u0001\u0000\u0000\u0000\u0366\u0364\u0001\u0000\u0000\u0000"+
|
||||
"\u0366\u0367\u0001\u0000\u0000\u0000\u0367\u0369\u0001\u0000\u0000\u0000"+
|
||||
"\u0368\u0366\u0001\u0000\u0000\u0000\u0369\u036e\u0007\u0010\u0000\u0000"+
|
||||
"\u036a\u036d\t\u0000\u0000\u0000\u036b\u036d\u0003\u0103\u0081\u0000\u036c"+
|
||||
"\u036a\u0001\u0000\u0000\u0000\u036c\u036b\u0001\u0000\u0000\u0000\u036d"+
|
||||
"\u0370\u0001\u0000\u0000\u0000\u036e\u036f\u0001\u0000\u0000\u0000\u036e"+
|
||||
"\u036c\u0001\u0000\u0000\u0000\u036f\u0371\u0001\u0000\u0000\u0000\u0370"+
|
||||
"\u036e\u0001\u0000\u0000\u0000\u0371\u0372\u0005\"\u0000\u0000\u0372\u0373"+
|
||||
"\u0005\"\u0000\u0000\u0373\u0374\u0005\"\u0000\u0000\u0374\u0098\u0001"+
|
||||
"\u0000\u0000\u0000\u0375\u0376\u0005n\u0000\u0000\u0376\u0377\u0005u\u0000"+
|
||||
"\u0000\u0377\u0378\u0005l\u0000\u0000\u0378\u0379\u0005l\u0000\u0000\u0379"+
|
||||
"\u009a\u0001\u0000\u0000\u0000\u037a\u037b\u0005(\u0000\u0000\u037b\u009c"+
|
||||
"\u0001\u0000\u0000\u0000\u037c\u037d\u0005)\u0000\u0000\u037d\u009e\u0001"+
|
||||
"\u0000\u0000\u0000\u037e\u037f\u0005{\u0000\u0000\u037f\u00a0\u0001\u0000"+
|
||||
"\u0000\u0000\u0380\u0381\u0005}\u0000\u0000\u0381\u00a2\u0001\u0000\u0000"+
|
||||
"\u0000\u0382\u0383\u0005[\u0000\u0000\u0383\u00a4\u0001\u0000\u0000\u0000"+
|
||||
"\u0384\u0385\u0005]\u0000\u0000\u0385\u00a6\u0001\u0000\u0000\u0000\u0386"+
|
||||
"\u0387\u0005;\u0000\u0000\u0387\u00a8\u0001\u0000\u0000\u0000\u0388\u0389"+
|
||||
"\u0005,\u0000\u0000\u0389\u00aa\u0001\u0000\u0000\u0000\u038a\u038b\u0005"+
|
||||
".\u0000\u0000\u038b\u00ac\u0001\u0000\u0000\u0000\u038c\u038d\u0005=\u0000"+
|
||||
"\u0000\u038d\u00ae\u0001\u0000\u0000\u0000\u038e\u038f\u0005>\u0000\u0000"+
|
||||
"\u038f\u00b0\u0001\u0000\u0000\u0000\u0390\u0391\u0005<\u0000\u0000\u0391"+
|
||||
"\u00b2\u0001\u0000\u0000\u0000\u0392\u0393\u0005!\u0000\u0000\u0393\u00b4"+
|
||||
"\u0001\u0000\u0000\u0000\u0394\u0395\u0005~\u0000\u0000\u0395\u00b6\u0001"+
|
||||
"\u0000\u0000\u0000\u0396\u0397\u0005?\u0000\u0000\u0397\u00b8\u0001\u0000"+
|
||||
"\u0000\u0000\u0398\u0399\u0005:\u0000\u0000\u0399\u00ba\u0001\u0000\u0000"+
|
||||
"\u0000\u039a\u039b\u0005=\u0000\u0000\u039b\u039c\u0005=\u0000\u0000\u039c"+
|
||||
"\u00bc\u0001\u0000\u0000\u0000\u039d\u039e\u0005<\u0000\u0000\u039e\u039f"+
|
||||
"\u0005=\u0000\u0000\u039f\u00be\u0001\u0000\u0000\u0000\u03a0\u03a1\u0005"+
|
||||
">\u0000\u0000\u03a1\u03a2\u0005=\u0000\u0000\u03a2\u00c0\u0001\u0000\u0000"+
|
||||
"\u0000\u03a3\u03a4\u0005!\u0000\u0000\u03a4\u03a5\u0005=\u0000\u0000\u03a5"+
|
||||
"\u00c2\u0001\u0000\u0000\u0000\u03a6\u03a7\u0005&\u0000\u0000\u03a7\u03a8"+
|
||||
"\u0005&\u0000\u0000\u03a8\u00c4\u0001\u0000\u0000\u0000\u03a9\u03aa\u0005"+
|
||||
"|\u0000\u0000\u03aa\u03ab\u0005|\u0000\u0000\u03ab\u00c6\u0001\u0000\u0000"+
|
||||
"\u0000\u03ac\u03ad\u0005+\u0000\u0000\u03ad\u03ae\u0005+\u0000\u0000\u03ae"+
|
||||
"\u00c8\u0001\u0000\u0000\u0000\u03af\u03b0\u0005-\u0000\u0000\u03b0\u03b1"+
|
||||
"\u0005-\u0000\u0000\u03b1\u00ca\u0001\u0000\u0000\u0000\u03b2\u03b3\u0005"+
|
||||
"+\u0000\u0000\u03b3\u00cc\u0001\u0000\u0000\u0000\u03b4\u03b5\u0005-\u0000"+
|
||||
"\u0000\u03b5\u00ce\u0001\u0000\u0000\u0000\u03b6\u03b7\u0005*\u0000\u0000"+
|
||||
"\u03b7\u00d0\u0001\u0000\u0000\u0000\u03b8\u03b9\u0005/\u0000\u0000\u03b9"+
|
||||
"\u00d2\u0001\u0000\u0000\u0000\u03ba\u03bb\u0005&\u0000\u0000\u03bb\u00d4"+
|
||||
"\u0001\u0000\u0000\u0000\u03bc\u03bd\u0005|\u0000\u0000\u03bd\u00d6\u0001"+
|
||||
"\u0000\u0000\u0000\u03be\u03bf\u0005^\u0000\u0000\u03bf\u00d8\u0001\u0000"+
|
||||
"\u0000\u0000\u03c0\u03c1\u0005%\u0000\u0000\u03c1\u00da\u0001\u0000\u0000"+
|
||||
"\u0000\u03c2\u03c3\u0005+\u0000\u0000\u03c3\u03c4\u0005=\u0000\u0000\u03c4"+
|
||||
"\u00dc\u0001\u0000\u0000\u0000\u03c5\u03c6\u0005-\u0000\u0000\u03c6\u03c7"+
|
||||
"\u0005=\u0000\u0000\u03c7\u00de\u0001\u0000\u0000\u0000\u03c8\u03c9\u0005"+
|
||||
"*\u0000\u0000\u03c9\u03ca\u0005=\u0000\u0000\u03ca\u00e0\u0001\u0000\u0000"+
|
||||
"\u0000\u03cb\u03cc\u0005/\u0000\u0000\u03cc\u03cd\u0005=\u0000\u0000\u03cd"+
|
||||
"\u00e2\u0001\u0000\u0000\u0000\u03ce\u03cf\u0005&\u0000\u0000\u03cf\u03d0"+
|
||||
"\u0005=\u0000\u0000\u03d0\u00e4\u0001\u0000\u0000\u0000\u03d1\u03d2\u0005"+
|
||||
"|\u0000\u0000\u03d2\u03d3\u0005=\u0000\u0000\u03d3\u00e6\u0001\u0000\u0000"+
|
||||
"\u0000\u03d4\u03d5\u0005^\u0000\u0000\u03d5\u03d6\u0005=\u0000\u0000\u03d6"+
|
||||
"\u00e8\u0001\u0000\u0000\u0000\u03d7\u03d8\u0005%\u0000\u0000\u03d8\u03d9"+
|
||||
"\u0005=\u0000\u0000\u03d9\u00ea\u0001\u0000\u0000\u0000\u03da\u03db\u0005"+
|
||||
"<\u0000\u0000\u03db\u03dc\u0005<\u0000\u0000\u03dc\u03dd\u0005=\u0000"+
|
||||
"\u0000\u03dd\u00ec\u0001\u0000\u0000\u0000\u03de\u03df\u0005>\u0000\u0000"+
|
||||
"\u03df\u03e0\u0005>\u0000\u0000\u03e0\u03e1\u0005=\u0000\u0000\u03e1\u00ee"+
|
||||
"\u0001\u0000\u0000\u0000\u03e2\u03e3\u0005>\u0000\u0000\u03e3\u03e4\u0005"+
|
||||
">\u0000\u0000\u03e4\u03e5\u0005>\u0000\u0000\u03e5\u03e6\u0005=\u0000"+
|
||||
"\u0000\u03e6\u00f0\u0001\u0000\u0000\u0000\u03e7\u03e8\u0005-\u0000\u0000"+
|
||||
"\u03e8\u03e9\u0005>\u0000\u0000\u03e9\u00f2\u0001\u0000\u0000\u0000\u03ea"+
|
||||
"\u03eb\u0005:\u0000\u0000\u03eb\u03ec\u0005:\u0000\u0000\u03ec\u00f4\u0001"+
|
||||
"\u0000\u0000\u0000\u03ed\u03ee\u0005@\u0000\u0000\u03ee\u00f6\u0001\u0000"+
|
||||
"\u0000\u0000\u03ef\u03f0\u0005.\u0000\u0000\u03f0\u03f1\u0005.\u0000\u0000"+
|
||||
"\u03f1\u03f2\u0005.\u0000\u0000\u03f2\u00f8\u0001\u0000\u0000\u0000\u03f3"+
|
||||
"\u03f5\u0007\u0011\u0000\u0000\u03f4\u03f3\u0001\u0000\u0000\u0000\u03f5"+
|
||||
"\u03f6\u0001\u0000\u0000\u0000\u03f6\u03f4\u0001\u0000\u0000\u0000\u03f6"+
|
||||
"\u03f7\u0001\u0000\u0000\u0000\u03f7\u03f8\u0001\u0000\u0000\u0000\u03f8"+
|
||||
"\u03f9\u0006|\u0000\u0000\u03f9\u00fa\u0001\u0000\u0000\u0000\u03fa\u03fb"+
|
||||
"\u0005/\u0000\u0000\u03fb\u03fc\u0005*\u0000\u0000\u03fc\u0400\u0001\u0000"+
|
||||
"\u0000\u0000\u03fd\u03ff\t\u0000\u0000\u0000\u03fe\u03fd\u0001\u0000\u0000"+
|
||||
"\u0000\u03ff\u0402\u0001\u0000\u0000\u0000\u0400\u0401\u0001\u0000\u0000"+
|
||||
"\u0000\u0400\u03fe\u0001\u0000\u0000\u0000\u0401\u0403\u0001\u0000\u0000"+
|
||||
"\u0000\u0402\u0400\u0001\u0000\u0000\u0000\u0403\u0404\u0005*\u0000\u0000"+
|
||||
"\u0404\u0405\u0005/\u0000\u0000\u0405\u0406\u0001\u0000\u0000\u0000\u0406"+
|
||||
"\u0407\u0006}\u0000\u0000\u0407\u00fc\u0001\u0000\u0000\u0000\u0408\u0409"+
|
||||
"\u0005/\u0000\u0000\u0409\u040a\u0005/\u0000\u0000\u040a\u040e\u0001\u0000"+
|
||||
"\u0000\u0000\u040b\u040d\b\u0010\u0000\u0000\u040c\u040b\u0001\u0000\u0000"+
|
||||
"\u0000\u040d\u0410\u0001\u0000\u0000\u0000\u040e\u040c\u0001\u0000\u0000"+
|
||||
"\u0000\u040e\u040f\u0001\u0000\u0000\u0000\u040f\u0411\u0001\u0000\u0000"+
|
||||
"\u0000\u0410\u040e\u0001\u0000\u0000\u0000\u0411\u0412\u0006~\u0000\u0000"+
|
||||
"\u0412\u00fe\u0001\u0000\u0000\u0000\u0413\u0417\u0003\u010d\u0086\u0000"+
|
||||
"\u0414\u0416\u0003\u010b\u0085\u0000\u0415\u0414\u0001\u0000\u0000\u0000"+
|
||||
"\u0416\u0419\u0001\u0000\u0000\u0000\u0417\u0415\u0001\u0000\u0000\u0000"+
|
||||
"\u0417\u0418\u0001\u0000\u0000\u0000\u0418\u0100\u0001\u0000\u0000\u0000"+
|
||||
"\u0419\u0417\u0001\u0000\u0000\u0000\u041a\u041c\u0007\u0012\u0000\u0000"+
|
||||
"\u041b\u041d\u0007\f\u0000\u0000\u041c\u041b\u0001\u0000\u0000\u0000\u041c"+
|
||||
"\u041d\u0001\u0000\u0000\u0000\u041d\u041e\u0001\u0000\u0000\u0000\u041e"+
|
||||
"\u041f\u0003\u0109\u0084\u0000\u041f\u0102\u0001\u0000\u0000\u0000\u0420"+
|
||||
"\u0421\u0005\\\u0000\u0000\u0421\u0436\u0007\u0013\u0000\u0000\u0422\u0427"+
|
||||
"\u0005\\\u0000\u0000\u0423\u0425\u0007\u0014\u0000\u0000\u0424\u0423\u0001"+
|
||||
"\u0000\u0000\u0000\u0424\u0425\u0001\u0000\u0000\u0000\u0425\u0426\u0001"+
|
||||
"\u0000\u0000\u0000\u0426\u0428\u0007\u0005\u0000\u0000\u0427\u0424\u0001"+
|
||||
"\u0000\u0000\u0000\u0427\u0428\u0001\u0000\u0000\u0000\u0428\u0429\u0001"+
|
||||
"\u0000\u0000\u0000\u0429\u0436\u0007\u0005\u0000\u0000\u042a\u042c\u0005"+
|
||||
"\\\u0000\u0000\u042b\u042d\u0005u\u0000\u0000\u042c\u042b\u0001\u0000"+
|
||||
"\u0000\u0000\u042d\u042e\u0001\u0000\u0000\u0000\u042e\u042c\u0001\u0000"+
|
||||
"\u0000\u0000\u042e\u042f\u0001\u0000\u0000\u0000\u042f\u0430\u0001\u0000"+
|
||||
"\u0000\u0000\u0430\u0431\u0003\u0107\u0083\u0000\u0431\u0432\u0003\u0107"+
|
||||
"\u0083\u0000\u0432\u0433\u0003\u0107\u0083\u0000\u0433\u0434\u0003\u0107"+
|
||||
"\u0083\u0000\u0434\u0436\u0001\u0000\u0000\u0000\u0435\u0420\u0001\u0000"+
|
||||
"\u0000\u0000\u0435\u0422\u0001\u0000\u0000\u0000\u0435\u042a\u0001\u0000"+
|
||||
"\u0000\u0000\u0436\u0104\u0001\u0000\u0000\u0000\u0437\u0440\u0003\u0107"+
|
||||
"\u0083\u0000\u0438\u043b\u0003\u0107\u0083\u0000\u0439\u043b\u0005_\u0000"+
|
||||
"\u0000\u043a\u0438\u0001\u0000\u0000\u0000\u043a\u0439\u0001\u0000\u0000"+
|
||||
"\u0000\u043b\u043e\u0001\u0000\u0000\u0000\u043c\u043a\u0001\u0000\u0000"+
|
||||
"\u0000\u043c\u043d\u0001\u0000\u0000\u0000\u043d\u043f\u0001\u0000\u0000"+
|
||||
"\u0000\u043e\u043c\u0001\u0000\u0000\u0000\u043f\u0441\u0003\u0107\u0083"+
|
||||
"\u0000\u0440\u043c\u0001\u0000\u0000\u0000\u0440\u0441\u0001\u0000\u0000"+
|
||||
"\u0000\u0441\u0106\u0001\u0000\u0000\u0000\u0442\u0443\u0007\u0003\u0000"+
|
||||
"\u0000\u0443\u0108\u0001\u0000\u0000\u0000\u0444\u044c\u0007\u0015\u0000"+
|
||||
"\u0000\u0445\u0447\u0007\u0016\u0000\u0000\u0446\u0445\u0001\u0000\u0000"+
|
||||
"\u0000\u0447\u044a\u0001\u0000\u0000\u0000\u0448\u0446\u0001\u0000\u0000"+
|
||||
"\u0000\u0448\u0449\u0001\u0000\u0000\u0000\u0449\u044b\u0001\u0000\u0000"+
|
||||
"\u0000\u044a\u0448\u0001\u0000\u0000\u0000\u044b\u044d\u0007\u0015\u0000"+
|
||||
"\u0000\u044c\u0448\u0001\u0000\u0000\u0000\u044c\u044d\u0001\u0000\u0000"+
|
||||
"\u0000\u044d\u010a\u0001\u0000\u0000\u0000\u044e\u0451\u0003\u010d\u0086"+
|
||||
"\u0000\u044f\u0451\u0007\u0015\u0000\u0000\u0450\u044e\u0001\u0000\u0000"+
|
||||
"\u0000\u0450\u044f\u0001\u0000\u0000\u0000\u0451\u010c\u0001\u0000\u0000"+
|
||||
"\u0000\u0452\u0457\u0007\u0017\u0000\u0000\u0453\u0457\b\u0018\u0000\u0000"+
|
||||
"\u0454\u0455\u0007\u0019\u0000\u0000\u0455\u0457\u0007\u001a\u0000\u0000"+
|
||||
"\u0456\u0452\u0001\u0000\u0000\u0000\u0456\u0453\u0001\u0000\u0000\u0000"+
|
||||
"\u0456\u0454\u0001\u0000\u0000\u0000\u0457\u010e\u0001\u0000\u0000\u0000"+
|
||||
"3\u0000\u02d4\u02d9\u02dc\u02de\u02e1\u02e9\u02ed\u02f0\u02f6\u02fd\u0301"+
|
||||
"\u0304\u030c\u0310\u0313\u0318\u031c\u031f\u0322\u0327\u032a\u032c\u0332"+
|
||||
"\u0335\u0339\u033d\u0341\u034c\u0351\u0358\u035a\u0366\u036c\u036e\u03f6"+
|
||||
"\u0400\u040e\u0417\u041c\u0424\u0427\u042e\u0435\u043a\u043c\u0440\u0448"+
|
||||
"\u044c\u0450\u0456\u0001\u0000\u0001\u0000";
|
||||
public static final ATN _ATN =
|
||||
new ATNDeserializer().deserialize(_serializedATN.toCharArray());
|
||||
static {
|
||||
_decisionToDFA = new DFA[_ATN.getNumberOfDecisions()];
|
||||
for (int i = 0; i < _ATN.getNumberOfDecisions(); i++) {
|
||||
_decisionToDFA[i] = new DFA(_ATN.getDecisionState(i), i);
|
||||
}
|
||||
}
|
||||
}
|
@@ -1,242 +0,0 @@
|
||||
ABSTRACT=1
|
||||
ASSERT=2
|
||||
BOOLEAN=3
|
||||
BREAK=4
|
||||
BYTE=5
|
||||
CASE=6
|
||||
CATCH=7
|
||||
CHAR=8
|
||||
CLASS=9
|
||||
CONST=10
|
||||
CONTINUE=11
|
||||
DEFAULT=12
|
||||
DO=13
|
||||
DOUBLE=14
|
||||
ELSE=15
|
||||
ENUM=16
|
||||
EXTENDS=17
|
||||
FINAL=18
|
||||
FINALLY=19
|
||||
FLOAT=20
|
||||
FOR=21
|
||||
IF=22
|
||||
GOTO=23
|
||||
IMPLEMENTS=24
|
||||
IMPORT=25
|
||||
INSTANCEOF=26
|
||||
INT=27
|
||||
INTERFACE=28
|
||||
LONG=29
|
||||
NATIVE=30
|
||||
NEW=31
|
||||
PACKAGE=32
|
||||
PRIVATE=33
|
||||
PROTECTED=34
|
||||
PUBLIC=35
|
||||
RETURN=36
|
||||
SHORT=37
|
||||
STATIC=38
|
||||
STRICTFP=39
|
||||
SUPER=40
|
||||
SWITCH=41
|
||||
SYNCHRONIZED=42
|
||||
THIS=43
|
||||
THROW=44
|
||||
THROWS=45
|
||||
TRANSIENT=46
|
||||
TRY=47
|
||||
VOID=48
|
||||
VOLATILE=49
|
||||
WHILE=50
|
||||
MODULE=51
|
||||
OPEN=52
|
||||
REQUIRES=53
|
||||
EXPORTS=54
|
||||
OPENS=55
|
||||
TO=56
|
||||
USES=57
|
||||
PROVIDES=58
|
||||
WITH=59
|
||||
TRANSITIVE=60
|
||||
VAR=61
|
||||
YIELD=62
|
||||
RECORD=63
|
||||
SEALED=64
|
||||
PERMITS=65
|
||||
NON_SEALED=66
|
||||
DECIMAL_LITERAL=67
|
||||
HEX_LITERAL=68
|
||||
OCT_LITERAL=69
|
||||
BINARY_LITERAL=70
|
||||
FLOAT_LITERAL=71
|
||||
HEX_FLOAT_LITERAL=72
|
||||
BOOL_LITERAL=73
|
||||
CHAR_LITERAL=74
|
||||
STRING_LITERAL=75
|
||||
TEXT_BLOCK=76
|
||||
NULL_LITERAL=77
|
||||
LPAREN=78
|
||||
RPAREN=79
|
||||
LBRACE=80
|
||||
RBRACE=81
|
||||
LBRACK=82
|
||||
RBRACK=83
|
||||
SEMI=84
|
||||
COMMA=85
|
||||
DOT=86
|
||||
ASSIGN=87
|
||||
GT=88
|
||||
LT=89
|
||||
BANG=90
|
||||
TILDE=91
|
||||
QUESTION=92
|
||||
COLON=93
|
||||
EQUAL=94
|
||||
LE=95
|
||||
GE=96
|
||||
NOTEQUAL=97
|
||||
AND=98
|
||||
OR=99
|
||||
INC=100
|
||||
DEC=101
|
||||
ADD=102
|
||||
SUB=103
|
||||
MUL=104
|
||||
DIV=105
|
||||
BITAND=106
|
||||
BITOR=107
|
||||
CARET=108
|
||||
MOD=109
|
||||
ADD_ASSIGN=110
|
||||
SUB_ASSIGN=111
|
||||
MUL_ASSIGN=112
|
||||
DIV_ASSIGN=113
|
||||
AND_ASSIGN=114
|
||||
OR_ASSIGN=115
|
||||
XOR_ASSIGN=116
|
||||
MOD_ASSIGN=117
|
||||
LSHIFT_ASSIGN=118
|
||||
RSHIFT_ASSIGN=119
|
||||
URSHIFT_ASSIGN=120
|
||||
ARROW=121
|
||||
COLONCOLON=122
|
||||
AT=123
|
||||
ELLIPSIS=124
|
||||
WS=125
|
||||
COMMENT=126
|
||||
LINE_COMMENT=127
|
||||
IDENTIFIER=128
|
||||
'abstract'=1
|
||||
'assert'=2
|
||||
'boolean'=3
|
||||
'break'=4
|
||||
'byte'=5
|
||||
'case'=6
|
||||
'catch'=7
|
||||
'char'=8
|
||||
'class'=9
|
||||
'const'=10
|
||||
'continue'=11
|
||||
'default'=12
|
||||
'do'=13
|
||||
'double'=14
|
||||
'else'=15
|
||||
'enum'=16
|
||||
'extends'=17
|
||||
'final'=18
|
||||
'finally'=19
|
||||
'float'=20
|
||||
'for'=21
|
||||
'if'=22
|
||||
'goto'=23
|
||||
'implements'=24
|
||||
'import'=25
|
||||
'instanceof'=26
|
||||
'int'=27
|
||||
'interface'=28
|
||||
'long'=29
|
||||
'native'=30
|
||||
'new'=31
|
||||
'package'=32
|
||||
'private'=33
|
||||
'protected'=34
|
||||
'public'=35
|
||||
'return'=36
|
||||
'short'=37
|
||||
'static'=38
|
||||
'strictfp'=39
|
||||
'super'=40
|
||||
'switch'=41
|
||||
'synchronized'=42
|
||||
'this'=43
|
||||
'throw'=44
|
||||
'throws'=45
|
||||
'transient'=46
|
||||
'try'=47
|
||||
'void'=48
|
||||
'volatile'=49
|
||||
'while'=50
|
||||
'module'=51
|
||||
'open'=52
|
||||
'requires'=53
|
||||
'exports'=54
|
||||
'opens'=55
|
||||
'to'=56
|
||||
'uses'=57
|
||||
'provides'=58
|
||||
'with'=59
|
||||
'transitive'=60
|
||||
'var'=61
|
||||
'yield'=62
|
||||
'record'=63
|
||||
'sealed'=64
|
||||
'permits'=65
|
||||
'non-sealed'=66
|
||||
'null'=77
|
||||
'('=78
|
||||
')'=79
|
||||
'{'=80
|
||||
'}'=81
|
||||
'['=82
|
||||
']'=83
|
||||
';'=84
|
||||
','=85
|
||||
'.'=86
|
||||
'='=87
|
||||
'>'=88
|
||||
'<'=89
|
||||
'!'=90
|
||||
'~'=91
|
||||
'?'=92
|
||||
':'=93
|
||||
'=='=94
|
||||
'<='=95
|
||||
'>='=96
|
||||
'!='=97
|
||||
'&&'=98
|
||||
'||'=99
|
||||
'++'=100
|
||||
'--'=101
|
||||
'+'=102
|
||||
'-'=103
|
||||
'*'=104
|
||||
'/'=105
|
||||
'&'=106
|
||||
'|'=107
|
||||
'^'=108
|
||||
'%'=109
|
||||
'+='=110
|
||||
'-='=111
|
||||
'*='=112
|
||||
'/='=113
|
||||
'&='=114
|
||||
'|='=115
|
||||
'^='=116
|
||||
'%='=117
|
||||
'<<='=118
|
||||
'>>='=119
|
||||
'>>>='=120
|
||||
'->'=121
|
||||
'::'=122
|
||||
'@'=123
|
||||
'...'=124
|
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large
Load Diff
@@ -1,242 +0,0 @@
|
||||
ABSTRACT=1
|
||||
ASSERT=2
|
||||
BOOLEAN=3
|
||||
BREAK=4
|
||||
BYTE=5
|
||||
CASE=6
|
||||
CATCH=7
|
||||
CHAR=8
|
||||
CLASS=9
|
||||
CONST=10
|
||||
CONTINUE=11
|
||||
DEFAULT=12
|
||||
DO=13
|
||||
DOUBLE=14
|
||||
ELSE=15
|
||||
ENUM=16
|
||||
EXTENDS=17
|
||||
FINAL=18
|
||||
FINALLY=19
|
||||
FLOAT=20
|
||||
FOR=21
|
||||
IF=22
|
||||
GOTO=23
|
||||
IMPLEMENTS=24
|
||||
IMPORT=25
|
||||
INSTANCEOF=26
|
||||
INT=27
|
||||
INTERFACE=28
|
||||
LONG=29
|
||||
NATIVE=30
|
||||
NEW=31
|
||||
PACKAGE=32
|
||||
PRIVATE=33
|
||||
PROTECTED=34
|
||||
PUBLIC=35
|
||||
RETURN=36
|
||||
SHORT=37
|
||||
STATIC=38
|
||||
STRICTFP=39
|
||||
SUPER=40
|
||||
SWITCH=41
|
||||
SYNCHRONIZED=42
|
||||
THIS=43
|
||||
THROW=44
|
||||
THROWS=45
|
||||
TRANSIENT=46
|
||||
TRY=47
|
||||
VOID=48
|
||||
VOLATILE=49
|
||||
WHILE=50
|
||||
MODULE=51
|
||||
OPEN=52
|
||||
REQUIRES=53
|
||||
EXPORTS=54
|
||||
OPENS=55
|
||||
TO=56
|
||||
USES=57
|
||||
PROVIDES=58
|
||||
WITH=59
|
||||
TRANSITIVE=60
|
||||
VAR=61
|
||||
YIELD=62
|
||||
RECORD=63
|
||||
SEALED=64
|
||||
PERMITS=65
|
||||
NON_SEALED=66
|
||||
DECIMAL_LITERAL=67
|
||||
HEX_LITERAL=68
|
||||
OCT_LITERAL=69
|
||||
BINARY_LITERAL=70
|
||||
FLOAT_LITERAL=71
|
||||
HEX_FLOAT_LITERAL=72
|
||||
BOOL_LITERAL=73
|
||||
CHAR_LITERAL=74
|
||||
STRING_LITERAL=75
|
||||
TEXT_BLOCK=76
|
||||
NULL_LITERAL=77
|
||||
LPAREN=78
|
||||
RPAREN=79
|
||||
LBRACE=80
|
||||
RBRACE=81
|
||||
LBRACK=82
|
||||
RBRACK=83
|
||||
SEMI=84
|
||||
COMMA=85
|
||||
DOT=86
|
||||
ASSIGN=87
|
||||
GT=88
|
||||
LT=89
|
||||
BANG=90
|
||||
TILDE=91
|
||||
QUESTION=92
|
||||
COLON=93
|
||||
EQUAL=94
|
||||
LE=95
|
||||
GE=96
|
||||
NOTEQUAL=97
|
||||
AND=98
|
||||
OR=99
|
||||
INC=100
|
||||
DEC=101
|
||||
ADD=102
|
||||
SUB=103
|
||||
MUL=104
|
||||
DIV=105
|
||||
BITAND=106
|
||||
BITOR=107
|
||||
CARET=108
|
||||
MOD=109
|
||||
ADD_ASSIGN=110
|
||||
SUB_ASSIGN=111
|
||||
MUL_ASSIGN=112
|
||||
DIV_ASSIGN=113
|
||||
AND_ASSIGN=114
|
||||
OR_ASSIGN=115
|
||||
XOR_ASSIGN=116
|
||||
MOD_ASSIGN=117
|
||||
LSHIFT_ASSIGN=118
|
||||
RSHIFT_ASSIGN=119
|
||||
URSHIFT_ASSIGN=120
|
||||
ARROW=121
|
||||
COLONCOLON=122
|
||||
AT=123
|
||||
ELLIPSIS=124
|
||||
WS=125
|
||||
COMMENT=126
|
||||
LINE_COMMENT=127
|
||||
IDENTIFIER=128
|
||||
'abstract'=1
|
||||
'assert'=2
|
||||
'boolean'=3
|
||||
'break'=4
|
||||
'byte'=5
|
||||
'case'=6
|
||||
'catch'=7
|
||||
'char'=8
|
||||
'class'=9
|
||||
'const'=10
|
||||
'continue'=11
|
||||
'default'=12
|
||||
'do'=13
|
||||
'double'=14
|
||||
'else'=15
|
||||
'enum'=16
|
||||
'extends'=17
|
||||
'final'=18
|
||||
'finally'=19
|
||||
'float'=20
|
||||
'for'=21
|
||||
'if'=22
|
||||
'goto'=23
|
||||
'implements'=24
|
||||
'import'=25
|
||||
'instanceof'=26
|
||||
'int'=27
|
||||
'interface'=28
|
||||
'long'=29
|
||||
'native'=30
|
||||
'new'=31
|
||||
'package'=32
|
||||
'private'=33
|
||||
'protected'=34
|
||||
'public'=35
|
||||
'return'=36
|
||||
'short'=37
|
||||
'static'=38
|
||||
'strictfp'=39
|
||||
'super'=40
|
||||
'switch'=41
|
||||
'synchronized'=42
|
||||
'this'=43
|
||||
'throw'=44
|
||||
'throws'=45
|
||||
'transient'=46
|
||||
'try'=47
|
||||
'void'=48
|
||||
'volatile'=49
|
||||
'while'=50
|
||||
'module'=51
|
||||
'open'=52
|
||||
'requires'=53
|
||||
'exports'=54
|
||||
'opens'=55
|
||||
'to'=56
|
||||
'uses'=57
|
||||
'provides'=58
|
||||
'with'=59
|
||||
'transitive'=60
|
||||
'var'=61
|
||||
'yield'=62
|
||||
'record'=63
|
||||
'sealed'=64
|
||||
'permits'=65
|
||||
'non-sealed'=66
|
||||
'null'=77
|
||||
'('=78
|
||||
')'=79
|
||||
'{'=80
|
||||
'}'=81
|
||||
'['=82
|
||||
']'=83
|
||||
';'=84
|
||||
','=85
|
||||
'.'=86
|
||||
'='=87
|
||||
'>'=88
|
||||
'<'=89
|
||||
'!'=90
|
||||
'~'=91
|
||||
'?'=92
|
||||
':'=93
|
||||
'=='=94
|
||||
'<='=95
|
||||
'>='=96
|
||||
'!='=97
|
||||
'&&'=98
|
||||
'||'=99
|
||||
'++'=100
|
||||
'--'=101
|
||||
'+'=102
|
||||
'-'=103
|
||||
'*'=104
|
||||
'/'=105
|
||||
'&'=106
|
||||
'|'=107
|
||||
'^'=108
|
||||
'%'=109
|
||||
'+='=110
|
||||
'-='=111
|
||||
'*='=112
|
||||
'/='=113
|
||||
'&='=114
|
||||
'|='=115
|
||||
'^='=116
|
||||
'%='=117
|
||||
'<<='=118
|
||||
'>>='=119
|
||||
'>>>='=120
|
||||
'->'=121
|
||||
'::'=122
|
||||
'@'=123
|
||||
'...'=124
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -1,50 +1,77 @@
|
||||
package com.dhbw;
|
||||
package de.dhbw;
|
||||
|
||||
import org.apache.log4j.LogManager;
|
||||
import org.apache.log4j.Logger;
|
||||
import org.eclipse.lsp4j.*;
|
||||
import org.eclipse.lsp4j.services.LanguageClient;
|
||||
import org.eclipse.lsp4j.services.TextDocumentService;
|
||||
import org.eclipse.lsp4j.services.WorkspaceService;
|
||||
import org.eclipse.lsp4j.services.LanguageServer;
|
||||
|
||||
import java.net.URI;
|
||||
import java.util.List;
|
||||
import java.util.concurrent.CompletableFuture;
|
||||
|
||||
/**
|
||||
*
|
||||
* Configuration of the Language Server
|
||||
*
|
||||
* */
|
||||
public class JavaTXLanguageServer implements LanguageServer {
|
||||
private static final Logger logger = LogManager.getLogger(JavaTXLanguageServer.class);
|
||||
private LanguageClient client;
|
||||
|
||||
public void connect(LanguageClient client) {
|
||||
this.client = client;
|
||||
textDocumentService.setClient(client);
|
||||
|
||||
}
|
||||
|
||||
private final JavaTXTextDocumentService textDocumentService = new JavaTXTextDocumentService();
|
||||
private final JavaTXWorkspaceService workspaceService = new JavaTXWorkspaceService();
|
||||
|
||||
@Override
|
||||
public void setTrace(SetTraceParams params) {
|
||||
}
|
||||
/**
|
||||
* Configure the Features of the LanguageServer
|
||||
* */
|
||||
@Override
|
||||
public CompletableFuture<InitializeResult> initialize(InitializeParams params) {
|
||||
ServerCapabilities capabilities = new ServerCapabilities();
|
||||
capabilities.setDocumentFormattingProvider(true);
|
||||
capabilities.setTextDocumentSync(TextDocumentSyncKind.Full);
|
||||
capabilities.setHoverProvider(true);
|
||||
capabilities.setHoverProvider(false);
|
||||
capabilities.setInlayHintProvider(true);
|
||||
capabilities.setCodeActionProvider(true);
|
||||
capabilities.setTextDocumentSync(TextDocumentSyncKind.Full);
|
||||
capabilities.setCompletionProvider(new CompletionOptions(true, List.of()));
|
||||
capabilities.setWorkspaceSymbolProvider(false);
|
||||
|
||||
capabilities.setWorkspaceSymbolProvider(true);
|
||||
if(params.getWorkspaceFolders() != null && !params.getWorkspaceFolders().isEmpty()) {
|
||||
textDocumentService.setFileRoot(params.getWorkspaceFolders());
|
||||
}
|
||||
|
||||
return CompletableFuture.supplyAsync(() -> new InitializeResult(capabilities));
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the TextDocumentService
|
||||
* */
|
||||
@Override
|
||||
public TextDocumentService getTextDocumentService() {
|
||||
return textDocumentService;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the WorkspaceService
|
||||
* */
|
||||
@Override
|
||||
public WorkspaceService getWorkspaceService() {
|
||||
return workspaceService;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the Client
|
||||
* */
|
||||
public LanguageClient getClient() {
|
||||
return client;
|
||||
}
|
@@ -1,17 +1,24 @@
|
||||
package com.dhbw;
|
||||
|
||||
package de.dhbw;
|
||||
|
||||
import org.apache.log4j.LogManager;
|
||||
import org.apache.log4j.Logger;
|
||||
import org.eclipse.lsp4j.launch.LSPLauncher;
|
||||
import org.eclipse.lsp4j.services.LanguageClient;
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
* Start the JavaTX language Server and use System In and System Out for Communication
|
||||
*
|
||||
* */
|
||||
public class JavaTXLanguageServerLauncher {
|
||||
|
||||
private static final Logger logger = LogManager.getLogger(JavaTXLanguageServerLauncher.class);
|
||||
|
||||
public static void main(String[] args) {
|
||||
try {
|
||||
JavaTXLanguageServer server = new JavaTXLanguageServer();
|
||||
|
||||
|
||||
var launcher = LSPLauncher.createServerLauncher(server, System.in, System.out);
|
||||
var launcher = LSPLauncher.createServerLauncher(server, System.in, System.out);
|
||||
LanguageClient client = launcher.getRemoteProxy();
|
||||
|
||||
server.connect(client);
|
@@ -0,0 +1,335 @@
|
||||
package de.dhbw;
|
||||
|
||||
import de.dhbw.handler.ChangeHandler;
|
||||
import de.dhbw.handler.CodeActionHandler;
|
||||
import de.dhbw.handler.FormattingHandler;
|
||||
import de.dhbw.service.CacheService;
|
||||
import de.dhbw.service.ClientService;
|
||||
import de.dhbw.service.LogService;
|
||||
import de.dhbw.handler.SaveHandler;
|
||||
import de.dhbw.helper.CodeSnippetOptions;
|
||||
import de.dhbw.helper.ConversionHelper;
|
||||
import de.dhbw.helper.TextHelper;
|
||||
import de.dhbw.helper.TypeResolver;
|
||||
import de.dhbw.model.SnippetWithName;
|
||||
import de.dhbw.service.ParserService;
|
||||
import org.apache.log4j.LogManager;
|
||||
import org.apache.log4j.Logger;
|
||||
import org.eclipse.lsp4j.*;
|
||||
import org.eclipse.lsp4j.jsonrpc.messages.Either;
|
||||
import org.eclipse.lsp4j.services.LanguageClient;
|
||||
import org.eclipse.lsp4j.services.TextDocumentService;
|
||||
|
||||
import java.net.URI;
|
||||
import java.nio.file.Path;
|
||||
import java.util.*;
|
||||
import java.util.concurrent.CompletableFuture;
|
||||
|
||||
/**
|
||||
* Handles Actions in Documents, such as Autocompletion, Change-Events and Syntax-Checks
|
||||
*/
|
||||
public class JavaTXTextDocumentService implements org.eclipse.lsp4j.services.TextDocumentService {
|
||||
|
||||
private final FormattingHandler formattingHandler;
|
||||
private final SaveHandler saveHandler;
|
||||
private final ParserService parserService;
|
||||
private final TypeResolver typeResolver;
|
||||
private final de.dhbw.service.TextDocumentService textDocumentService;
|
||||
private final LogService logService;
|
||||
private final ClientService clientService;
|
||||
private final CacheService cacheService;
|
||||
private final ConversionHelper conversionHelper;
|
||||
private final ChangeHandler changeHandler;
|
||||
private final TextHelper textHelper;
|
||||
private final CodeActionHandler codeActionHandler;
|
||||
|
||||
LanguageClient client;
|
||||
HashMap<String, String> textDocuments = new HashMap<>();
|
||||
CodeSnippetOptions codeSnippetOptions = new CodeSnippetOptions();
|
||||
Boolean dontShowHints = false;
|
||||
Path fileRoot = null;
|
||||
Boolean singleFileOpened = false;
|
||||
|
||||
public JavaTXTextDocumentService() {
|
||||
this.textHelper = new TextHelper();
|
||||
this.parserService = new ParserService();
|
||||
this.cacheService = new CacheService();
|
||||
this.clientService = new ClientService(null);
|
||||
this.typeResolver = new TypeResolver();
|
||||
this.textDocumentService = new de.dhbw.service.TextDocumentService();
|
||||
this.conversionHelper = new ConversionHelper(textHelper, textDocumentService);
|
||||
this.logService = new LogService(clientService);
|
||||
this.formattingHandler = new FormattingHandler(textDocumentService);
|
||||
this.codeActionHandler = new CodeActionHandler(textHelper, textDocumentService, cacheService, typeResolver, logService);
|
||||
this.saveHandler = new SaveHandler(typeResolver, textDocumentService, logService, cacheService, conversionHelper, clientService);
|
||||
this.changeHandler = new ChangeHandler(textDocumentService, parserService, conversionHelper, clientService, typeResolver, cacheService, logService);
|
||||
}
|
||||
|
||||
public void setClient(LanguageClient client) {
|
||||
this.client = client;
|
||||
clientService.setClient(client);
|
||||
}
|
||||
|
||||
public void setFileRoot(List<WorkspaceFolder> root) {
|
||||
|
||||
if (root == null) {
|
||||
singleFileOpened = true;
|
||||
}
|
||||
//TODO: Nicht nur das erste Element nehmen sondern alle beachten
|
||||
fileRoot = Path.of(URI.create(root.get(0).getUri()));
|
||||
}
|
||||
|
||||
/**
|
||||
* Handles Completion Events.
|
||||
* In this case you can select codeSnippets.
|
||||
*
|
||||
* @param params the completion Context
|
||||
* @return the Auto-Completion Items that will be displayed
|
||||
*/
|
||||
@Override
|
||||
public CompletableFuture<Either<List<CompletionItem>, CompletionList>> completion(CompletionParams params) {
|
||||
List<CompletionItem> completions = new ArrayList<>();
|
||||
|
||||
|
||||
for (SnippetWithName elem : codeSnippetOptions.getSnippets()) {
|
||||
CompletionItem item = new CompletionItem(elem.getName());
|
||||
item.setKind(CompletionItemKind.Snippet);
|
||||
item.setInsertText(elem.getSnippet());
|
||||
item.setInsertTextFormat(InsertTextFormat.Snippet);
|
||||
completions.add(item);
|
||||
}
|
||||
|
||||
|
||||
return CompletableFuture.completedFuture(Either.forLeft(completions));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Handles didOpen-Event.
|
||||
* Puts the Text-Document in the text-Document Hashmap
|
||||
*
|
||||
* @param params the Context of the newly opened Document
|
||||
*/
|
||||
@Override
|
||||
public void didOpen(DidOpenTextDocumentParams params) {
|
||||
textDocuments.put(params.getTextDocument().getUri(), params.getTextDocument().getText());
|
||||
textDocumentService.saveFileWithUri(params.getTextDocument().getUri(), params.getTextDocument().getText());
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Handles didChange-Event.
|
||||
* updates textDocument-State on Server and run Syntax-Check. If an Error is found it will get displayed as a Diagnostic.
|
||||
*
|
||||
* @param params the Context of the Changed Document, including the incremental change as well as the whole Document
|
||||
*/
|
||||
@Override
|
||||
public void didChange(DidChangeTextDocumentParams params) {
|
||||
logService.log("[didChange] Client triggered didChange Event.", MessageType.Info);
|
||||
changeHandler.didChange(params);
|
||||
}
|
||||
|
||||
/**
|
||||
* Handles a Formatting-Event
|
||||
*
|
||||
* @param params the Context of the Formatting
|
||||
*/
|
||||
@Override
|
||||
public CompletableFuture<List<? extends TextEdit>> formatting(DocumentFormattingParams params) {
|
||||
logService.log("[formatting] Client requested formatting.", MessageType.Info);
|
||||
return CompletableFuture.completedFuture(formattingHandler.handleFormat(params));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void didClose(DidCloseTextDocumentParams params) {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void didSave(DidSaveTextDocumentParams didSaveTextDocumentParams) {
|
||||
logService.log("[didSave] Client triggered didSave-Event.");
|
||||
clientService.startLoading("compile-task", "Inferring types...", client);
|
||||
saveHandler.handleSave(didSaveTextDocumentParams);
|
||||
clientService.stopLoading("compile-task", "Types successfully inferred", client);
|
||||
clientService.updateClient(client);
|
||||
}
|
||||
|
||||
@Override
|
||||
public CompletableFuture<List<InlayHint>> inlayHint(InlayHintParams params) {
|
||||
logService.log("[inlayHint] The Client requested Inlay-Hints.", MessageType.Info);
|
||||
return CompletableFuture.supplyAsync(() -> dontShowHints ? Collections.emptyList() : cacheService.getGlobalInlayHintMap().get(params.getTextDocument().getUri()) == null ? Collections.emptyList() : cacheService.getGlobalInlayHintMap().get(params.getTextDocument().getUri()));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void willSave(WillSaveTextDocumentParams params) {
|
||||
TextDocumentService.super.willSave(params);
|
||||
}
|
||||
|
||||
@Override
|
||||
public CompletableFuture<List<TextEdit>> willSaveWaitUntil(WillSaveTextDocumentParams params) {
|
||||
return CompletableFuture.completedFuture(Collections.emptyList());
|
||||
}
|
||||
|
||||
@Override
|
||||
public CompletableFuture<List<DocumentLink>> documentLink(DocumentLinkParams params) {
|
||||
return CompletableFuture.completedFuture(Collections.emptyList());
|
||||
}
|
||||
|
||||
@Override
|
||||
public CompletableFuture<DocumentLink> documentLinkResolve(DocumentLink params) {
|
||||
return CompletableFuture.completedFuture(new DocumentLink());
|
||||
}
|
||||
|
||||
@Override
|
||||
public CompletableFuture<List<ColorInformation>> documentColor(DocumentColorParams params) {
|
||||
return CompletableFuture.completedFuture(Collections.emptyList());
|
||||
}
|
||||
|
||||
@Override
|
||||
public CompletableFuture<List<ColorPresentation>> colorPresentation(ColorPresentationParams params) {
|
||||
return CompletableFuture.completedFuture(Collections.emptyList());
|
||||
}
|
||||
|
||||
@Override
|
||||
public CompletableFuture<List<FoldingRange>> foldingRange(FoldingRangeRequestParams params) {
|
||||
return CompletableFuture.completedFuture(Collections.emptyList());
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public CompletableFuture<List<CallHierarchyItem>> prepareCallHierarchy(CallHierarchyPrepareParams params) {
|
||||
return CompletableFuture.completedFuture(Collections.emptyList());
|
||||
}
|
||||
|
||||
@Override
|
||||
public CompletableFuture<List<CallHierarchyIncomingCall>> callHierarchyIncomingCalls(CallHierarchyIncomingCallsParams params) {
|
||||
return CompletableFuture.completedFuture(Collections.emptyList());
|
||||
}
|
||||
|
||||
@Override
|
||||
public CompletableFuture<List<CallHierarchyOutgoingCall>> callHierarchyOutgoingCalls(CallHierarchyOutgoingCallsParams params) {
|
||||
return CompletableFuture.completedFuture(Collections.emptyList());
|
||||
}
|
||||
|
||||
@Override
|
||||
public CompletableFuture<List<SelectionRange>> selectionRange(SelectionRangeParams params) {
|
||||
return CompletableFuture.completedFuture(Collections.emptyList());
|
||||
}
|
||||
|
||||
@Override
|
||||
public CompletableFuture<SemanticTokens> semanticTokensFull(SemanticTokensParams params) {
|
||||
return TextDocumentService.super.semanticTokensFull(params);
|
||||
}
|
||||
|
||||
@Override
|
||||
public CompletableFuture<Either<SemanticTokens, SemanticTokensDelta>> semanticTokensFullDelta(SemanticTokensDeltaParams params) {
|
||||
return CompletableFuture.completedFuture(Either.forLeft(new SemanticTokens()));
|
||||
}
|
||||
|
||||
@Override
|
||||
public CompletableFuture<SemanticTokens> semanticTokensRange(SemanticTokensRangeParams params) {
|
||||
return CompletableFuture.completedFuture(new SemanticTokens());
|
||||
}
|
||||
|
||||
@Override
|
||||
public CompletableFuture<List<Moniker>> moniker(MonikerParams params) {
|
||||
return CompletableFuture.completedFuture(Collections.emptyList());
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public CompletableFuture<CompletionItem> resolveCompletionItem(CompletionItem unresolved) {
|
||||
return CompletableFuture.completedFuture(new CompletionItem());
|
||||
}
|
||||
|
||||
@Override
|
||||
public CompletableFuture<Hover> hover(HoverParams params) {
|
||||
return CompletableFuture.completedFuture(new Hover());
|
||||
}
|
||||
|
||||
@Override
|
||||
public CompletableFuture<SignatureHelp> signatureHelp(SignatureHelpParams params) {
|
||||
return CompletableFuture.completedFuture(new SignatureHelp());
|
||||
}
|
||||
|
||||
@Override
|
||||
public CompletableFuture<Either<List<? extends Location>, List<? extends LocationLink>>> declaration(DeclarationParams params) {
|
||||
return CompletableFuture.completedFuture(Either.forLeft(Collections.emptyList()));
|
||||
}
|
||||
|
||||
@Override
|
||||
public CompletableFuture<Either<List<? extends Location>, List<? extends LocationLink>>> definition(DefinitionParams params) {
|
||||
return CompletableFuture.completedFuture(Either.forLeft(Collections.emptyList()));
|
||||
}
|
||||
|
||||
@Override
|
||||
public CompletableFuture<Either<List<? extends Location>, List<? extends LocationLink>>> typeDefinition(TypeDefinitionParams params) {
|
||||
return CompletableFuture.completedFuture(Either.forLeft(Collections.emptyList()));
|
||||
}
|
||||
|
||||
@Override
|
||||
public CompletableFuture<Either<List<? extends Location>, List<? extends LocationLink>>> implementation(ImplementationParams params) {
|
||||
return CompletableFuture.completedFuture(Either.forLeft(Collections.emptyList()));
|
||||
}
|
||||
|
||||
@Override
|
||||
public CompletableFuture<List<? extends Location>> references(ReferenceParams params) {
|
||||
return CompletableFuture.completedFuture(Collections.emptyList());
|
||||
}
|
||||
|
||||
@Override
|
||||
public CompletableFuture<List<? extends DocumentHighlight>> documentHighlight(DocumentHighlightParams params) {
|
||||
return CompletableFuture.completedFuture(Collections.emptyList());
|
||||
}
|
||||
|
||||
@Override
|
||||
public CompletableFuture<List<Either<SymbolInformation, DocumentSymbol>>> documentSymbol(DocumentSymbolParams params) {
|
||||
return CompletableFuture.completedFuture(Collections.emptyList());
|
||||
}
|
||||
|
||||
@Override
|
||||
public CompletableFuture<List<Either<Command, CodeAction>>> codeAction(CodeActionParams params) {
|
||||
|
||||
logService.log("[codeAction] Client requested Insert at Line [" + params.getRange().getStart().getLine() + "] and from Char [" + params.getRange().getStart().getCharacter() + "] to [" + params.getRange().getEnd().getCharacter() + "].", MessageType.Info);
|
||||
|
||||
logService.log("Code-Action Context was: " + params.getContext().getTriggerKind().name(), MessageType.Info);
|
||||
|
||||
return CompletableFuture.supplyAsync(() -> {
|
||||
return codeActionHandler.handleCodeAction(params);
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public CompletableFuture<CodeAction> resolveCodeAction(CodeAction unresolved) {
|
||||
return CompletableFuture.completedFuture(new CodeAction());
|
||||
}
|
||||
|
||||
@Override
|
||||
public CompletableFuture<List<? extends CodeLens>> codeLens(CodeLensParams params) {
|
||||
return CompletableFuture.completedFuture(Collections.emptyList());
|
||||
}
|
||||
|
||||
@Override
|
||||
public CompletableFuture<CodeLens> resolveCodeLens(CodeLens unresolved) {
|
||||
return CompletableFuture.completedFuture(new CodeLens());
|
||||
}
|
||||
|
||||
@Override
|
||||
public CompletableFuture<List<? extends TextEdit>> rangeFormatting(DocumentRangeFormattingParams params) {
|
||||
return CompletableFuture.completedFuture(Collections.emptyList());
|
||||
}
|
||||
|
||||
@Override
|
||||
public CompletableFuture<List<? extends TextEdit>> onTypeFormatting(DocumentOnTypeFormattingParams params) {
|
||||
return CompletableFuture.completedFuture(Collections.emptyList());
|
||||
}
|
||||
|
||||
@Override
|
||||
public CompletableFuture<WorkspaceEdit> rename(RenameParams params) {
|
||||
return CompletableFuture.completedFuture(new WorkspaceEdit());
|
||||
}
|
||||
|
||||
@Override
|
||||
public CompletableFuture<LinkedEditingRanges> linkedEditingRange(LinkedEditingRangeParams params) {
|
||||
return CompletableFuture.completedFuture(new LinkedEditingRanges());
|
||||
}
|
||||
}
|
@@ -0,0 +1,30 @@
|
||||
package de.dhbw;
|
||||
|
||||
import org.apache.log4j.LogManager;
|
||||
import org.apache.log4j.Logger;
|
||||
import org.eclipse.lsp4j.*;
|
||||
import org.eclipse.lsp4j.jsonrpc.messages.Either;
|
||||
import org.eclipse.lsp4j.services.WorkspaceService;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
import java.util.concurrent.CompletableFuture;
|
||||
|
||||
/**
|
||||
*
|
||||
* Handles Actions in Workspace
|
||||
*
|
||||
* */
|
||||
public class JavaTXWorkspaceService implements WorkspaceService {
|
||||
|
||||
private static final Logger logger = LogManager.getLogger(JavaTXWorkspaceService.class);
|
||||
@Override
|
||||
public void didChangeConfiguration(DidChangeConfigurationParams didChangeConfigurationParams) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void didChangeWatchedFiles(DidChangeWatchedFilesParams params) {
|
||||
|
||||
}
|
||||
}
|
123
LanguageServer/src/main/java/de/dhbw/handler/ChangeHandler.java
Normal file
123
LanguageServer/src/main/java/de/dhbw/handler/ChangeHandler.java
Normal file
@@ -0,0 +1,123 @@
|
||||
package de.dhbw.handler;
|
||||
|
||||
import com.google.common.base.Stopwatch;
|
||||
import de.dhbw.helper.ConversionHelper;
|
||||
import de.dhbw.helper.TypeResolver;
|
||||
import de.dhbw.model.DiagnosticsAndTypehints;
|
||||
import de.dhbw.model.DocumentChanges;
|
||||
import de.dhbw.model.LSPVariable;
|
||||
import de.dhbw.model.LineCharPosition;
|
||||
import de.dhbw.service.*;
|
||||
import org.eclipse.lsp4j.*;
|
||||
|
||||
import java.util.*;
|
||||
import java.util.concurrent.atomic.AtomicReference;
|
||||
|
||||
public class ChangeHandler {
|
||||
|
||||
private final TextDocumentService textDocumentService;
|
||||
private final ParserService parserService;
|
||||
private final ConversionHelper conversionHelper;
|
||||
private final ClientService clientService;
|
||||
private final TypeResolver typeResolver;
|
||||
private final CacheService cacheService;
|
||||
private final LogService logService;
|
||||
|
||||
public ChangeHandler(TextDocumentService textDocumentService, ParserService parserService, ConversionHelper conversionHelper, ClientService clientService, TypeResolver typeResolver, CacheService cacheService, LogService logService) {
|
||||
this.textDocumentService = textDocumentService;
|
||||
this.parserService = parserService;
|
||||
this.conversionHelper = conversionHelper;
|
||||
this.clientService = clientService;
|
||||
this.typeResolver = typeResolver;
|
||||
this.cacheService = cacheService;
|
||||
this.logService = logService;
|
||||
}
|
||||
|
||||
public void didChange(DidChangeTextDocumentParams params) {
|
||||
String currentText = textDocumentService.getFileOfUri(params.getTextDocument().getUri());
|
||||
|
||||
DocumentChanges documentChanges = textDocumentService.calculateDifference(currentText, params.getContentChanges().getFirst().getText());
|
||||
HashMap<LineCharPosition, String> preciseChanges = documentChanges.getPreciseChanges();
|
||||
ArrayList<Integer> offsetPerLine = documentChanges.getOffsetPerLine();
|
||||
HashMap<Integer, List<String>> textChanges = documentChanges.getTextChanges();
|
||||
|
||||
AtomicReference<String> summedUp = new AtomicReference<>("");
|
||||
params.getContentChanges().forEach(el -> summedUp.set(summedUp.get() + el.getText()));
|
||||
textDocumentService.saveFileWithUri(params.getTextDocument().getUri(), summedUp.get());
|
||||
|
||||
String input = summedUp.get();
|
||||
|
||||
checkParser(input, params.getTextDocument().getUri());
|
||||
|
||||
typeResolver.reduceCurrent(preciseChanges, cacheService.getVariables(), clientService.getClient());
|
||||
|
||||
var sWatch = Stopwatch.createUnstarted();
|
||||
sWatch.start();
|
||||
|
||||
try {
|
||||
|
||||
String currentInput = textDocumentService.getFileOfUri(params.getTextDocument().getUri());
|
||||
|
||||
if (currentInput == null) {
|
||||
logService.log("[didSave] Input of Text Document is null in TextDocument-Hashmap.", MessageType.Error);
|
||||
}
|
||||
|
||||
ArrayList<LSPVariable> typesOfMethodAndParameters = typeResolver.infereInput(currentInput, params.getTextDocument().getUri());
|
||||
|
||||
|
||||
DiagnosticsAndTypehints diagnosticsAndTypehints = conversionHelper.variablesToDiagnosticsAndTypehints(typesOfMethodAndParameters, params.getTextDocument().getUri());
|
||||
|
||||
List<InlayHint> typeHint = diagnosticsAndTypehints.getInlayHints();
|
||||
List<Diagnostic> diagnostics = diagnosticsAndTypehints.getDiagnostics();
|
||||
|
||||
|
||||
cacheService.updateGlobalMaps(diagnostics, typeHint, params.getTextDocument().getUri());
|
||||
|
||||
|
||||
} catch (Exception e) {
|
||||
logService.log("[didSave] Error trying to get Inlay-Hints and Diagnostics for Client: " + e.getMessage(), MessageType.Error);
|
||||
clientService.showMessage(MessageType.Error, e.getMessage());
|
||||
cacheService.updateGlobalMaps(new ArrayList<>(), new ArrayList<>(), params.getTextDocument().getUri());
|
||||
|
||||
} finally {
|
||||
sWatch.stop();
|
||||
logService.log("[didSave] Finished Calculating in [" + sWatch.elapsed().toSeconds() + "s]", MessageType.Info);
|
||||
}
|
||||
|
||||
|
||||
updatePositions(params, offsetPerLine);
|
||||
|
||||
|
||||
cacheService.getGlobalInlayHintMap().put(params.getTextDocument().getUri(), cacheService.getGlobalInlayHintMap().get(params.getTextDocument().getUri()).stream().filter(el -> {
|
||||
//TODO: Hier das Label aufspalten an | weil die Typehints immer mit und getrennt sind und so jeder Typhint für sich durchlaufen werden kann.
|
||||
logService.log(el.getLabel().getLeft().replaceAll(" ", "") + "<>" + String.join(",", textChanges.get(el.getPosition().getLine())) + ": " + (!textChanges.get(el.getPosition().getLine()).contains(el.getLabel().getLeft().replaceAll(" ", "")) ? "true" : "false"), MessageType.Info);
|
||||
return !textChanges.get(el.getPosition().getLine()).contains(el.getLabel().getLeft().replaceAll(" ", ""));
|
||||
}).toList());
|
||||
|
||||
cacheService.getGlobalDiagnosticsMap().put(params.getTextDocument().getUri(), cacheService.getGlobalDiagnosticsMap().get(params.getTextDocument().getUri()).stream().filter(el -> {
|
||||
logService.log(el.getMessage().replaceAll(" ", "") + "<>" + String.join(",", textChanges.get(el.getRange().getStart().getLine())) + ": " + (!textChanges.get(el.getRange().getStart().getLine()).contains(el.getMessage().replaceAll(" ", "")) ? "true" : "false"), MessageType.Info);
|
||||
return !textChanges.get(el.getRange().getStart().getLine()).contains(el.getMessage().replaceAll(" ", ""));
|
||||
}).toList());
|
||||
|
||||
clientService.publishDiagnostics(params.getTextDocument().getUri(), cacheService.getGlobalDiagnosticsMap().get(params.getTextDocument().getUri()));
|
||||
|
||||
}
|
||||
|
||||
private void checkParser(String input, String uri) {
|
||||
List<Diagnostic> diagnosticsList = conversionHelper.parseErrorToDiagnostic(parserService.getParserErrors(input));
|
||||
clientService.publishDiagnostics(uri, diagnosticsList);
|
||||
}
|
||||
|
||||
private void updatePositions(DidChangeTextDocumentParams params, ArrayList<Integer> offsetPerLine){
|
||||
for (var inlayHint : cacheService.getGlobalInlayHintMap().get(params.getTextDocument().getUri())) {
|
||||
inlayHint.getPosition().setCharacter(inlayHint.getPosition().getCharacter() + offsetPerLine.get(inlayHint.getPosition().getLine()));
|
||||
}
|
||||
|
||||
for (var diagnostic : cacheService.getGlobalDiagnosticsMap().get(params.getTextDocument().getUri())) {
|
||||
diagnostic.getRange().getStart().setCharacter(diagnostic.getRange().getStart().getCharacter() + offsetPerLine.get(diagnostic.getRange().getStart().getLine()));
|
||||
diagnostic.getRange().getEnd().setCharacter(diagnostic.getRange().getEnd().getCharacter() + offsetPerLine.get(diagnostic.getRange().getEnd().getLine()));
|
||||
}
|
||||
|
||||
clientService.updateClient();
|
||||
}
|
||||
}
|
@@ -0,0 +1,107 @@
|
||||
package de.dhbw.handler;
|
||||
|
||||
import de.dhbw.helper.TextHelper;
|
||||
import de.dhbw.helper.TypeResolver;
|
||||
import de.dhbw.service.CacheService;
|
||||
import de.dhbw.service.LogService;
|
||||
import de.dhbw.service.TextDocumentService;
|
||||
import org.eclipse.lsp4j.*;
|
||||
import org.eclipse.lsp4j.jsonrpc.messages.Either;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
public class CodeActionHandler {
|
||||
|
||||
private final TextHelper textHelper;
|
||||
private final TextDocumentService textDocumentService;
|
||||
private final CacheService cacheService;
|
||||
private final TypeResolver typeResolver;
|
||||
private final LogService logService;
|
||||
|
||||
public CodeActionHandler(TextHelper textHelper, TextDocumentService textDocumentService, CacheService cacheService, TypeResolver typeResolver, LogService logService) {
|
||||
this.textHelper = textHelper;
|
||||
this.textDocumentService = textDocumentService;
|
||||
this.cacheService = cacheService;
|
||||
this.typeResolver = typeResolver;
|
||||
this.logService = logService;
|
||||
}
|
||||
|
||||
public List<Either<Command, CodeAction>> handleCodeAction(CodeActionParams params) {
|
||||
|
||||
String documentUri = params.getTextDocument().getUri();
|
||||
|
||||
|
||||
List<Diagnostic> diagnosticInCurrentDocument = params.getContext().getDiagnostics();
|
||||
Range rangeOfInsert = params.getRange();
|
||||
|
||||
//All Diagnostics that are in range of the hover -> All Diagnostics of the selected Variable and thus all Types of the Variable
|
||||
List<Diagnostic> diagnosticsOverlappingHover = diagnosticInCurrentDocument.stream()
|
||||
.filter(diagnostic -> textDocumentService.rangesOverlap(diagnostic.getRange(), rangeOfInsert)).toList();
|
||||
|
||||
|
||||
List<Either<Command, CodeAction>> actions = new ArrayList<>();
|
||||
|
||||
for (Diagnostic typeDiagnostic : diagnosticsOverlappingHover) {
|
||||
try {
|
||||
String typeWithReplacedVariable = typeDiagnostic.getMessage() +
|
||||
" " +
|
||||
textHelper.getTextOfChars(
|
||||
textDocumentService.getFileOfUri(documentUri),
|
||||
rangeOfInsert.getStart().getLine(),
|
||||
rangeOfInsert.getStart().getCharacter(),
|
||||
rangeOfInsert.getEnd().getCharacter()
|
||||
);
|
||||
|
||||
ArrayList<TextEdit> listOfChanges = new ArrayList<>();
|
||||
|
||||
if (typeDiagnostic.getCode().getLeft().equals("GENERIC")) {
|
||||
for (var diagnostic : cacheService.getGlobalDiagnosticsMap().get(documentUri)) {
|
||||
|
||||
if (diagnostic.getMessage().contains(typeDiagnostic.getMessage()) || typeDiagnostic.getMessage().contains(diagnostic.getMessage())) {
|
||||
String genericType = diagnostic.getMessage() +
|
||||
" " +
|
||||
textHelper.getTextOfChars(
|
||||
textDocumentService.getFileOfUri(params.getTextDocument().getUri()),
|
||||
diagnostic.getRange().getStart().getLine(),
|
||||
diagnostic.getRange().getStart().getCharacter(),
|
||||
diagnostic.getRange().getEnd().getCharacter()
|
||||
);
|
||||
listOfChanges.add(new TextEdit(diagnostic.getRange(), genericType));
|
||||
}
|
||||
}
|
||||
} else {
|
||||
listOfChanges.add(new TextEdit(rangeOfInsert, typeWithReplacedVariable));
|
||||
}
|
||||
|
||||
var isTypeImported = false;
|
||||
|
||||
if (!typeDiagnostic.getCode().getLeft().equalsIgnoreCase("generic")) {
|
||||
isTypeImported = typeResolver.isTypeImported(textDocumentService.getFileOfUri(params.getTextDocument().getUri()), typeDiagnostic.getMessage());
|
||||
}
|
||||
if (!isTypeImported && !typeDiagnostic.getMessage().equals("void") && !typeDiagnostic.getCode().getLeft().equals("GENERIC")) {
|
||||
Range importRange = new Range(new Position(0, 0), new Position(0, 0));
|
||||
|
||||
var typeWithoutGenerics = typeDiagnostic.getMessage().contains("<") ? typeDiagnostic.getMessage().substring(0, typeDiagnostic.getMessage().indexOf('<')) : typeDiagnostic.getMessage();
|
||||
listOfChanges.add(new TextEdit(importRange, "import " + typeWithoutGenerics + ";\n"));
|
||||
}
|
||||
|
||||
Map<String, List<TextEdit>> changes = new HashMap<>();
|
||||
changes.put(documentUri, listOfChanges);
|
||||
|
||||
WorkspaceEdit edit = new WorkspaceEdit();
|
||||
edit.setChanges(changes);
|
||||
|
||||
CodeAction action = new CodeAction("Insert " + typeDiagnostic.getMessage());
|
||||
action.setKind(CodeActionKind.QuickFix);
|
||||
action.setEdit(edit);
|
||||
actions.add(Either.forRight(action));
|
||||
} catch (Exception e) {
|
||||
logService.log("Error creating Actions, returning empty List. The Error was: " + e.getMessage(), MessageType.Error);
|
||||
}
|
||||
}
|
||||
return actions;
|
||||
}
|
||||
}
|
@@ -0,0 +1,38 @@
|
||||
package de.dhbw.handler;
|
||||
|
||||
import de.dhbw.service.TextDocumentService;
|
||||
import org.eclipse.lsp4j.DocumentFormattingParams;
|
||||
import org.eclipse.lsp4j.Position;
|
||||
import org.eclipse.lsp4j.Range;
|
||||
import org.eclipse.lsp4j.TextEdit;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class FormattingHandler {
|
||||
|
||||
private final TextDocumentService textDocumentService;
|
||||
|
||||
public FormattingHandler(TextDocumentService textDocumentService) {
|
||||
this.textDocumentService = textDocumentService;
|
||||
}
|
||||
|
||||
public List<TextEdit> handleFormat(DocumentFormattingParams params){
|
||||
List<TextEdit> edits = new ArrayList<>();
|
||||
|
||||
|
||||
String[] lines = textDocumentService.getFileOfUri(params.getTextDocument().getUri()).split("\n");
|
||||
StringBuilder formattedText = new StringBuilder();
|
||||
|
||||
for (String line : lines) {
|
||||
formattedText.append(line.stripTrailing()).append("\n");
|
||||
}
|
||||
|
||||
TextEdit edit = new TextEdit();
|
||||
edit.setRange(new Range(new Position(0, 0), new Position(lines.length, 0)));
|
||||
edit.setNewText(formattedText.toString().trim());
|
||||
|
||||
edits.add(edit);
|
||||
return edits;
|
||||
}
|
||||
}
|
@@ -0,0 +1,55 @@
|
||||
package de.dhbw.handler;
|
||||
|
||||
import com.github.difflib.DiffUtils;
|
||||
import com.github.difflib.patch.AbstractDelta;
|
||||
import com.github.difflib.patch.DeltaType;
|
||||
import com.github.difflib.patch.Patch;
|
||||
|
||||
import org.eclipse.lsp4j.InlayHint;
|
||||
import org.eclipse.lsp4j.Position;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
public class InlayHintAdjusterDiffUtils {
|
||||
|
||||
public static List<InlayHint> adjustInlayHintsByLineDiff(String oldText, String newText, List<InlayHint> oldHints) {
|
||||
List<String> oldLines = Arrays.asList(oldText.split("\n", -1));
|
||||
List<String> newLines = Arrays.asList(newText.split("\n", -1));
|
||||
|
||||
Patch<String> patch = DiffUtils.diff(oldLines, newLines);
|
||||
List<AbstractDelta<String>> deltas = patch.getDeltas();
|
||||
|
||||
List<InlayHint> adjusted = new ArrayList<>();
|
||||
for (InlayHint hint : oldHints) {
|
||||
int oldLine = hint.getPosition().getLine();
|
||||
int lineShift = calculateLineShift(deltas, oldLine);
|
||||
int newLine = Math.max(0, oldLine + lineShift);
|
||||
|
||||
adjusted.add(new InlayHint(new Position(newLine, hint.getPosition().getCharacter()), hint.getLabel()));
|
||||
}
|
||||
|
||||
return adjusted;
|
||||
}
|
||||
|
||||
private static int calculateLineShift(List<AbstractDelta<String>> deltas, int oldLine) {
|
||||
int shift = 0;
|
||||
for (AbstractDelta<String> delta : deltas) {
|
||||
int deltaLine = delta.getSource().getPosition();
|
||||
int linesRemoved = delta.getSource().size();
|
||||
int linesAdded = delta.getTarget().size();
|
||||
|
||||
if (oldLine > deltaLine) {
|
||||
if (delta.getType() == DeltaType.INSERT) {
|
||||
shift += linesAdded;
|
||||
} else if (delta.getType() == DeltaType.DELETE) {
|
||||
shift -= linesRemoved;
|
||||
} else if (delta.getType() == DeltaType.CHANGE) {
|
||||
shift += linesAdded - linesRemoved;
|
||||
}
|
||||
}
|
||||
}
|
||||
return shift;
|
||||
}
|
||||
}
|
@@ -0,0 +1,71 @@
|
||||
package de.dhbw.handler;
|
||||
|
||||
import com.google.common.base.Stopwatch;
|
||||
import de.dhbw.model.DiagnosticsAndTypehints;
|
||||
import de.dhbw.service.CacheService;
|
||||
import de.dhbw.service.ClientService;
|
||||
import de.dhbw.service.LogService;
|
||||
import de.dhbw.service.TextDocumentService;
|
||||
import de.dhbw.helper.ConversionHelper;
|
||||
import de.dhbw.helper.TypeResolver;
|
||||
import de.dhbw.model.LSPVariable;
|
||||
import org.eclipse.lsp4j.*;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class SaveHandler {
|
||||
|
||||
private final TypeResolver typeResolver;
|
||||
private final TextDocumentService textDocumentService;
|
||||
private final LogService logService;
|
||||
private final CacheService cacheService;
|
||||
private final ConversionHelper conversionHelper;
|
||||
private final ClientService clientService;
|
||||
|
||||
public SaveHandler(TypeResolver typeResolver, TextDocumentService textDocumentService, LogService logService, CacheService cacheService, ConversionHelper conversionHelper, ClientService clientService) {
|
||||
this.typeResolver = typeResolver;
|
||||
this.textDocumentService = textDocumentService;
|
||||
this.logService = logService;
|
||||
this.cacheService = cacheService;
|
||||
this.conversionHelper = conversionHelper;
|
||||
this.clientService = clientService;
|
||||
}
|
||||
|
||||
public void handleSave(DidSaveTextDocumentParams didSaveTextDocumentParams) {
|
||||
|
||||
var sWatch = Stopwatch.createUnstarted();
|
||||
sWatch.start();
|
||||
|
||||
try {
|
||||
|
||||
String fileInput = textDocumentService.getFileOfUri(didSaveTextDocumentParams.getTextDocument().getUri());
|
||||
typeResolver.getCompilerInput(didSaveTextDocumentParams.getTextDocument().getUri(), fileInput);
|
||||
|
||||
if (fileInput == null) {
|
||||
logService.log("[didSave] Input of Text Document is null in TextDocument-Hashmap.", MessageType.Error);
|
||||
}
|
||||
|
||||
ArrayList<LSPVariable> variables = typeResolver.infereInput(fileInput, didSaveTextDocumentParams.getTextDocument().getUri());
|
||||
cacheService.setVariables(variables);
|
||||
|
||||
DiagnosticsAndTypehints diagnosticsAndTypehints = conversionHelper.variablesToDiagnosticsAndTypehints(variables, didSaveTextDocumentParams.getTextDocument().getUri());
|
||||
|
||||
List<InlayHint> typeHint = diagnosticsAndTypehints.getInlayHints();
|
||||
List<Diagnostic> diagnostics = diagnosticsAndTypehints.getDiagnostics();
|
||||
|
||||
cacheService.updateGlobalMaps(diagnostics, typeHint, didSaveTextDocumentParams.getTextDocument().getUri());
|
||||
clientService.publishDiagnostics(didSaveTextDocumentParams.getTextDocument().getUri(), diagnostics);
|
||||
|
||||
|
||||
} catch (Exception e) {
|
||||
logService.log("[didSave] Error trying to get Inlay-Hints and Diagnostics for Client: " + e.getMessage(), MessageType.Error);
|
||||
clientService.showMessage(MessageType.Error, e.getMessage());
|
||||
cacheService.updateGlobalMaps(new ArrayList<>(), new ArrayList<>(), didSaveTextDocumentParams.getTextDocument().getUri());
|
||||
|
||||
} finally {
|
||||
sWatch.stop();
|
||||
logService.log("[didSave] Finished Calculating in [" + sWatch.elapsed().toSeconds() + "s]", MessageType.Info);
|
||||
}
|
||||
}
|
||||
}
|
@@ -0,0 +1,130 @@
|
||||
package de.dhbw.helper;
|
||||
|
||||
import de.dhbw.model.*;
|
||||
import de.dhbwstuttgart.languageServerInterface.model.LanguageServerTransferObject;
|
||||
import de.dhbwstuttgart.syntaxtree.Method;
|
||||
import de.dhbwstuttgart.syntaxtree.Pattern;
|
||||
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
public class ASTTransformationHelper {
|
||||
|
||||
private final DuplicationUtils duplicationUtils;
|
||||
private final TypeUtils typeUtils;
|
||||
private final GenericUtils genericUtils;
|
||||
|
||||
public ASTTransformationHelper(DuplicationUtils duplicationUtils, TypeUtils typeUtils, GenericUtils genericUtils) {
|
||||
this.duplicationUtils = duplicationUtils;
|
||||
this.typeUtils = typeUtils;
|
||||
this.genericUtils = genericUtils;
|
||||
}
|
||||
|
||||
public List<LSPParameter> constructorToVariable(LanguageServerTransferObject transferObject) {
|
||||
|
||||
List<LSPParameter> methodsWithParametersLSPVariableList = new ArrayList<>();
|
||||
|
||||
for (var constructor : transferObject.getAst().KlassenVektor.getFirst().getConstructors()) {
|
||||
for (var constructorParam : constructor.getParameterList().getFormalparalist()) {
|
||||
var types = typeUtils.getAvailableTypes(transferObject.getResultSets(), constructorParam.getType());
|
||||
methodsWithParametersLSPVariableList.add(new LSPParameter("", types, constructorParam.getOffset().getLine(), constructorParam.getOffset().getCharPositionInLine(), constructorParam.getOffset().getStopIndex(), constructorParam.getType()));
|
||||
}
|
||||
}
|
||||
|
||||
return methodsWithParametersLSPVariableList;
|
||||
}
|
||||
|
||||
public List<LSPParameter> fieldDeclToVariable(LanguageServerTransferObject transferObject) {
|
||||
|
||||
List<LSPParameter> methodsWithParametersLSPVariableList = new ArrayList<>();
|
||||
|
||||
for (var fieldDecl : transferObject.getAst().KlassenVektor.getFirst().getFieldDecl()) {
|
||||
var types = typeUtils.getAvailableTypes(transferObject.getResultSets(), fieldDecl.getReturnType());
|
||||
methodsWithParametersLSPVariableList.add(new LSPParameter("", types, fieldDecl.getOffset().getLine(), fieldDecl.getOffset().getCharPositionInLine(), fieldDecl.getOffset().getStopIndex(), fieldDecl.getReturnType()));
|
||||
}
|
||||
|
||||
return methodsWithParametersLSPVariableList;
|
||||
}
|
||||
|
||||
public List<LSPClass> addGenericClassPosition(LanguageServerTransferObject transferObject, String input) {
|
||||
|
||||
List<LSPClass> methodsWithParametersLSPVariableList = new ArrayList<>();
|
||||
|
||||
for (var method : transferObject.getAst().getAllMethods()) {
|
||||
for (var clazz : transferObject.getAst().getClasses()) {
|
||||
ArrayList<Type> genericTypes = genericUtils.getClassGenerics(transferObject.getGeneratedGenerics(), method, clazz);
|
||||
TextHelper helper = new TextHelper();
|
||||
if (!genericTypes.isEmpty()) {
|
||||
methodsWithParametersLSPVariableList.add(new LSPClass("test", genericTypes, clazz.getOffset().getLine(), helper.getClassPositionForGeneric(clazz.getOffset().getLine() - 1, input, clazz.getOffset().getStopIndex()), clazz.getOffset().getStopIndex(), clazz.getReturnType()));
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
return methodsWithParametersLSPVariableList;
|
||||
}
|
||||
|
||||
|
||||
public List<LSPVariable> methodsWithParameterToVariable(LanguageServerTransferObject transferObj, boolean ENABLE_GENERICS) {
|
||||
List<LSPVariable> methodsWithParametersLSPVariableList = new ArrayList<>();
|
||||
|
||||
for (var method : transferObj.getAst().getAllMethods()) {
|
||||
methodsWithParametersLSPVariableList.addAll(methodToVariable(transferObj, method, ENABLE_GENERICS));
|
||||
|
||||
for (var param : method.getParameterList()) {
|
||||
methodsWithParametersLSPVariableList.addAll(parameterToVariable(transferObj, param, method, ENABLE_GENERICS));
|
||||
}
|
||||
}
|
||||
return methodsWithParametersLSPVariableList;
|
||||
}
|
||||
|
||||
private List<LSPMethod> methodToVariable(LanguageServerTransferObject transferObj, Method method, boolean ENABLE_GENERICS) {
|
||||
List<LSPMethod> methodsWithParametersLSPVariableList = new ArrayList<>();
|
||||
|
||||
var types = typeUtils.getAvailableTypes(transferObj.getResultSets(), method);
|
||||
if (!duplicationUtils.filterOutDuplicates(types).isEmpty()) {
|
||||
methodsWithParametersLSPVariableList.add(new LSPMethod(method.name, duplicationUtils.filterOutDuplicates(types), method.getOffset().getLine(), method.getOffset().getCharPositionInLine(), method.getOffset().getStopIndex(), method.getReturnType()));
|
||||
}
|
||||
|
||||
if (ENABLE_GENERICS) {
|
||||
var generics = genericUtils.getAvailableGenericTypes(transferObj.getGeneratedGenerics().values().stream().flatMap(List::stream).collect(Collectors.toList()), method);
|
||||
if (!generics.isEmpty()) {
|
||||
ArrayList<Type> typesThatAreGeneric = duplicationUtils.filterOutDuplicates(generics, types);
|
||||
typesThatAreGeneric.forEach(el -> el.setType("<" + el.getType() + "> " + el.getType()));
|
||||
//TODO: Muss Global und wird mehrmals so gemacht. Das if hier ist eigentlich falsch wegen unnötiger Berechnungszeit
|
||||
if (!duplicationUtils.filterOutDuplicates(typesThatAreGeneric).isEmpty()) {
|
||||
methodsWithParametersLSPVariableList.add(new LSPMethod(method.name, duplicationUtils.filterOutDuplicates(typesThatAreGeneric), method.getOffset().getLine(), method.getOffset().getCharPositionInLine(), method.getOffset().getStopIndex(), method.getReturnType()));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return methodsWithParametersLSPVariableList;
|
||||
}
|
||||
|
||||
private List<LSPParameter> parameterToVariable(LanguageServerTransferObject transferObj, Pattern param, Method method, boolean ENABLE_GENERICS) {
|
||||
List<LSPParameter> parameters = new ArrayList<>();
|
||||
|
||||
ArrayList<Type> typeParam = typeUtils.getAvailableTypes(transferObj.getResultSets(), param.getType());
|
||||
|
||||
if (!typeParam.isEmpty()) {
|
||||
parameters.add(new LSPParameter(method.name, duplicationUtils.filterOutDuplicates(typeParam), param.getOffset().getLine(), param.getOffset().getCharPositionInLine(), param.getOffset().getStopIndex(), param.getType()));
|
||||
}
|
||||
|
||||
if (ENABLE_GENERICS) {
|
||||
ArrayList<Type> genericParam = genericUtils.getAvailableGenericTypes(transferObj.getGeneratedGenerics().values().stream().flatMap(List::stream).collect(Collectors.toList()), param.getType());
|
||||
if (!genericParam.isEmpty()) {
|
||||
ArrayList<Type> typesThatAreGeneric = duplicationUtils.filterOutDuplicates(genericParam, typeParam);
|
||||
|
||||
if (!duplicationUtils.filterOutDuplicates(typesThatAreGeneric).isEmpty()) {
|
||||
parameters.add(new LSPParameter(method.name, duplicationUtils.filterOutDuplicates(typesThatAreGeneric), method.getOffset().getLine(), param.getOffset().getCharPositionInLine(), param.getOffset().getStopIndex(), param.getType()));
|
||||
parameters.add(new LSPParameter(method.name, new ArrayList<>(duplicationUtils.filterOutDuplicates(typesThatAreGeneric).stream().map(el -> new Type("<" + el.getType() + ">", true)).toList()), method.getOffset().getLine(), method.getOffset().getCharPositionInLine(), method.getOffset().getStopIndex(), method.getReturnType()));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return parameters;
|
||||
}
|
||||
|
||||
}
|
@@ -1,9 +1,13 @@
|
||||
package com.dhbw.helper;
|
||||
package de.dhbw.helper;
|
||||
|
||||
import com.dhbw.model.SnippetWithName;
|
||||
import de.dhbw.model.SnippetWithName;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
/**
|
||||
* Helper-Class containing all Snippets
|
||||
*
|
||||
* */
|
||||
public class CodeSnippetOptions {
|
||||
private ArrayList<SnippetWithName> snippets = new ArrayList<>();
|
||||
|
||||
@@ -14,15 +18,15 @@ public class CodeSnippetOptions {
|
||||
}
|
||||
|
||||
public SnippetWithName getMainSnippet(){
|
||||
return new SnippetWithName("main", "public main(args){\n System.out.println(\"Hello World\");\n}\n");
|
||||
return new SnippetWithName("main", "public main(args){\n ${1:}\n}\n");
|
||||
}
|
||||
|
||||
public SnippetWithName getForLoopSnippet(){
|
||||
return new SnippetWithName("forLoop", "for(i = 0; i < list.size(); i++){\n\n}");
|
||||
return new SnippetWithName("forLoop", "for(i = 0; i < ${1:listSize}; i++){\n\n}");
|
||||
}
|
||||
|
||||
public SnippetWithName getForEachSnippet(){
|
||||
return new SnippetWithName("forEachLoop", "for(el : list){\n\n}");
|
||||
return new SnippetWithName("forEachLoop", "for(el : ${1:listSize}){\n\n}");
|
||||
}
|
||||
|
||||
public ArrayList<SnippetWithName> getSnippets() {
|
@@ -0,0 +1,90 @@
|
||||
package de.dhbw.helper;
|
||||
|
||||
import de.dhbw.model.DiagnosticsAndTypehints;
|
||||
import de.dhbw.service.TextDocumentService;
|
||||
import de.dhbw.model.LSPVariable;
|
||||
import de.dhbw.model.Type;
|
||||
import de.dhbwstuttgart.languageServerInterface.model.ParserError;
|
||||
import jdk.jshell.Diag;
|
||||
import org.eclipse.lsp4j.*;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class ConversionHelper {
|
||||
|
||||
private final TextHelper textHelper;
|
||||
private final TextDocumentService textDocumentService;
|
||||
|
||||
public ConversionHelper(TextHelper textHelper, TextDocumentService textDocumentService) {
|
||||
this.textHelper = textHelper;
|
||||
this.textDocumentService = textDocumentService;
|
||||
}
|
||||
|
||||
public InlayHint getInlayHint(LSPVariable variable) {
|
||||
InlayHint inlayHint = new InlayHint();
|
||||
|
||||
String typeDisplay = "";
|
||||
for (Type type : variable.getPossibleTypes()) {
|
||||
typeDisplay += " | " + type.getType().replaceAll("GTV ", "");
|
||||
}
|
||||
|
||||
|
||||
inlayHint.setLabel(typeDisplay.length() > 2 ? typeDisplay.substring(2) : typeDisplay);
|
||||
inlayHint.setPosition(new Position(variable.getLine() - 1, variable.getCharPosition()));
|
||||
inlayHint.setKind(InlayHintKind.Parameter);
|
||||
inlayHint.setPaddingRight(true);
|
||||
inlayHint.setPaddingRight(true);
|
||||
return inlayHint;
|
||||
}
|
||||
|
||||
public Diagnostic getDiagnostic(LSPVariable variable, String fileUri, Type type) {
|
||||
Range errorRange = new Range(
|
||||
new Position(variable.getLine() - 1, variable.getCharPosition()), // Startposition
|
||||
new Position(variable.getLine() - 1, textHelper.getEndingCharOfStartingChar(variable.getLine() - 1, variable.getCharPosition(), textDocumentService.getFileOfUri(fileUri))) // Endposition
|
||||
);
|
||||
Diagnostic diagnostic = new Diagnostic(
|
||||
errorRange,
|
||||
//TODO: REMOVE! Temporary Fix because GTV, like TPH can be thrown away in the TypeResolver
|
||||
type.getType().replaceAll("GTV ", ""),
|
||||
DiagnosticSeverity.Hint,
|
||||
"JavaTX Language Server"
|
||||
);
|
||||
diagnostic.setCode(type.isGeneric() ? "GENERIC" : "TYPE");
|
||||
|
||||
return diagnostic;
|
||||
}
|
||||
|
||||
public List<Diagnostic> parseErrorToDiagnostic(List<ParserError> parserErrors){
|
||||
return parserErrors.stream().map(el -> {
|
||||
Range errorRange = new Range(
|
||||
new Position(el.getLine() - 1, el.getCharPositionInLine()), // Startposition
|
||||
new Position(el.getLine() - 1, el.getEndCharPosition()) // Endposition
|
||||
);
|
||||
return new Diagnostic(
|
||||
errorRange,
|
||||
el.getMsg(),
|
||||
DiagnosticSeverity.Error,
|
||||
"JavaTX Language Server"
|
||||
);
|
||||
}).toList();
|
||||
}
|
||||
|
||||
public DiagnosticsAndTypehints variablesToDiagnosticsAndTypehints(ArrayList<LSPVariable> typesOfMethodAndParameters, String uri){
|
||||
List<InlayHint> typeHint = new ArrayList<>();
|
||||
ArrayList<Diagnostic> diagnostics = new ArrayList<>();
|
||||
|
||||
for (var variable : typesOfMethodAndParameters) {
|
||||
|
||||
InlayHint inlayHint = getInlayHint(variable);
|
||||
typeHint.add(inlayHint);
|
||||
|
||||
for (var type : variable.getPossibleTypes()) {
|
||||
Diagnostic diagnostic = getDiagnostic(variable, uri, type);
|
||||
diagnostics.add(diagnostic);
|
||||
}
|
||||
}
|
||||
|
||||
return new DiagnosticsAndTypehints(diagnostics, typeHint);
|
||||
}
|
||||
}
|
@@ -0,0 +1,34 @@
|
||||
package de.dhbw.helper;
|
||||
|
||||
import de.dhbw.model.Type;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
|
||||
public class DuplicationUtils {
|
||||
public ArrayList<Type> filterOutDuplicates(List<Type> typeListOne, List<Type> typeListTwo) {
|
||||
|
||||
ArrayList<Type> filteredArrayList = new ArrayList<>();
|
||||
|
||||
typeListOne.forEach(el -> {
|
||||
boolean found = false;
|
||||
for (Type typeInListTwo : typeListTwo) {
|
||||
found = found || typeInListTwo.getType().equals(el.getType());
|
||||
}
|
||||
if (!found) {
|
||||
filteredArrayList.add(el);
|
||||
}
|
||||
});
|
||||
|
||||
return filteredArrayList;
|
||||
}
|
||||
|
||||
public ArrayList<Type> filterOutDuplicates(List<Type> typeListOne) {
|
||||
HashMap<String, Type> hashMap = new HashMap<>();
|
||||
typeListOne.forEach(el -> {
|
||||
hashMap.put(el.getType(), el);
|
||||
});
|
||||
return new ArrayList<>(hashMap.values());
|
||||
}
|
||||
}
|
@@ -0,0 +1,67 @@
|
||||
package de.dhbw.helper;
|
||||
|
||||
import de.dhbw.model.Type;
|
||||
import de.dhbwstuttgart.syntaxtree.ClassOrInterface;
|
||||
import de.dhbwstuttgart.syntaxtree.Method;
|
||||
import de.dhbwstuttgart.syntaxtree.SourceFile;
|
||||
import de.dhbwstuttgart.syntaxtree.type.RefTypeOrTPHOrWildcardOrGeneric;
|
||||
import de.dhbwstuttgart.target.generate.GenericsResult;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
public class GenericUtils {
|
||||
public ArrayList<Type> getClassGenerics(Map<SourceFile, List<GenericsResult>> genericsResult, Method method, ClassOrInterface clazz) {
|
||||
ArrayList<Type> genericTypes = new ArrayList<>();
|
||||
|
||||
genericsResult.forEach(((key, value) -> value.forEach(genericResultSet -> {
|
||||
|
||||
var result = genericResultSet.resolveTarget(method.getReturnType());
|
||||
|
||||
|
||||
var genericResult = genericResultSet.getBounds(method.getReturnType(), clazz, method);
|
||||
if (result != null && genericResult != null) {
|
||||
genericResult.forEach(res -> {
|
||||
if (res != null && !res.isOnMethod()) {
|
||||
genericTypes.add(new Type("<" + result.name() + (res.bound().toString().equals("java.lang.Object") ? ">" : " extends " + res.bound().toString() + ">"), true));
|
||||
|
||||
}
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
})));
|
||||
|
||||
return genericTypes;
|
||||
}
|
||||
|
||||
public ArrayList<Type> getAvailableGenericTypes(List<GenericsResult> genericsResult, RefTypeOrTPHOrWildcardOrGeneric parameter) {
|
||||
|
||||
|
||||
ArrayList<String> paramTypes = new ArrayList<>();
|
||||
genericsResult.forEach(conSet -> {
|
||||
if (parameter.toString().toLowerCase().contains("tph ")) {
|
||||
paramTypes.add(conSet.resolveTarget(parameter).name());
|
||||
}
|
||||
});
|
||||
|
||||
return new ArrayList<>(paramTypes.stream().filter(el -> !el.contains("TPH ")).map(el -> new Type(el, true)).toList());
|
||||
|
||||
}
|
||||
|
||||
public ArrayList<Type> getAvailableGenericTypes(List<GenericsResult> genericsResult, Method method) {
|
||||
|
||||
ArrayList<String> genericTypes = new ArrayList<>();
|
||||
|
||||
genericsResult.forEach(conSet -> {
|
||||
if (method.getReturnType().toString().toLowerCase().contains("tph ")) {
|
||||
genericTypes.add(conSet.resolveTarget(method.getReturnType()).name().replaceAll("GTV ", ""));
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
return new ArrayList<>(genericTypes.stream().filter(el -> !el.contains("TPH ")).map(el -> new Type(el, true)).toList());
|
||||
|
||||
}
|
||||
}
|
87
LanguageServer/src/main/java/de/dhbw/helper/TextHelper.java
Normal file
87
LanguageServer/src/main/java/de/dhbw/helper/TextHelper.java
Normal file
@@ -0,0 +1,87 @@
|
||||
package de.dhbw.helper;
|
||||
|
||||
import org.apache.log4j.Logger;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
public class TextHelper {
|
||||
|
||||
private static final Logger log = Logger.getLogger(TextHelper.class);
|
||||
|
||||
public Integer getClassPositionForGeneric(Integer line, String input, Integer startChar){
|
||||
log.info("Calculating Position of Class-Generic Variable at Line [" + line + "] and Char [" + startChar + "].");
|
||||
|
||||
String[] lines = input.split("\n");
|
||||
|
||||
if(lines.length < line){
|
||||
log.warn("Returning hardcoded Value because the requested Line [" + line + "] does not exist in Text Document.");
|
||||
return startChar+3;
|
||||
}
|
||||
|
||||
String[] linesInChar = lines[line].split("");
|
||||
|
||||
|
||||
var index = startChar;
|
||||
var found = false;
|
||||
|
||||
|
||||
for (int i = startChar; i < linesInChar.length; i++) {
|
||||
|
||||
|
||||
if(linesInChar[i].contains("{")){
|
||||
index = i;
|
||||
found = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if(!found){
|
||||
index = linesInChar.length-1;
|
||||
}
|
||||
|
||||
|
||||
for(int j = index; j <= linesInChar.length; j--){
|
||||
if(!linesInChar[j].isEmpty() && !linesInChar[j].equals(" ")){
|
||||
return j;
|
||||
}
|
||||
}
|
||||
|
||||
return index;
|
||||
}
|
||||
|
||||
public Integer getEndingCharOfStartingChar(Integer line, Integer startChar, String input){
|
||||
log.info("Calculating ending-Position for Variable at Line [" + line + "] and Char [" + startChar + "].");
|
||||
List<String> endingChars = List.of("(", ")", " ", "{", "}", ";", ",");
|
||||
|
||||
String[] lines = input.split("\n");
|
||||
|
||||
if(lines.length < line){
|
||||
log.warn("Returning hardcoded Value because the requested Line [" + line + "] does not exist in Text Document.");
|
||||
return startChar+3;
|
||||
}
|
||||
|
||||
String[] linesInChar = lines[line].split("");
|
||||
|
||||
|
||||
|
||||
var index = startChar;
|
||||
for (int i = startChar; i < linesInChar.length; i++) {
|
||||
index++;
|
||||
|
||||
if(endingChars.contains(linesInChar[i])){
|
||||
return i;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return index-1;
|
||||
}
|
||||
|
||||
public String getTextOfChars(String textDocument, Integer line, Integer charStart, Integer charEnd){
|
||||
String[] splittedText = textDocument.split("\n");
|
||||
return splittedText[line].substring(charStart, charEnd);
|
||||
}
|
||||
|
||||
}
|
122
LanguageServer/src/main/java/de/dhbw/helper/TypeResolver.java
Normal file
122
LanguageServer/src/main/java/de/dhbw/helper/TypeResolver.java
Normal file
@@ -0,0 +1,122 @@
|
||||
package de.dhbw.helper;
|
||||
|
||||
|
||||
import de.dhbw.model.*;
|
||||
import de.dhbwstuttgart.languageServerInterface.LanguageServerInterface;
|
||||
import de.dhbwstuttgart.languageServerInterface.model.LanguageServerTransferObject;
|
||||
import org.apache.log4j.LogManager;
|
||||
import org.apache.log4j.Logger;
|
||||
import org.eclipse.lsp4j.MessageParams;
|
||||
import org.eclipse.lsp4j.MessageType;
|
||||
import org.eclipse.lsp4j.services.LanguageClient;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.net.URISyntaxException;
|
||||
import java.util.*;
|
||||
|
||||
|
||||
/**
|
||||
* Helper-Class for finding the Type of a selected Word
|
||||
*/
|
||||
public class TypeResolver {
|
||||
private static final Logger logger = LogManager.getLogger(TypeResolver.class);
|
||||
|
||||
private final ASTTransformationHelper astTransformationHelper;
|
||||
private final TypeUtils typeUtils;
|
||||
private final GenericUtils genericUtils;
|
||||
private final DuplicationUtils duplicationUtils;
|
||||
private final boolean ENABLE_GENERICS = false;
|
||||
|
||||
private LanguageServerTransferObject current;
|
||||
|
||||
public TypeResolver() {
|
||||
this.typeUtils = new TypeUtils();
|
||||
this.genericUtils = new GenericUtils();
|
||||
this.duplicationUtils = new DuplicationUtils();
|
||||
this.astTransformationHelper = new ASTTransformationHelper(duplicationUtils, typeUtils, genericUtils);
|
||||
}
|
||||
|
||||
|
||||
public boolean isTypeImported(String input, String type) {
|
||||
// try {
|
||||
// var transferObject = getCacheOrCalculate(input);
|
||||
// var abstractSyntax = transferObject.getAst();
|
||||
//
|
||||
// var isAlreadyImported = false;
|
||||
// for (var importStatement : abstractSyntax.getImports()) {
|
||||
// isAlreadyImported = !isAlreadyImported && importStatement.toString().equals(type);
|
||||
// }
|
||||
//
|
||||
// return isAlreadyImported;
|
||||
//
|
||||
// } catch (Exception e) {
|
||||
// return true;
|
||||
// }
|
||||
return true;
|
||||
}
|
||||
|
||||
public void getCompilerInput(String path, String input) throws IOException, URISyntaxException, ClassNotFoundException {
|
||||
LanguageServerInterface languageServer = new LanguageServerInterface();
|
||||
var transferObj = languageServer.getResultSetAndAbstractSyntax(path, input);
|
||||
current = transferObj;
|
||||
}
|
||||
|
||||
public LanguageServerTransferObject updateIfNotPresent(String path, String input) throws IOException, URISyntaxException, ClassNotFoundException {
|
||||
if (current == null) {
|
||||
LanguageServerInterface languageServer = new LanguageServerInterface();
|
||||
LanguageServerTransferObject transferObj = languageServer.getResultSetAndAbstractSyntax(path, input);
|
||||
return transferObj;
|
||||
}
|
||||
return current;
|
||||
}
|
||||
|
||||
/**
|
||||
* Zum Erhalt für sowohl Parameter als auch Methoden.
|
||||
*/
|
||||
public ArrayList<LSPVariable> infereInput(String input, String path) throws IOException, ClassNotFoundException, URISyntaxException {
|
||||
logger.info("Infering Types for Input.");
|
||||
|
||||
current = updateIfNotPresent(path, input);
|
||||
LanguageServerTransferObject transferObj = current;
|
||||
|
||||
|
||||
ArrayList<LSPVariable> methodsWithParametersLSPVariableList = new ArrayList<>();
|
||||
|
||||
|
||||
methodsWithParametersLSPVariableList.addAll(astTransformationHelper.constructorToVariable(transferObj));
|
||||
methodsWithParametersLSPVariableList.addAll(astTransformationHelper.fieldDeclToVariable(transferObj));
|
||||
|
||||
|
||||
if (!transferObj.getResultSets().isEmpty()) {
|
||||
//TODO: Hier noch irgendwie die Klasse rausfinden oder durchgehen.
|
||||
|
||||
if (ENABLE_GENERICS) {
|
||||
methodsWithParametersLSPVariableList.addAll(astTransformationHelper.addGenericClassPosition(transferObj, input));
|
||||
}
|
||||
|
||||
methodsWithParametersLSPVariableList.addAll(astTransformationHelper.methodsWithParameterToVariable(transferObj, ENABLE_GENERICS));
|
||||
}
|
||||
|
||||
return methodsWithParametersLSPVariableList;
|
||||
}
|
||||
|
||||
|
||||
public void reduceCurrent(HashMap<LineCharPosition, String> combinedList, List<LSPVariable> variables, LanguageClient client) {
|
||||
client.logMessage(new MessageParams(MessageType.Info, "Lenght is: " + combinedList.size()));
|
||||
for (var lines : combinedList.entrySet()) {
|
||||
var contentChange = lines.getValue();
|
||||
for (LSPVariable variable : variables) {
|
||||
for (Type typeOfVariable : variable.getPossibleTypes()) {
|
||||
client.logMessage(new MessageParams(MessageType.Info, "\"" + typeOfVariable.getType() + " : " + variable.getLine() + "\"< > \"" + contentChange + " : " + lines.getKey() + "\""));
|
||||
if (typeOfVariable.getType().equalsIgnoreCase(contentChange.replaceAll(" ", ""))) {
|
||||
if (variable.getLine() - 1 == lines.getKey().line && variable.getCharPosition() == lines.getKey().charPosition) {
|
||||
current.getResultSets().removeIf(el -> !el.resolveType(variable.getOriginalTphName()).resolvedType.toString().equalsIgnoreCase(contentChange.replaceAll(" ", "")));
|
||||
client.logMessage(new MessageParams(MessageType.Info, "Removing Resultset"));
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
40
LanguageServer/src/main/java/de/dhbw/helper/TypeUtils.java
Normal file
40
LanguageServer/src/main/java/de/dhbw/helper/TypeUtils.java
Normal file
@@ -0,0 +1,40 @@
|
||||
package de.dhbw.helper;
|
||||
|
||||
import de.dhbw.model.Type;
|
||||
import de.dhbwstuttgart.syntaxtree.Method;
|
||||
import de.dhbwstuttgart.syntaxtree.type.RefTypeOrTPHOrWildcardOrGeneric;
|
||||
import de.dhbwstuttgart.target.generate.GenericsResult;
|
||||
import de.dhbwstuttgart.typeinference.result.ResultSet;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class TypeUtils {
|
||||
|
||||
public ArrayList<Type> getAvailableTypes(List<ResultSet> resultSets, RefTypeOrTPHOrWildcardOrGeneric parameter) {
|
||||
|
||||
ArrayList<String> paramTypes = new ArrayList<>();
|
||||
resultSets.forEach(conSet -> {
|
||||
if (parameter.toString().toLowerCase().contains("tph ")) {
|
||||
paramTypes.add(conSet.resolveType(parameter).resolvedType.toString());
|
||||
}
|
||||
});
|
||||
|
||||
return new ArrayList<>(paramTypes.stream().filter(el -> !el.contains("TPH ")).map(el -> new Type(el, false)).toList());
|
||||
}
|
||||
|
||||
public ArrayList<Type> getAvailableTypes(List<ResultSet> resultSets, Method method) {
|
||||
ArrayList<String> normalType = new ArrayList<>();
|
||||
|
||||
resultSets.forEach(conSet -> {
|
||||
if (method.getReturnType().toString().toLowerCase().contains("tph ")) {
|
||||
normalType.add(conSet.resolveType(method.getReturnType()).resolvedType.toString());
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
return new ArrayList<>(normalType.stream().filter(el -> !el.contains("TPH ")).map(el -> new Type(el, false)).toList());
|
||||
|
||||
}
|
||||
|
||||
}
|
@@ -0,0 +1,33 @@
|
||||
package de.dhbw.model;
|
||||
|
||||
import org.eclipse.lsp4j.Diagnostic;
|
||||
import org.eclipse.lsp4j.InlayHint;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class DiagnosticsAndTypehints {
|
||||
private List<Diagnostic> diagnostics;
|
||||
private List<InlayHint> inlayHints;
|
||||
|
||||
public List<Diagnostic> getDiagnostics() {
|
||||
return diagnostics;
|
||||
}
|
||||
|
||||
public List<InlayHint> getInlayHints() {
|
||||
return inlayHints;
|
||||
}
|
||||
|
||||
public void setDiagnostics(List<Diagnostic> diagnostics) {
|
||||
this.diagnostics = diagnostics;
|
||||
}
|
||||
|
||||
public void setInlayHints(List<InlayHint> inlayHints) {
|
||||
this.inlayHints = inlayHints;
|
||||
}
|
||||
|
||||
public DiagnosticsAndTypehints(List<Diagnostic> diagnostics, List<InlayHint> inlayHints){
|
||||
this.diagnostics = diagnostics;
|
||||
this.inlayHints = inlayHints;
|
||||
}
|
||||
|
||||
}
|
@@ -0,0 +1,41 @@
|
||||
package de.dhbw.model;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
|
||||
public class DocumentChanges {
|
||||
HashMap<LineCharPosition, String> preciseChanges = new HashMap<>();
|
||||
ArrayList<Integer> offsetPerLine = new ArrayList<>();
|
||||
HashMap<Integer, List<String>> textChanges = new HashMap<>();
|
||||
|
||||
public ArrayList<Integer> getOffsetPerLine() {
|
||||
return offsetPerLine;
|
||||
}
|
||||
|
||||
public HashMap<Integer, List<String>> getTextChanges() {
|
||||
return textChanges;
|
||||
}
|
||||
|
||||
public HashMap<LineCharPosition, String> getPreciseChanges() {
|
||||
return preciseChanges;
|
||||
}
|
||||
|
||||
public void setOffsetPerLine(ArrayList<Integer> offsetPerLine) {
|
||||
this.offsetPerLine = offsetPerLine;
|
||||
}
|
||||
|
||||
public void setPreciseChanges(HashMap<LineCharPosition, String> preciseChanges) {
|
||||
this.preciseChanges = preciseChanges;
|
||||
}
|
||||
|
||||
public void setTextChanges(HashMap<Integer, List<String>> textChanges) {
|
||||
this.textChanges = textChanges;
|
||||
}
|
||||
|
||||
public DocumentChanges(HashMap<LineCharPosition, String> preciseChanges, ArrayList<Integer> offsetPerLine, HashMap<Integer, List<String>> textChanges){
|
||||
this.preciseChanges = preciseChanges;
|
||||
this.offsetPerLine = offsetPerLine;
|
||||
this.textChanges = textChanges;
|
||||
}
|
||||
}
|
11
LanguageServer/src/main/java/de/dhbw/model/LSPClass.java
Normal file
11
LanguageServer/src/main/java/de/dhbw/model/LSPClass.java
Normal file
@@ -0,0 +1,11 @@
|
||||
package de.dhbw.model;
|
||||
|
||||
import de.dhbwstuttgart.syntaxtree.type.RefTypeOrTPHOrWildcardOrGeneric;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
public class LSPClass extends LSPVariable{
|
||||
public LSPClass(String name, ArrayList<Type> possibleTypes, int line, int charPosition, int endPosition, RefTypeOrTPHOrWildcardOrGeneric originalTphName) {
|
||||
super(name, possibleTypes, line, charPosition, endPosition, originalTphName);
|
||||
}
|
||||
}
|
11
LanguageServer/src/main/java/de/dhbw/model/LSPMethod.java
Normal file
11
LanguageServer/src/main/java/de/dhbw/model/LSPMethod.java
Normal file
@@ -0,0 +1,11 @@
|
||||
package de.dhbw.model;
|
||||
|
||||
import de.dhbwstuttgart.syntaxtree.type.RefTypeOrTPHOrWildcardOrGeneric;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
public class LSPMethod extends LSPVariable {
|
||||
public LSPMethod(String name, ArrayList<Type> type, int line, int charPosition, int endPosition, RefTypeOrTPHOrWildcardOrGeneric originalTphName) {
|
||||
super(name, type, line, charPosition, endPosition, originalTphName);
|
||||
}
|
||||
}
|
12
LanguageServer/src/main/java/de/dhbw/model/LSPParameter.java
Normal file
12
LanguageServer/src/main/java/de/dhbw/model/LSPParameter.java
Normal file
@@ -0,0 +1,12 @@
|
||||
package de.dhbw.model;
|
||||
|
||||
import de.dhbwstuttgart.syntaxtree.type.RefTypeOrTPHOrWildcardOrGeneric;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
public class LSPParameter extends LSPVariable {
|
||||
|
||||
public LSPParameter(String name, ArrayList<Type> type, int line, int charPosition, int endPosition, RefTypeOrTPHOrWildcardOrGeneric originalTphName) {
|
||||
super(name, type, line, charPosition, endPosition, originalTphName);
|
||||
}
|
||||
}
|
72
LanguageServer/src/main/java/de/dhbw/model/LSPVariable.java
Normal file
72
LanguageServer/src/main/java/de/dhbw/model/LSPVariable.java
Normal file
@@ -0,0 +1,72 @@
|
||||
package de.dhbw.model;
|
||||
|
||||
import de.dhbwstuttgart.syntaxtree.type.RefTypeOrTPHOrWildcardOrGeneric;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
public class LSPVariable {
|
||||
String name;
|
||||
ArrayList<Type> possibleTypes;
|
||||
int line;
|
||||
int charPosition;
|
||||
int endPosition;
|
||||
boolean needsInference;
|
||||
RefTypeOrTPHOrWildcardOrGeneric originalTphName;
|
||||
|
||||
public LSPVariable(String name, ArrayList<Type> possibleTypes, int line, int charPosition, int endPosition, RefTypeOrTPHOrWildcardOrGeneric originalTphName) {
|
||||
this.name = name;
|
||||
this.possibleTypes = possibleTypes;
|
||||
this.line = line;
|
||||
this.charPosition = charPosition;
|
||||
this.endPosition = endPosition;
|
||||
this.originalTphName = originalTphName;
|
||||
}
|
||||
|
||||
public RefTypeOrTPHOrWildcardOrGeneric getOriginalTphName() {
|
||||
return originalTphName;
|
||||
}
|
||||
|
||||
public void setOriginalTphName(RefTypeOrTPHOrWildcardOrGeneric originalTphName) {
|
||||
this.originalTphName = originalTphName;
|
||||
}
|
||||
|
||||
public int getEndPosition() {
|
||||
return endPosition;
|
||||
}
|
||||
|
||||
public void setEndPosition(int endPosition) {
|
||||
this.endPosition = endPosition;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public ArrayList<Type> getPossibleTypes() {
|
||||
return possibleTypes;
|
||||
}
|
||||
|
||||
public void setPossibleTypes(ArrayList<Type> possibleTypes) {
|
||||
this.possibleTypes = possibleTypes;
|
||||
}
|
||||
|
||||
public int getLine() {
|
||||
return line;
|
||||
}
|
||||
|
||||
public void setLine(int line) {
|
||||
this.line = line;
|
||||
}
|
||||
|
||||
public int getCharPosition() {
|
||||
return charPosition;
|
||||
}
|
||||
|
||||
public void setCharPosition(int charPosition) {
|
||||
this.charPosition = charPosition;
|
||||
}
|
||||
}
|
@@ -0,0 +1,25 @@
|
||||
package de.dhbw.model;
|
||||
|
||||
public class LineCharPosition {
|
||||
public final int line;
|
||||
public final int charPosition;
|
||||
|
||||
public LineCharPosition(int line, int charPosition) {
|
||||
this.line = line;
|
||||
this.charPosition = charPosition;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object o) {
|
||||
if (this == o) return true;
|
||||
if (!(o instanceof LineCharPosition)) return false;
|
||||
LineCharPosition that = (LineCharPosition) o;
|
||||
return line == that.line && charPosition == that.charPosition;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "Line " + line + ", Char " + charPosition;
|
||||
}
|
||||
}
|
@@ -1,4 +1,4 @@
|
||||
package com.dhbw.model.ParseError;
|
||||
package de.dhbw.model.ParseError;
|
||||
|
||||
import org.antlr.v4.runtime.*;
|
||||
import org.antlr.v4.runtime.atn.ATNConfigSet;
|
@@ -1,4 +1,4 @@
|
||||
package com.dhbw.model;
|
||||
package de.dhbw.model;
|
||||
|
||||
public class SnippetWithName {
|
||||
private String name;
|
27
LanguageServer/src/main/java/de/dhbw/model/Type.java
Normal file
27
LanguageServer/src/main/java/de/dhbw/model/Type.java
Normal file
@@ -0,0 +1,27 @@
|
||||
package de.dhbw.model;
|
||||
|
||||
public class Type {
|
||||
String type;
|
||||
boolean generic;
|
||||
|
||||
public Type(String type, boolean generic){
|
||||
this.type = type;
|
||||
this.generic = generic;
|
||||
}
|
||||
|
||||
public void setGeneric(boolean generic) {
|
||||
this.generic = generic;
|
||||
}
|
||||
|
||||
public void setType(String type) {
|
||||
this.type = type;
|
||||
}
|
||||
|
||||
public String getType() {
|
||||
return type;
|
||||
}
|
||||
|
||||
public boolean isGeneric() {
|
||||
return generic;
|
||||
}
|
||||
}
|
120
LanguageServer/src/main/java/de/dhbw/service/CacheService.java
Normal file
120
LanguageServer/src/main/java/de/dhbw/service/CacheService.java
Normal file
@@ -0,0 +1,120 @@
|
||||
package de.dhbw.service;
|
||||
|
||||
import de.dhbw.helper.CodeSnippetOptions;
|
||||
import de.dhbw.helper.TextHelper;
|
||||
import de.dhbw.helper.TypeResolver;
|
||||
import de.dhbw.model.LSPVariable;
|
||||
import org.eclipse.lsp4j.Diagnostic;
|
||||
import org.eclipse.lsp4j.InlayHint;
|
||||
|
||||
import java.nio.file.Path;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
|
||||
public class CacheService {
|
||||
private HashMap<String, List<InlayHint>> globalInlayHintMap = new HashMap<>();
|
||||
private Boolean currentlyCalculating = false;
|
||||
private HashMap<String, List<Diagnostic>> globalDiagnosticsMap = new HashMap<>();
|
||||
private HashMap<String, String> textDocuments = new HashMap<>();
|
||||
private CodeSnippetOptions codeSnippetOptions = new CodeSnippetOptions();
|
||||
private TextHelper textHelper = new TextHelper();
|
||||
private Boolean dontShowHints = false;
|
||||
private TypeResolver typeResolver = new TypeResolver();
|
||||
private Path fileRoot = null;
|
||||
private Boolean singleFileOpened = false;
|
||||
private List<LSPVariable> variables = new ArrayList<>();
|
||||
|
||||
public void updateGlobalMaps(List<Diagnostic> diagnostics, List<InlayHint> typeHint, String uri) {
|
||||
globalDiagnosticsMap.put(uri, diagnostics);
|
||||
globalInlayHintMap.put(uri, typeHint);
|
||||
}
|
||||
|
||||
public Boolean getCurrentlyCalculating() {
|
||||
return currentlyCalculating;
|
||||
}
|
||||
|
||||
public Boolean getDontShowHints() {
|
||||
return dontShowHints;
|
||||
}
|
||||
|
||||
public Boolean getSingleFileOpened() {
|
||||
return singleFileOpened;
|
||||
}
|
||||
|
||||
public CodeSnippetOptions getCodeSnippetOptions() {
|
||||
return codeSnippetOptions;
|
||||
}
|
||||
|
||||
public HashMap<String, List<Diagnostic>> getGlobalDiagnosticsMap() {
|
||||
return globalDiagnosticsMap;
|
||||
}
|
||||
|
||||
public HashMap<String, List<InlayHint>> getGlobalInlayHintMap() {
|
||||
return globalInlayHintMap;
|
||||
}
|
||||
|
||||
public HashMap<String, String> getTextDocuments() {
|
||||
return textDocuments;
|
||||
}
|
||||
|
||||
public List<LSPVariable> getVariables() {
|
||||
return variables;
|
||||
}
|
||||
|
||||
public Path getFileRoot() {
|
||||
return fileRoot;
|
||||
}
|
||||
|
||||
public TextHelper getTextHelper() {
|
||||
return textHelper;
|
||||
}
|
||||
|
||||
public TypeResolver getTypeResolver() {
|
||||
return typeResolver;
|
||||
}
|
||||
|
||||
public void setCodeSnippetOptions(CodeSnippetOptions codeSnippetOptions) {
|
||||
this.codeSnippetOptions = codeSnippetOptions;
|
||||
}
|
||||
|
||||
public void setCurrentlyCalculating(Boolean currentlyCalculating) {
|
||||
this.currentlyCalculating = currentlyCalculating;
|
||||
}
|
||||
|
||||
public void setDontShowHints(Boolean dontShowHints) {
|
||||
this.dontShowHints = dontShowHints;
|
||||
}
|
||||
|
||||
public void setFileRoot(Path fileRoot) {
|
||||
this.fileRoot = fileRoot;
|
||||
}
|
||||
|
||||
public void setGlobalDiagnosticsMap(HashMap<String, List<Diagnostic>> globalDiagnosticsMap) {
|
||||
this.globalDiagnosticsMap = globalDiagnosticsMap;
|
||||
}
|
||||
|
||||
public void setGlobalInlayHintMap(HashMap<String, List<InlayHint>> globalInlayHintMap) {
|
||||
this.globalInlayHintMap = globalInlayHintMap;
|
||||
}
|
||||
|
||||
public void setSingleFileOpened(Boolean singleFileOpened) {
|
||||
this.singleFileOpened = singleFileOpened;
|
||||
}
|
||||
|
||||
public void setTextDocuments(HashMap<String, String> textDocuments) {
|
||||
this.textDocuments = textDocuments;
|
||||
}
|
||||
|
||||
public void setTextHelper(TextHelper textHelper) {
|
||||
this.textHelper = textHelper;
|
||||
}
|
||||
|
||||
public void setTypeResolver(TypeResolver typeResolver) {
|
||||
this.typeResolver = typeResolver;
|
||||
}
|
||||
|
||||
public void setVariables(List<LSPVariable> variables) {
|
||||
this.variables = variables;
|
||||
}
|
||||
}
|
@@ -0,0 +1,79 @@
|
||||
package de.dhbw.service;
|
||||
|
||||
import org.eclipse.lsp4j.*;
|
||||
import org.eclipse.lsp4j.jsonrpc.messages.Either;
|
||||
import org.eclipse.lsp4j.services.LanguageClient;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class ClientService {
|
||||
|
||||
private LanguageClient client;
|
||||
|
||||
public ClientService(LanguageClient client) {
|
||||
this.client = client;
|
||||
}
|
||||
|
||||
public void publishDiagnostics(String uri, List<Diagnostic> diagnostics){
|
||||
PublishDiagnosticsParams diagnosticsParams = new PublishDiagnosticsParams(uri, diagnostics);
|
||||
client.publishDiagnostics(diagnosticsParams);
|
||||
}
|
||||
|
||||
public void sendClientLog(MessageType type, String message){
|
||||
client.logMessage(new MessageParams(type, message));
|
||||
}
|
||||
|
||||
public void sendClientLog(String message){
|
||||
client.logMessage(new MessageParams(MessageType.Info, message));
|
||||
}
|
||||
|
||||
public void showMessage(MessageType type, String message) {
|
||||
client.showMessage(new MessageParams(type, message));
|
||||
}
|
||||
|
||||
public void showMessage(String message) {
|
||||
client.showMessage(new MessageParams(MessageType.Info, message));
|
||||
}
|
||||
|
||||
public void setClient(LanguageClient client) {
|
||||
this.client = client;
|
||||
}
|
||||
|
||||
public void updateClient(LanguageClient client) {
|
||||
client.refreshInlayHints();
|
||||
client.refreshDiagnostics();
|
||||
}
|
||||
|
||||
public void updateClient() {
|
||||
client.refreshInlayHints();
|
||||
client.refreshDiagnostics();
|
||||
}
|
||||
|
||||
public LanguageClient getClient() {
|
||||
return client;
|
||||
}
|
||||
|
||||
public void startLoading(String taskName, String title, LanguageClient client) {
|
||||
Either<String, Integer> token = Either.forLeft(taskName);
|
||||
client.createProgress(new WorkDoneProgressCreateParams(token));
|
||||
|
||||
WorkDoneProgressBegin begin = new WorkDoneProgressBegin();
|
||||
begin.setTitle(title);
|
||||
begin.setCancellable(false);
|
||||
begin.setPercentage(0);
|
||||
|
||||
ProgressParams beginParams = new ProgressParams(token, Either.forLeft(begin));
|
||||
client.notifyProgress(beginParams);
|
||||
|
||||
}
|
||||
|
||||
public void stopLoading(String taskName, String title, LanguageClient client) {
|
||||
Either<String, Integer> token = Either.forLeft(taskName);
|
||||
WorkDoneProgressEnd end = new WorkDoneProgressEnd();
|
||||
end.setMessage(title);
|
||||
|
||||
ProgressParams endParams = new ProgressParams(token, Either.forLeft(end));
|
||||
client.notifyProgress(endParams);
|
||||
}
|
||||
|
||||
}
|
31
LanguageServer/src/main/java/de/dhbw/service/LogService.java
Normal file
31
LanguageServer/src/main/java/de/dhbw/service/LogService.java
Normal file
@@ -0,0 +1,31 @@
|
||||
package de.dhbw.service;
|
||||
|
||||
import org.apache.log4j.LogManager;
|
||||
import org.apache.log4j.Logger;
|
||||
import org.eclipse.lsp4j.MessageType;
|
||||
|
||||
public class LogService {
|
||||
|
||||
private final Logger logger = LogManager.getLogger(LogService.class);
|
||||
private final ClientService clientService;
|
||||
|
||||
public LogService(ClientService clientService) {
|
||||
this.clientService = clientService;
|
||||
}
|
||||
|
||||
public void log(String message, MessageType type) {
|
||||
clientService.sendClientLog(type, message);
|
||||
switch (type) {
|
||||
case Error -> logger.error(message);
|
||||
case Warning -> logger.warn(message);
|
||||
case Info -> logger.info(message);
|
||||
default -> logger.debug(message);
|
||||
}
|
||||
}
|
||||
|
||||
public void log(String message) {
|
||||
clientService.sendClientLog(MessageType.Info, message);
|
||||
logger.info(message);
|
||||
}
|
||||
|
||||
}
|
@@ -0,0 +1,14 @@
|
||||
package de.dhbw.service;
|
||||
|
||||
import de.dhbwstuttgart.languageServerInterface.ParserInterface;
|
||||
import de.dhbwstuttgart.languageServerInterface.model.ParserError;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class ParserService {
|
||||
|
||||
public List<ParserError> getParserErrors(String input){
|
||||
ParserInterface parserInterface = new ParserInterface();
|
||||
return parserInterface.getParseErrors(input);
|
||||
}
|
||||
}
|
@@ -0,0 +1,116 @@
|
||||
package de.dhbw.service;
|
||||
|
||||
import de.dhbw.model.DocumentChanges;
|
||||
import de.dhbw.model.LineCharPosition;
|
||||
import org.eclipse.lsp4j.Range;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
public class TextDocumentService {
|
||||
|
||||
private final HashMap<String, String> files = new HashMap<>();
|
||||
|
||||
public TextDocumentService(){
|
||||
|
||||
}
|
||||
|
||||
public String getFileOfUri(String uri) {
|
||||
return files.get(uri);
|
||||
}
|
||||
|
||||
public void saveFileWithUri(String uri, String input) {
|
||||
files.put(uri, input);
|
||||
}
|
||||
|
||||
public DocumentChanges calculateDifference(String currentText, String newText){
|
||||
ArrayList<String> currentTextLines = new ArrayList<>(Arrays.stream(currentText.split("\n")).toList());
|
||||
ArrayList<String> newTextLines = new ArrayList<>(Arrays.stream(newText.split("\n")).toList());
|
||||
HashMap<LineCharPosition, String> preciseChanges = new HashMap<>();
|
||||
ArrayList<Integer> offsetPerLine = new ArrayList<>();
|
||||
HashMap<Integer, List<String>> textChanges = new HashMap<>();
|
||||
int index = 0;
|
||||
for (String newTextLine : newTextLines) {
|
||||
if (!(currentTextLines.size() > index)) {
|
||||
offsetPerLine.add(0);
|
||||
} else {
|
||||
Map<LineCharPosition, String> lineDiffs = differenceLinePos(currentTextLines.get(index), newTextLine, index);
|
||||
preciseChanges.putAll(lineDiffs);
|
||||
textChanges.put(index, difference(currentTextLines.get(index), newTextLine).stream().map(el -> el.replaceAll(" ", "")).toList());
|
||||
offsetPerLine.add(newTextLine.length() - currentTextLines.get(index).length());
|
||||
}
|
||||
|
||||
index++;
|
||||
}
|
||||
|
||||
return new DocumentChanges(preciseChanges, offsetPerLine, textChanges);
|
||||
}
|
||||
|
||||
public Map<LineCharPosition, String> differenceLinePos(String first, String second, int line) {
|
||||
Map<LineCharPosition, String> result = new HashMap<>();
|
||||
|
||||
int i = 0, j = 0;
|
||||
int startDiff = -1;
|
||||
|
||||
while (j < second.length()) {
|
||||
if (i < first.length() && first.charAt(i) == second.charAt(j)) {
|
||||
if (startDiff != -1) {
|
||||
String diff = second.substring(startDiff, j);
|
||||
result.put(new LineCharPosition(line, startDiff), diff);
|
||||
startDiff = -1;
|
||||
}
|
||||
i++;
|
||||
j++;
|
||||
} else {
|
||||
if (startDiff == -1) {
|
||||
startDiff = j;
|
||||
}
|
||||
j++;
|
||||
}
|
||||
}
|
||||
|
||||
if (startDiff != -1) {
|
||||
String diff = second.substring(startDiff);
|
||||
result.put(new LineCharPosition(line, startDiff), diff);
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
public ArrayList<String> difference(String first, String second) {
|
||||
ArrayList<String> result = new ArrayList<>();
|
||||
|
||||
int i = 0, j = 0;
|
||||
int startDiff = -1;
|
||||
|
||||
while (j < second.length()) {
|
||||
if (i < first.length() && first.charAt(i) == second.charAt(j)) {
|
||||
if (startDiff != -1) {
|
||||
result.add(second.substring(startDiff, j));
|
||||
startDiff = -1;
|
||||
}
|
||||
i++;
|
||||
j++;
|
||||
} else {
|
||||
if (startDiff == -1) {
|
||||
startDiff = j;
|
||||
}
|
||||
j++;
|
||||
}
|
||||
}
|
||||
|
||||
if (startDiff != -1) {
|
||||
result.add(second.substring(startDiff));
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
public boolean rangesOverlap(Range range1, Range range2) {
|
||||
int start1 = range1.getStart().getLine() * 1000 + range1.getStart().getCharacter();
|
||||
int end1 = range1.getEnd().getLine() * 1000 + range1.getEnd().getCharacter();
|
||||
int start2 = range2.getStart().getLine() * 1000 + range2.getStart().getCharacter();
|
||||
int end2 = range2.getEnd().getLine() * 1000 + range2.getEnd().getCharacter();
|
||||
|
||||
return start1 <= end2 && start2 <= end1;
|
||||
}
|
||||
}
|
8
LanguageServer/src/main/resources/log4j.properties
Normal file
8
LanguageServer/src/main/resources/log4j.properties
Normal file
@@ -0,0 +1,8 @@
|
||||
# Root Logger
|
||||
log4j.rootLogger=DEBUG, FILE
|
||||
|
||||
# File Appender
|
||||
log4j.appender.FILE=org.apache.log4j.FileAppender
|
||||
log4j.appender.FILE.File=./application.log
|
||||
log4j.appender.FILE.layout=org.apache.log4j.PatternLayout
|
||||
log4j.appender.FILE.layout.ConversionPattern=%d{yyyy-MM-dd HH:mm:ss} %-5p [%c{1}] %m%n
|
15
LanguageServer/src/test/java/CodeSnippetOptionsTest.java
Normal file
15
LanguageServer/src/test/java/CodeSnippetOptionsTest.java
Normal file
@@ -0,0 +1,15 @@
|
||||
|
||||
import de.dhbw.helper.CodeSnippetOptions;
|
||||
import de.dhbw.model.SnippetWithName;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
|
||||
public class CodeSnippetOptionsTest {
|
||||
@Test
|
||||
public void testForLoop() {
|
||||
CodeSnippetOptions options = new CodeSnippetOptions();
|
||||
|
||||
assertEquals(options.getForLoopSnippet().getSnippet(),"for(i = 0; i < ${1:listSize}; i++){\n\n}");
|
||||
}
|
||||
}
|
144
LanguageServer/src/test/java/CompilerInterfaceTest.java
Normal file
144
LanguageServer/src/test/java/CompilerInterfaceTest.java
Normal file
@@ -0,0 +1,144 @@
|
||||
|
||||
import de.dhbw.helper.TextHelper;
|
||||
import de.dhbw.helper.TypeResolver;
|
||||
import org.junit.Assert;
|
||||
import org.junit.Test;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.net.URISyntaxException;
|
||||
|
||||
public class CompilerInterfaceTest {
|
||||
|
||||
@Test
|
||||
public void testAbstractSyntaxAsString() throws IOException, ClassNotFoundException, URISyntaxException {
|
||||
TypeResolver typeResolver = new TypeResolver();
|
||||
var res = typeResolver.infereInput("import java.lang.Integer;\n import java.lang.String;\n" +
|
||||
"public class test{\n" +
|
||||
"public main(test){" +
|
||||
"if(0>1){" +
|
||||
"return \"w\";" +
|
||||
"}" +
|
||||
"Integer i = 0;" +
|
||||
"return i;" +
|
||||
"}" +
|
||||
"}", "c%3A/Users/ruben/Neuer%20Ordner%20%282%29/LSP-Vortrag/images/test.jav");
|
||||
|
||||
var res2 = typeResolver.infereInput("import java.lang.Integer;\n import java.lang.String;\n" +
|
||||
"public class test{\n" +
|
||||
"public main(test){" +
|
||||
"if(0>1){" +
|
||||
"return \"w\";" +
|
||||
"}" +
|
||||
"Integer i = 0;" +
|
||||
"return i;" +
|
||||
"}" +
|
||||
"}", "c%3A/Users/ruben/Neuer%20Ordner%20%282%29/LSP-Vortrag/images/test.jav");
|
||||
System.out.println("TEST OUTPUT:");
|
||||
//
|
||||
// ArrayList<String> allTypes = new ArrayList<>();
|
||||
//
|
||||
// res.getResultSets().forEach(el -> allTypes.add(el.resolveType(res.getAst().getAllMethods().get(0).getReturnType()).resolvedType.toString()));
|
||||
// var results = res.getGeneratedGenerics().entrySet().iterator().next();
|
||||
//
|
||||
//
|
||||
// System.out.println(res.getResultSets().toString());
|
||||
//
|
||||
//
|
||||
// System.out.println("\n\n\nPRINTED AST:");
|
||||
// System.out.println(res.getPrintedAst());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testConstraintTypes() throws IOException, ClassNotFoundException {
|
||||
// LanguageServerInterface languageServer = new LanguageServerInterface();
|
||||
// TypeResolver typeResolver = new TypeResolver();
|
||||
//
|
||||
//
|
||||
// var res = typeResolver.infereInput("import java.lang.Integer; public class test{\n" +
|
||||
// " \n" +
|
||||
// " public main(testa){\n" +
|
||||
// " return testa;\n" +
|
||||
// " }\n" +
|
||||
// "}");
|
||||
// res.forEach(el -> el.getPossibleTypes().forEach(el2 -> System.out.println(el2.getType() + " " + (el2.isGeneric() ? "GENERIC" : "NO GENERIC"))));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testTypeFinder() throws IOException, ClassNotFoundException {
|
||||
// TypeResolver typeResolver = new TypeResolver();
|
||||
// var inferedMethods = typeResolver.infereInput("import java.lang.Integer;\n import java.lang.String;\n" +
|
||||
// "public class test{\n" +
|
||||
// "public main(test){" +
|
||||
// "if(0>1){" +
|
||||
// "return \"w\";" +
|
||||
// "}" +
|
||||
// "Integer i = 0;" +
|
||||
// "return i;" +
|
||||
// "}" +
|
||||
// "}"
|
||||
// );
|
||||
//
|
||||
// inferedMethods.forEach(el -> System.out.println(el.getName() + ": " + el.getPossibleTypes() + " | " + el.getLine() + " " + el.getCharPosition()));
|
||||
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testGenericTypes() throws IOException, ClassNotFoundException {
|
||||
// TypeResolver typeResolver = new TypeResolver();
|
||||
// var inferedMethods = typeResolver.infereInput("import java.lang.Integer; public class test{\n" +
|
||||
// " \n" +
|
||||
// " public main(testa){\n" +
|
||||
// " return testa;\n" +
|
||||
// " }\n" +
|
||||
// "}"
|
||||
// );
|
||||
//
|
||||
// inferedMethods.forEach(el -> System.out.println(el.getName() + ": " + el.getPossibleTypes() + " | " + el.getLine() + " " + el.getCharPosition()));
|
||||
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testTypeFinderParameter() throws IOException, ClassNotFoundException {
|
||||
// TypeResolver typeResolver = new TypeResolver();
|
||||
// var inferedMethods = typeResolver.infereInput("import java.lang.Integer;\n" +
|
||||
// "import java.lang.String; \n" +
|
||||
// "public class test{\n" +
|
||||
// " public main(test, test2){\n" +
|
||||
// " if(1>0){\n" +
|
||||
// " return test;\n" +
|
||||
// " }\n" +
|
||||
// " String i = test;\n" +
|
||||
// " return 1;\n" +
|
||||
// "\n" +
|
||||
// "\n" +
|
||||
// " }\n" +
|
||||
// "}"
|
||||
// );
|
||||
//
|
||||
// inferedMethods.forEach(el -> System.out.println(el.getName() + ": " + el.getPossibleTypes()));
|
||||
|
||||
}
|
||||
|
||||
|
||||
@Test
|
||||
public void testCharEnding() throws IOException, ClassNotFoundException {
|
||||
TextHelper textHelper = new TextHelper();
|
||||
var endingChar = textHelper.getEndingCharOfStartingChar(3, 13, "import java.lang.Integer;\n" +
|
||||
"import java.lang.String; \n" +
|
||||
"public class test{\n" +
|
||||
" public main(test, test2){\n" +
|
||||
" if(1>0){\n" +
|
||||
" return test;\n" +
|
||||
" }\n" +
|
||||
" String i = test;\n" +
|
||||
" return 1;\n" +
|
||||
"\n" +
|
||||
"\n" +
|
||||
" }\n" +
|
||||
"}"
|
||||
);
|
||||
|
||||
Assert.assertEquals(15, (int) endingChar);
|
||||
|
||||
}
|
||||
}
|
@@ -0,0 +1,17 @@
|
||||
import de.dhbw.JavaTXTextDocumentService;
|
||||
import de.dhbw.helper.CodeSnippetOptions;
|
||||
import org.eclipse.lsp4j.DidSaveTextDocumentParams;
|
||||
import org.eclipse.lsp4j.TextDocumentIdentifier;
|
||||
import org.junit.Ignore;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
|
||||
public class JavaTXLanguageDocumentServiceTest {
|
||||
@Test
|
||||
@Ignore
|
||||
public void testWordExtraction() {
|
||||
// JavaTXTextDocumentService service = new JavaTXTextDocumentService();
|
||||
// service.didSave(new DidSaveTextDocumentParams(new TextDocumentIdentifier("file:///c%3A/Users/ruben/Neuer%20Ordner%20%282%29/LSP-Vortrag/images/test.jav")));
|
||||
}
|
||||
}
|
43
README.md
43
README.md
@@ -5,9 +5,12 @@ It uses the LSP4J Framework in Version 0.23.1.
|
||||
## Functionality
|
||||
Currently the Language Server has the following functionalities:
|
||||
- Syntax-Check
|
||||
- Test Hovereffect.
|
||||
- HelloWorld Autocomplete
|
||||
- Autocomplete for ForLoops and Main Method.
|
||||
- Basic Autoformatting (removing every Space at the End of the Line)
|
||||
- Display Type of Methods and Parameters with TypeInference
|
||||
- Select Type of typinfered Type and replace it (including Generics)
|
||||
- Give Hint of all possible Types to Select from (including Generics)
|
||||
- Compile Bytecode in /out Folder
|
||||
|
||||
|
||||
## Project Structure
|
||||
@@ -15,28 +18,48 @@ Currently the Language Server has the following functionalities:
|
||||
.
|
||||
├── Client/
|
||||
│ ├── VisualStudioCode -> Containing the Client for VS Code. In this Case a Extension.
|
||||
│ ├── Eclipse
|
||||
│ ├── Emacs
|
||||
│ ├── Intellij
|
||||
│ └── ...
|
||||
└── LanguageServer/
|
||||
└── src/main/java/com/example/
|
||||
└── src/main/java/de/dhbw/
|
||||
├── compiler/ -> Containing the JavaTX Compiler
|
||||
│ └── ...
|
||||
├── model/
|
||||
│ └── parseError/
|
||||
│ └── ... -> Containing Custom Parse-Errors.
|
||||
├── parser/
|
||||
│ └── ... -> Containing an the JavaTX ANTLR Parser for Syntax-Checks.
|
||||
├── helper/
|
||||
│ └── ... -> Containing Helper-Classes for the Language Server.
|
||||
├── JavaTXLanguageServer.java -> Orchestrator of the Language Server
|
||||
├── JavaTXLanguageServerLauncher.java -> Class to start the Language Server.
|
||||
├── JavaTXTextDocumentService.java -> Language-Server Features for a Single File
|
||||
└── JavaTXWorkspaceService.java -> Language-Server Features for the Workspace
|
||||
```
|
||||
|
||||
## Usage
|
||||
To use this Language Server you have to follow this steps:
|
||||
## If you want to bundle and build the extension by yourself
|
||||
To bundle and build the extension you can follow these steps:
|
||||
1. Package the LanguageServer with ```maven:package```.
|
||||
2. Open the VS-Code Client and run ```npm install```.
|
||||
3. change Path in ```extensions.ts``` to absolute Path of your packaged Jar-File that you packaged in Step 1. (Line 20 and 24)
|
||||
4. run ```npm run compile```
|
||||
5. Go to Debug and Run the Extension.
|
||||
6. Press F1 and execute the Hello World Command.
|
||||
7. You can create .java Files which will be analysed by the Language Server.
|
||||
5. install vsce ```npm install -g @vscode/vsce```
|
||||
6. run ```vsce package``` and use the .vsix File as Extension in VS Code
|
||||
|
||||
## Known Problems and what to do
|
||||
|
||||
1. Currently the import statement after a selection of a type is not added. Please add it by yourself.
|
||||
|
||||
## Logic
|
||||
The Language Server in itself can be used for any Client. The Clients task is to start the Langauge Server and handle the Communication with it.
|
||||
|
||||

|
||||
|
||||
## Update JavaTX Compiler Dependency as Maven Package
|
||||
If you make changes in the Compiler Interface, you have to change the jar and therefore the Dependency in the Java TX Language Server
|
||||
You can follow this steps:
|
||||
1. package the JavaTX Compiler
|
||||
2. take the Jar-File and copy it into the /lib Folder
|
||||
3. execute this Maven command to add the Jar in your local Repository: ```mvn install:install-file -Dfile=lib/JavaTXcompiler-0.1-jar-with-dependencies.jar -DgroupId=de.dhbwstuttgart -DartifactId=JavaTXcompiler -Dversion=0.1 -Dpackaging=jar```
|
||||
4. run ```maven clean```, ```validate``` and ```install``` to load the new Dependency
|
||||
5. you can now package the Language Server or change the code accordingly.
|
167
docs/diagram.drawio
Normal file
167
docs/diagram.drawio
Normal file
@@ -0,0 +1,167 @@
|
||||
<mxfile host="65bd71144e" scale="10" border="0">
|
||||
<diagram id="u07XxLFaEpzG2f9e_3K5" name="Page-1">
|
||||
<mxGraphModel dx="2184" dy="1340" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="2000" pageHeight="1169" math="0" shadow="0">
|
||||
<root>
|
||||
<mxCell id="0"/>
|
||||
<mxCell id="1" parent="0"/>
|
||||
<mxCell id="27" value="" style="rounded=0;whiteSpace=wrap;html=1;" parent="1" vertex="1">
|
||||
<mxGeometry x="250" y="180" width="220" height="590" as="geometry"/>
|
||||
</mxCell>
|
||||
<mxCell id="25" value="" style="rounded=0;whiteSpace=wrap;html=1;" parent="1" vertex="1">
|
||||
<mxGeometry x="500" y="180" width="650" height="590" as="geometry"/>
|
||||
</mxCell>
|
||||
<mxCell id="2" value="JavaTX Compiler Interface" style="rounded=0;whiteSpace=wrap;html=1;" parent="1" vertex="1">
|
||||
<mxGeometry x="340" y="280" width="120" height="60" as="geometry"/>
|
||||
</mxCell>
|
||||
<mxCell id="3" value="LSP-Typefinder" style="rounded=0;whiteSpace=wrap;html=1;" parent="1" vertex="1">
|
||||
<mxGeometry x="760" y="280" width="120" height="60" as="geometry"/>
|
||||
</mxCell>
|
||||
<mxCell id="4" value="" style="endArrow=classic;html=1;exitX=0;exitY=0.25;exitDx=0;exitDy=0;entryX=1;entryY=0.25;entryDx=0;entryDy=0;" parent="1" source="3" target="2" edge="1">
|
||||
<mxGeometry width="50" height="50" relative="1" as="geometry">
|
||||
<mxPoint x="640" y="380" as="sourcePoint"/>
|
||||
<mxPoint x="690" y="330" as="targetPoint"/>
|
||||
</mxGeometry>
|
||||
</mxCell>
|
||||
<mxCell id="5" value="input : String" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];" parent="4" vertex="1" connectable="0">
|
||||
<mxGeometry x="0.4244" y="-1" relative="1" as="geometry">
|
||||
<mxPoint x="74" as="offset"/>
|
||||
</mxGeometry>
|
||||
</mxCell>
|
||||
<mxCell id="6" value="" style="endArrow=classic;html=1;exitX=1;exitY=0.75;exitDx=0;exitDy=0;entryX=0;entryY=0.75;entryDx=0;entryDy=0;" parent="1" source="2" target="3" edge="1">
|
||||
<mxGeometry width="50" height="50" relative="1" as="geometry">
|
||||
<mxPoint x="550" y="390" as="sourcePoint"/>
|
||||
<mxPoint x="600" y="340" as="targetPoint"/>
|
||||
</mxGeometry>
|
||||
</mxCell>
|
||||
<mxCell id="7" value="ResultSet and AST : LSP-DTO" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];" parent="6" vertex="1" connectable="0">
|
||||
<mxGeometry x="-0.0333" relative="1" as="geometry">
|
||||
<mxPoint x="15" as="offset"/>
|
||||
</mxGeometry>
|
||||
</mxCell>
|
||||
<mxCell id="8" value="JavaTX<br>DocumentService" style="rounded=0;whiteSpace=wrap;html=1;" parent="1" vertex="1">
|
||||
<mxGeometry x="760" y="440" width="120" height="60" as="geometry"/>
|
||||
</mxCell>
|
||||
<mxCell id="9" value="" style="endArrow=classic;html=1;entryX=0.25;entryY=1;entryDx=0;entryDy=0;exitX=0.25;exitY=0;exitDx=0;exitDy=0;" parent="1" source="8" target="3" edge="1">
|
||||
<mxGeometry width="50" height="50" relative="1" as="geometry">
|
||||
<mxPoint x="800" y="430" as="sourcePoint"/>
|
||||
<mxPoint x="850" y="380" as="targetPoint"/>
|
||||
</mxGeometry>
|
||||
</mxCell>
|
||||
<mxCell id="10" value="input: string" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];" parent="9" vertex="1" connectable="0">
|
||||
<mxGeometry x="-0.1333" y="1" relative="1" as="geometry">
|
||||
<mxPoint as="offset"/>
|
||||
</mxGeometry>
|
||||
</mxCell>
|
||||
<mxCell id="11" value="" style="endArrow=classic;html=1;exitX=0.75;exitY=1;exitDx=0;exitDy=0;entryX=0.75;entryY=0;entryDx=0;entryDy=0;" parent="1" source="3" target="8" edge="1">
|
||||
<mxGeometry width="50" height="50" relative="1" as="geometry">
|
||||
<mxPoint x="860" y="420" as="sourcePoint"/>
|
||||
<mxPoint x="910" y="370" as="targetPoint"/>
|
||||
</mxGeometry>
|
||||
</mxCell>
|
||||
<mxCell id="13" value="types :<br>List&lt;NameWithType&gt;" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];" parent="11" vertex="1" connectable="0">
|
||||
<mxGeometry x="-0.3667" relative="1" as="geometry">
|
||||
<mxPoint as="offset"/>
|
||||
</mxGeometry>
|
||||
</mxCell>
|
||||
<mxCell id="14" value="NameWithType contains the Name, the Type and the Position of the Variable" style="shape=note2;boundedLbl=1;whiteSpace=wrap;html=1;size=12;verticalAlign=top;align=center;" parent="1" vertex="1">
|
||||
<mxGeometry x="980" y="350" width="140" height="80" as="geometry"/>
|
||||
</mxCell>
|
||||
<mxCell id="15" value="" style="endArrow=none;dashed=1;html=1;entryX=0;entryY=0.5;entryDx=0;entryDy=0;entryPerimeter=0;" parent="1" target="14" edge="1">
|
||||
<mxGeometry width="50" height="50" relative="1" as="geometry">
|
||||
<mxPoint x="910" y="380" as="sourcePoint"/>
|
||||
<mxPoint x="1000" y="480" as="targetPoint"/>
|
||||
</mxGeometry>
|
||||
</mxCell>
|
||||
<mxCell id="16" value="JavaTX<br>LanguageServer" style="rounded=0;whiteSpace=wrap;html=1;" parent="1" vertex="1">
|
||||
<mxGeometry x="760" y="560" width="120" height="60" as="geometry"/>
|
||||
</mxCell>
|
||||
<mxCell id="17" value="" style="endArrow=classic;html=1;exitX=0.5;exitY=0;exitDx=0;exitDy=0;entryX=0.5;entryY=1;entryDx=0;entryDy=0;startArrow=classic;startFill=1;" parent="1" source="16" target="8" edge="1">
|
||||
<mxGeometry width="50" height="50" relative="1" as="geometry">
|
||||
<mxPoint x="740" y="570" as="sourcePoint"/>
|
||||
<mxPoint x="790" y="520" as="targetPoint"/>
|
||||
</mxGeometry>
|
||||
</mxCell>
|
||||
<mxCell id="19" value="Initialises the Language Server and select the Features" style="shape=note2;boundedLbl=1;whiteSpace=wrap;html=1;size=12;verticalAlign=top;align=center;" parent="1" vertex="1">
|
||||
<mxGeometry x="980" y="490" width="120" height="70" as="geometry"/>
|
||||
</mxCell>
|
||||
<mxCell id="20" value="" style="endArrow=none;dashed=1;html=1;entryX=0;entryY=0.5;entryDx=0;entryDy=0;entryPerimeter=0;exitX=1;exitY=0.5;exitDx=0;exitDy=0;" parent="1" source="16" edge="1">
|
||||
<mxGeometry width="50" height="50" relative="1" as="geometry">
|
||||
<mxPoint x="910" y="525" as="sourcePoint"/>
|
||||
<mxPoint x="980" y="535" as="targetPoint"/>
|
||||
</mxGeometry>
|
||||
</mxCell>
|
||||
<mxCell id="21" value="JavaTX<br>LanugaeServer<br>Launcher" style="rounded=0;whiteSpace=wrap;html=1;" parent="1" vertex="1">
|
||||
<mxGeometry x="760" y="670" width="120" height="60" as="geometry"/>
|
||||
</mxCell>
|
||||
<mxCell id="22" value="" style="endArrow=classic;html=1;entryX=0.5;entryY=1;entryDx=0;entryDy=0;exitX=0.5;exitY=0;exitDx=0;exitDy=0;startArrow=classic;startFill=1;" parent="1" source="21" target="16" edge="1">
|
||||
<mxGeometry width="50" height="50" relative="1" as="geometry">
|
||||
<mxPoint x="680" y="710" as="sourcePoint"/>
|
||||
<mxPoint x="730" y="660" as="targetPoint"/>
|
||||
</mxGeometry>
|
||||
</mxCell>
|
||||
<mxCell id="23" value="Starts the LanguageServer with Sys.In and Sys.Out<br>Also gives the LanguageServer its Client-Reference" style="shape=note2;boundedLbl=1;whiteSpace=wrap;html=1;size=12;verticalAlign=top;align=center;" parent="1" vertex="1">
|
||||
<mxGeometry x="550" y="550" width="120" height="110" as="geometry"/>
|
||||
</mxCell>
|
||||
<mxCell id="24" value="" style="endArrow=none;dashed=1;html=1;entryX=0;entryY=0.5;entryDx=0;entryDy=0;exitX=0;exitY=0;exitDx=120;exitDy=46;exitPerimeter=0;" parent="1" source="23" target="21" edge="1">
|
||||
<mxGeometry width="50" height="50" relative="1" as="geometry">
|
||||
<mxPoint x="890" y="600" as="sourcePoint"/>
|
||||
<mxPoint x="990" y="545" as="targetPoint"/>
|
||||
</mxGeometry>
|
||||
</mxCell>
|
||||
<mxCell id="26" value="LanguageServer" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;" parent="1" vertex="1">
|
||||
<mxGeometry x="520" y="180" width="60" height="30" as="geometry"/>
|
||||
</mxCell>
|
||||
<mxCell id="28" value="JavaTXCompiler" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;" parent="1" vertex="1">
|
||||
<mxGeometry x="270" y="180" width="60" height="30" as="geometry"/>
|
||||
</mxCell>
|
||||
<mxCell id="29" value="" style="rounded=0;whiteSpace=wrap;html=1;" parent="1" vertex="1">
|
||||
<mxGeometry x="1180" y="530" width="460" height="240" as="geometry"/>
|
||||
</mxCell>
|
||||
<mxCell id="30" value="extension.ts" style="rounded=0;whiteSpace=wrap;html=1;" parent="1" vertex="1">
|
||||
<mxGeometry x="1250" y="670" width="120" height="60" as="geometry"/>
|
||||
</mxCell>
|
||||
<mxCell id="31" value="" style="endArrow=classic;html=1;exitX=0;exitY=0.5;exitDx=0;exitDy=0;entryX=1;entryY=0.5;entryDx=0;entryDy=0;" parent="1" source="30" target="21" edge="1">
|
||||
<mxGeometry width="50" height="50" relative="1" as="geometry">
|
||||
<mxPoint x="1020" y="740" as="sourcePoint"/>
|
||||
<mxPoint x="1070" y="690" as="targetPoint"/>
|
||||
</mxGeometry>
|
||||
</mxCell>
|
||||
<mxCell id="32" value="starts" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];" parent="31" vertex="1" connectable="0">
|
||||
<mxGeometry x="0.3103" y="2" relative="1" as="geometry">
|
||||
<mxPoint x="92" y="-2" as="offset"/>
|
||||
</mxGeometry>
|
||||
</mxCell>
|
||||
<mxCell id="33" value="" style="endArrow=none;dashed=1;html=1;entryX=0.652;entryY=0.333;entryDx=0;entryDy=0;entryPerimeter=0;" parent="1" target="29" edge="1">
|
||||
<mxGeometry width="50" height="50" relative="1" as="geometry">
|
||||
<mxPoint x="1370" y="700" as="sourcePoint"/>
|
||||
<mxPoint x="1420" y="650" as="targetPoint"/>
|
||||
</mxGeometry>
|
||||
</mxCell>
|
||||
<mxCell id="34" value="" style="endArrow=none;dashed=1;html=1;entryX=0.25;entryY=1;entryDx=0;entryDy=0;exitX=1;exitY=0.5;exitDx=0;exitDy=0;" parent="1" source="30" target="38" edge="1">
|
||||
<mxGeometry width="50" height="50" relative="1" as="geometry">
|
||||
<mxPoint x="1380" y="710" as="sourcePoint"/>
|
||||
<mxPoint x="1570.25" y="529.8399999999999" as="targetPoint"/>
|
||||
</mxGeometry>
|
||||
</mxCell>
|
||||
<mxCell id="35" value="" style="endArrow=none;dashed=1;html=1;entryX=0.167;entryY=0.667;entryDx=0;entryDy=0;entryPerimeter=0;" parent="1" target="39" edge="1">
|
||||
<mxGeometry width="50" height="50" relative="1" as="geometry">
|
||||
<mxPoint x="1370" y="700" as="sourcePoint"/>
|
||||
<mxPoint x="1669.7000000000003" y="600.05" as="targetPoint"/>
|
||||
</mxGeometry>
|
||||
</mxCell>
|
||||
<mxCell id="36" value="LanguageServerClient for Visual Studio Code" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;" parent="1" vertex="1">
|
||||
<mxGeometry x="1175" y="530" width="270" height="30" as="geometry"/>
|
||||
</mxCell>
|
||||
<mxCell id="37" value="..." style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;" parent="1" vertex="1">
|
||||
<mxGeometry x="1470" y="575" width="60" height="30" as="geometry"/>
|
||||
</mxCell>
|
||||
<mxCell id="38" value="..." style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;" parent="1" vertex="1">
|
||||
<mxGeometry x="1510" y="605" width="60" height="30" as="geometry"/>
|
||||
</mxCell>
|
||||
<mxCell id="39" value="..." style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;" parent="1" vertex="1">
|
||||
<mxGeometry x="1550" y="670" width="60" height="30" as="geometry"/>
|
||||
</mxCell>
|
||||
</root>
|
||||
</mxGraphModel>
|
||||
</diagram>
|
||||
</mxfile>
|
BIN
docs/diagram.png
Normal file
BIN
docs/diagram.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 2.7 MiB |
Reference in New Issue
Block a user