[restructuring] updated eclipse metadata, deleted no longer needed maven and pde files, created org.eclipse.xtext.testing and moved AbstractLangaugeServerTest there

This commit is contained in:
Sven Efftinge 2016-06-12 12:17:03 +02:00
parent 5014aab004
commit 048b4d27a2
31 changed files with 579 additions and 854 deletions

View file

@ -1,6 +0,0 @@
source.. = src/,\
xtend-gen/
bin.includes = META-INF/,\
.,\
about.html
src.includes = about.html

View file

@ -1,38 +0,0 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.eclipse.xtext</groupId>
<artifactId>org.eclipse.xtext.tycho.parent</artifactId>
<version>2.11.0-SNAPSHOT</version>
<relativePath>../../maven/org.eclipse.xtext.tycho.parent</relativePath>
</parent>
<packaging>eclipse-plugin</packaging>
<name>Xtext IDE Library</name>
<artifactId>org.eclipse.xtext.ide</artifactId>
<build>
<plugins>
<plugin>
<groupId>org.eclipse.tycho</groupId>
<artifactId>target-platform-configuration</artifactId>
<version>${tycho-version}</version>
<configuration>
<pomDependencies>consider</pomDependencies>
</configuration>
</plugin>
</plugins>
</build>
<dependencies>
<dependency>
<groupId>io.typefox.lsapi</groupId>
<artifactId>io.typefox.lsapi</artifactId>
<version>0.2.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>io.typefox.lsapi</groupId>
<artifactId>io.typefox.lsapi.services</artifactId>
<version>0.2.0-SNAPSHOT</version>
</dependency>
</dependencies>
</project>

View file

@ -4,20 +4,26 @@
<comment>Project org.eclipse.xtext.util created by Buildship.</comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.buildship.core.gradleprojectbuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.buildship.core.gradleprojectnature</nature>
<nature>org.eclipse.jdt.core.javanature</nature>
</natures>
<buildSpec>
<buildCommand>
<name>org.eclipse.xtext.ui.shared.xtextBuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.buildship.core.gradleprojectbuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.buildship.core.gradleprojectnature</nature>
<nature>org.eclipse.jdt.core.javanature</nature>
<nature>org.eclipse.xtext.ui.shared.xtextNature</nature>
</natures>
</projectDescription>

View file

@ -1,7 +0,0 @@
source.. = src/,\
xtend-gen/
output.. = bin/
bin.includes = META-INF/,\
.,\
about.html
src.includes = about.html

View file

@ -1,62 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.eclipse.xtext</groupId>
<artifactId>org.eclipse.xtext.tycho.parent</artifactId>
<version>2.11.0-SNAPSHOT</version>
<relativePath>../../maven/org.eclipse.xtext.tycho.parent</relativePath>
</parent>
<packaging>eclipse-plugin</packaging>
<artifactId>org.eclipse.xtext.util</artifactId>
<name>Xtext Util</name>
<description>Xtext Util</description>
<dependencies>
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
<version>${guava.version}</version>
</dependency>
<dependency>
<groupId>com.google.inject</groupId>
<artifactId>guice</artifactId>
<version>3.0</version>
</dependency>
<dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
<version>1.2.15</version>
<exclusions>
<exclusion>
<artifactId>jmxtools</artifactId>
<groupId>com.sun.jdmk</groupId>
</exclusion>
<exclusion>
<artifactId>jmxri</artifactId>
<groupId>com.sun.jmx</groupId>
</exclusion>
<exclusion>
<artifactId>jms</artifactId>
<groupId>javax.jms</groupId>
</exclusion>
<exclusion>
<artifactId>mail</artifactId>
<groupId>javax.mail</groupId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.eclipse.emf</groupId>
<artifactId>org.eclipse.emf.ecore</artifactId>
<version>[2.9.0,)</version>
</dependency>
<dependency>
<groupId>org.eclipse.emf</groupId>
<artifactId>org.eclipse.emf.common</artifactId>
<version>[2.9.0,)</version>
</dependency>
</dependencies>
</project>

View file

@ -4,20 +4,26 @@
<comment>Project org.eclipse.xtext.xtext.generator created by Buildship.</comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.buildship.core.gradleprojectbuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.buildship.core.gradleprojectnature</nature>
<nature>org.eclipse.jdt.core.javanature</nature>
</natures>
<buildSpec>
<buildCommand>
<name>org.eclipse.xtext.ui.shared.xtextBuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.buildship.core.gradleprojectbuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.buildship.core.gradleprojectnature</nature>
<nature>org.eclipse.jdt.core.javanature</nature>
<nature>org.eclipse.xtext.ui.shared.xtextNature</nature>
</natures>
</projectDescription>

View file

@ -1,8 +0,0 @@
source.. = src/,\
src-gen/,\
xtend-gen/
output.. = bin/
bin.includes = META-INF/,\
.,\
about.html
src.includes = about.html

View file

@ -1,75 +0,0 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.eclipse.xtext</groupId>
<artifactId>org.eclipse.xtext.tycho.parent</artifactId>
<version>2.11.0-SNAPSHOT</version>
<relativePath>../../maven/org.eclipse.xtext.tycho.parent</relativePath>
</parent>
<packaging>eclipse-plugin</packaging>
<artifactId>org.eclipse.xtext.xtext.generator</artifactId>
<name>Xtext Generator 2</name>
<dependencies>
<dependency>
<groupId>org.eclipse.xtext</groupId>
<artifactId>org.eclipse.xtext</artifactId>
<version>[${project.version}]</version>
</dependency>
<dependency>
<groupId>org.eclipse.xtext</groupId>
<artifactId>org.eclipse.xtext.ecore</artifactId>
<version>[${project.version}]</version>
</dependency>
<dependency>
<groupId>org.eclipse.xtend</groupId>
<artifactId>org.eclipse.xtend.lib</artifactId>
<version>[${project.version}]</version>
</dependency>
<dependency>
<groupId>org.eclipse.emf</groupId>
<artifactId>org.eclipse.emf.ecore.xmi</artifactId>
<version>${emf.version}</version>
</dependency>
<dependency>
<groupId>org.eclipse.emf</groupId>
<artifactId>org.eclipse.emf.codegen.ecore</artifactId>
<version>${emf.version}</version>
</dependency>
<dependency>
<groupId>com.ibm.icu</groupId>
<artifactId>icu4j</artifactId>
<version>${icu4j.version}</version>
</dependency>
<dependency>
<groupId>org.eclipse.emf</groupId>
<artifactId>org.eclipse.emf.mwe2.lib</artifactId>
<version>${mwe2-version}</version>
</dependency>
<dependency>
<groupId>org.eclipse.emf</groupId>
<artifactId>org.eclipse.emf.mwe.utils</artifactId>
<version>${mwe-version}</version>
</dependency>
<dependency>
<groupId>org.eclipse.xtext</groupId>
<artifactId>xtext-antlr-generator</artifactId>
<version>${antlr-generator-version}</version>
</dependency>
<dependency>
<!-- FIXME should be transitively provided by mwe.utils -->
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
<version>${commons-logging.version}</version>
</dependency>
<dependency>
<!-- FIXME should be transitively provided by mwe.utils -->
<groupId>org.eclipse.emf</groupId>
<artifactId>org.eclipse.emf.mwe.core</artifactId>
<version>${mwe-version}</version>
</dependency>
</dependencies>
</project>

View file

@ -4,20 +4,26 @@
<comment>Project org.eclipse.xtext.xtext.wizard created by Buildship.</comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.buildship.core.gradleprojectbuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.buildship.core.gradleprojectnature</nature>
<nature>org.eclipse.jdt.core.javanature</nature>
</natures>
<buildSpec>
<buildCommand>
<name>org.eclipse.xtext.ui.shared.xtextBuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.buildship.core.gradleprojectbuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.buildship.core.gradleprojectnature</nature>
<nature>org.eclipse.jdt.core.javanature</nature>
<nature>org.eclipse.xtext.ui.shared.xtextNature</nature>
</natures>
</projectDescription>

View file

@ -1,9 +0,0 @@
source.. = src/,\
xtend-gen/
output.. = bin/
bin.includes = META-INF/,\
.,\
about.html
src.includes = about.html,\
META-INF/eclipse.inf
src.excludes = resources/

View file

@ -1,15 +0,0 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.eclipse.xtext</groupId>
<artifactId>org.eclipse.xtext.tycho.parent</artifactId>
<version>2.11.0-SNAPSHOT</version>
<relativePath>../../maven/org.eclipse.xtext.tycho.parent</relativePath>
</parent>
<packaging>eclipse-plugin</packaging>
<artifactId>org.eclipse.xtext.xtext.wizard</artifactId>
<name>Xtext Wizard</name>
</project>

View file

@ -15,11 +15,6 @@
<attribute name="FROM_GRADLE_MODEL" value="true"/>
</attributes>
</classpathentry>
<classpathentry excluding="emf-gen/|packrat/|src-gen/|src/|xtend-gen/" including="META-INF/|about.html|about.ini|about.mappings|about.properties|modeling32.png|plugin.xml|schema/" kind="src" path="">
<attributes>
<attribute name="FROM_GRADLE_MODEL" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="src" path="xtend-gen">
<attributes>
<attribute name="FROM_GRADLE_MODEL" value="true"/>
@ -30,6 +25,11 @@
<attribute name="FROM_GRADLE_MODEL" value="true"/>
</attributes>
</classpathentry>
<classpathentry excluding="bin/|build/|emf-gen/|packrat/|src-gen/|src/|target/|xtend-gen/" including="META-INF/|about.html|about.ini|about.mappings|about.properties|modeling32.png|plugin.xml|schema/" kind="src" path="">
<attributes>
<attribute name="FROM_GRADLE_MODEL" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
<classpathentry kind="con" path="org.eclipse.buildship.core.gradleclasspathcontainer"/>
<classpathentry kind="output" path="bin"/>

View file

@ -4,20 +4,26 @@
<comment>Project org.eclipse.xtext created by Buildship.</comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.buildship.core.gradleprojectbuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.buildship.core.gradleprojectnature</nature>
<nature>org.eclipse.jdt.core.javanature</nature>
</natures>
<buildSpec>
<buildCommand>
<name>org.eclipse.xtext.ui.shared.xtextBuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.buildship.core.gradleprojectbuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.buildship.core.gradleprojectnature</nature>
<nature>org.eclipse.jdt.core.javanature</nature>
<nature>org.eclipse.xtext.ui.shared.xtextNature</nature>
</natures>
</projectDescription>

View file

@ -1,23 +0,0 @@
bin.includes = .,\
schema/,\
META-INF/,\
plugin.xml,\
about.ini,\
about.mappings,\
about.properties,\
about.html,\
modeling32.png,\
org/
jars.compile.order = .
source.. = src/,\
emf-gen/,\
src-gen/,\
xtend-gen/,\
packrat/
output.. = bin/
src.includes = about.html,\
about.ini,\
about.mappings,\
about.properties,\
modeling32.png

View file

@ -1,74 +0,0 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.eclipse.xtext</groupId>
<artifactId>org.eclipse.xtext.tycho.parent</artifactId>
<version>2.11.0-SNAPSHOT</version>
<relativePath>../../maven/org.eclipse.xtext.tycho.parent</relativePath>
</parent>
<packaging>eclipse-plugin</packaging>
<artifactId>org.eclipse.xtext</artifactId>
<name>Xtext Runtime Bundle</name>
<dependencies>
<dependency>
<groupId>org.eclipse.xtext</groupId>
<artifactId>org.eclipse.xtext.util</artifactId>
<version>[${project.version}]</version>
</dependency>
<dependency>
<groupId>org.eclipse.xtend</groupId>
<artifactId>org.eclipse.xtend.lib</artifactId>
<version>[${project.version}]</version>
</dependency>
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
<version>${guava.version}</version>
</dependency>
<dependency>
<groupId>com.google.inject</groupId>
<artifactId>guice</artifactId>
<version>${google-inject.version}</version>
</dependency>
<dependency>
<groupId>org.eclipse.emf</groupId>
<artifactId>org.eclipse.emf.ecore</artifactId>
<version>${emf.version}</version>
</dependency>
<dependency>
<groupId>org.eclipse.emf</groupId>
<artifactId>org.eclipse.emf.common</artifactId>
<version>${emf.version}</version>
</dependency>
<dependency>
<groupId>org.eclipse.emf</groupId>
<artifactId>org.eclipse.emf.ecore.xmi</artifactId>
<version>${emf.version}</version>
</dependency>
<dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
<version>${log4j.version}</version>
<type>jar</type>
</dependency>
<dependency>
<groupId>org.antlr</groupId>
<artifactId>antlr-runtime</artifactId>
<version>[3.2]</version>
<exclusions>
<exclusion>
<artifactId>stringtemplate</artifactId>
<groupId>org.antlr</groupId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.eclipse.equinox</groupId>
<artifactId>org.eclipse.equinox.common</artifactId>
<version>${equinox-common-version}</version>
</dependency>
</dependencies>
</project>

View file

@ -0,0 +1,21 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" path="src">
<attributes>
<attribute name="FROM_GRADLE_MODEL" value="true"/>
</attributes>
</classpathentry>
<classpathentry excluding="src/|xtend-gen/" including="META-INF/|about.html" kind="src" path="">
<attributes>
<attribute name="FROM_GRADLE_MODEL" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="src" path="xtend-gen">
<attributes>
<attribute name="FROM_GRADLE_MODEL" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
<classpathentry kind="con" path="org.eclipse.buildship.core.gradleclasspathcontainer"/>
<classpathentry kind="output" path="bin"/>
</classpath>

View file

@ -0,0 +1,29 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>org.eclipse.xtext.testing</name>
<comment>Project org.eclipse.xtext.testing created by Buildship.</comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.xtext.ui.shared.xtextBuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.buildship.core.gradleprojectbuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.buildship.core.gradleprojectnature</nature>
<nature>org.eclipse.jdt.core.javanature</nature>
<nature>org.eclipse.xtext.ui.shared.xtextNature</nature>
</natures>
</projectDescription>

View file

@ -0,0 +1,7 @@
build.commands=org.eclipse.jdt.core.javabuilder
connection.gradle.distribution=GRADLE_DISTRIBUTION(WRAPPER)
connection.project.dir=..
derived.resources=.gradle,build
eclipse.preferences.version=1
natures=org.eclipse.jdt.core.javanature
project.path=\:org.eclipse.xtext.testing

View file

@ -0,0 +1,2 @@
eclipse.preferences.version=1
encoding/<project>=ISO-8859-1

View file

@ -0,0 +1,13 @@
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: Xtext
Bundle-SymbolicName: org.eclipse.xtext.testing;singleton:=true
Bundle-Version: 2.11.0.qualifier
Bundle-ClassPath: .
Bundle-Vendor: Eclipse Xtext
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
Export-Package: org.eclipse.xtext.testing
Require-Bundle: org.eclipse.xtext;visibility:=reexport,
org.eclipse.xtext.ide;visibility:=reexport
Import-Package: org.apache.log4j;version="1.2.15"
Bundle-ActivationPolicy: lazy

View file

@ -0,0 +1,28 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
<title>About</title>
</head>
<body lang="EN-US">
<h2>About This Content</h2>
<p>June 5, 2007</p>
<h3>License</h3>
<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;). Unless otherwise
indicated below, the Content is provided to you under the terms and conditions of the
Eclipse Public License Version 1.0 (&quot;EPL&quot;). A copy of the EPL is available
at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may
apply to your use of any object code in the Content. Check the Redistributor's license that was
provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
indicated below, the terms and conditions of the EPL still apply to any source code in the Content
and such source code may be obtained at <a href="http://www.eclipse.org/">http://www.eclipse.org</a>.</p>
</body>
</html>

View file

@ -0,0 +1,6 @@
dependencies {
compile project(':org.eclipse.xtext')
compile project(':org.eclipse.xtext.ide')
compile "io.typefox.lsapi:io.typefox.lsapi.services:$versions.lsapi"
optional 'junit:junit:4.12'
}

View file

@ -0,0 +1,330 @@
/*******************************************************************************
* Copyright (c) 2016 TypeFox GmbH (http://www.typefox.io) and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*******************************************************************************/
package org.eclipse.xtext.testing
import com.google.inject.AbstractModule
import com.google.inject.Guice
import com.google.inject.Inject
import io.typefox.lsapi.CompletionItem
import io.typefox.lsapi.Diagnostic
import io.typefox.lsapi.Hover
import io.typefox.lsapi.InitializeParamsImpl
import io.typefox.lsapi.InitializeResult
import io.typefox.lsapi.Location
import io.typefox.lsapi.MarkedString
import io.typefox.lsapi.Position
import io.typefox.lsapi.PublishDiagnosticsParams
import io.typefox.lsapi.Range
import io.typefox.lsapi.ReferenceContextImpl
import io.typefox.lsapi.SymbolInformation
import java.io.File
import java.io.FileWriter
import java.net.URI
import java.nio.file.Path
import java.nio.file.Paths
import java.util.List
import java.util.Map
import java.util.concurrent.CompletableFuture
import java.util.function.Consumer
import org.eclipse.xtend.lib.annotations.Accessors
import org.eclipse.xtend.lib.annotations.FinalFieldsConstructor
import org.eclipse.xtext.LanguageInfo
import org.eclipse.xtext.ide.server.LanguageServerImpl
import org.eclipse.xtext.ide.server.ServerModule
import org.eclipse.xtext.ide.server.UriExtensions
import org.eclipse.xtext.ide.server.concurrent.RequestManager
import org.eclipse.xtext.resource.IResourceServiceProvider
import org.eclipse.xtext.util.CancelIndicator
import org.eclipse.xtext.util.Files
import org.eclipse.xtext.util.Modules2
import org.junit.Before
import static org.junit.Assert.*
import static extension io.typefox.lsapi.util.LsapiFactories.*
/**
* @author Sven Efftinge - Initial contribution and API
*/
@FinalFieldsConstructor
abstract class AbstractLanguageServerTest implements Consumer<PublishDiagnosticsParams> {
@Accessors
protected val String fileExtension
@Before
def void setup() {
val module = Modules2.mixin(new ServerModule, new AbstractModule() {
override protected configure() {
bind(RequestManager).toInstance(new RequestManager() {
override runWrite((CancelIndicator)=>void writeRequest, CancelIndicator cancelIndicator) {
writeRequest.apply(cancelIndicator)
return CompletableFuture.completedFuture(null)
}
override <V> runRead((CancelIndicator)=>V readRequest, CancelIndicator cancelIndicator) {
return CompletableFuture.completedFuture(readRequest.apply(cancelIndicator))
}
})
}
})
val injector = Guice.createInjector(module)
injector.injectMembers(this)
val resourceServiceProvider = resourceServerProviderRegistry.extensionToFactoryMap.get(fileExtension)
if (resourceServiceProvider instanceof IResourceServiceProvider)
languageInfo = resourceServiceProvider.get(LanguageInfo)
// register notification callbacks
languageServer.getTextDocumentService().onPublishDiagnostics(this)
// create workingdir
root = new File("./test-data/test-project")
if (!root.mkdirs) {
Files.cleanFolder(root, null, true, false)
}
root.deleteOnExit
}
@Inject
protected IResourceServiceProvider.Registry resourceServerProviderRegistry
@Inject extension UriExtensions
@Inject protected LanguageServerImpl languageServer
protected Map<String, List<? extends Diagnostic>> diagnostics = newHashMap()
protected File root
protected LanguageInfo languageInfo
protected def Path getRootPath() {
root.toPath().toAbsolutePath().normalize()
}
protected def Path relativize(String uri) {
val path = Paths.get(new URI(uri))
rootPath.relativize(path)
}
protected def InitializeResult initialize() {
return initialize(null)
}
protected def InitializeResult initialize((InitializeParamsImpl)=>void initializer) {
val params = newInitializeParams(1, rootPath.toString)
initializer?.apply(params)
return languageServer.initialize(params).get
}
protected def void open(String fileUri, String model) {
open(fileUri, languageInfo.languageName, model)
}
protected def void open(String fileUri, String langaugeId, String model) {
languageServer.didOpen(newDidOpenTextDocumentParams(fileUri, langaugeId, 1, model))
}
protected def void close(String fileUri) {
languageServer.didClose(newDidCloseTextDocumentParams(fileUri))
}
def String ->(String path, CharSequence contents) {
val file = new File(root, path)
file.parentFile.mkdirs
file.createNewFile
val writer = new FileWriter(file)
writer.write(contents.toString)
writer.close
return file.toURI.normalize.toPath
}
override accept(PublishDiagnosticsParams t) {
diagnostics.put(t.uri, t.diagnostics)
}
protected def dispatch String toExpectation(List<?> elements) '''
«FOR element : elements»
«element.toExpectation»
«ENDFOR»
'''
protected def dispatch String toExpectation(Void it) { '' }
protected def dispatch String toExpectation(Location it) '''«uri.relativize» «range.toExpectation»'''
protected def dispatch String toExpectation(Range it) '''[«start.toExpectation» .. «end.toExpectation»]'''
protected def dispatch String toExpectation(Position it) '''[«line», «character»]'''
protected def dispatch String toExpectation(SymbolInformation it) '''
symbol "«name»" {
kind: «kind»
location: «location.toExpectation»
«IF !container.nullOrEmpty»
container: "«container»"
«ENDIF»
}
'''
protected def dispatch String toExpectation(CompletionItem it) '''
«label»«IF !detail.nullOrEmpty» («detail»)«ENDIF»«IF insertText != label» -> «insertText»«ENDIF»
'''
protected dispatch def String toExpectation(Hover it) '''
«range.toExpectation»
«FOR content : contents»
«content.toExpectation»
«ENDFOR»
'''
protected dispatch def String toExpectation(
MarkedString it
) '''«IF !language.nullOrEmpty»«language» -> «ENDIF»«value»'''
protected def void testCompletion((TestCompletionConfiguration)=>void configurator) {
val extension configuration = new TestCompletionConfiguration
configuration.filePath = 'MyModel.' + fileExtension
configurator.apply(configuration)
val fileUri = filePath -> model
initialize
open(fileUri, model)
val completionItems = languageServer.completion(newTextDocumentPositionParams(fileUri, line, column))
val actualCompletionItems = completionItems.get.items.toExpectation
assertEquals(expectedCompletionItems, actualCompletionItems)
}
protected def void testDefinition((DefinitionTestConfiguration)=>void configurator) {
val extension configuration = new DefinitionTestConfiguration
configuration.filePath = 'MyModel.' + fileExtension
configurator.apply(configuration)
val fileUri = filePath -> model
initialize
open(fileUri, model)
val definitions = languageServer.definition(newTextDocumentPositionParams(fileUri, line, column))
val actualDefinitions = definitions.get.toExpectation
assertEquals(expectedDefinitions, actualDefinitions)
}
protected def void testHover((HoverTestConfiguration)=>void configurator) {
val extension configuration = new HoverTestConfiguration
configuration.filePath = 'MyModel.' + fileExtension
configurator.apply(configuration)
val fileUri = filePath -> model
initialize
open(fileUri, model)
val hover = languageServer.hover(newTextDocumentPositionParams(fileUri, line, column))
val actualHover = hover.get.toExpectation
assertEquals(expectedHover, actualHover)
}
protected def void testDocumentSymbol((DocumentSymbolConfiguraiton)=>void configurator) {
val extension configuration = new DocumentSymbolConfiguraiton
configuration.filePath = 'MyModel.' + fileExtension
configurator.apply(configuration)
val fileUri = filePath -> model
initialize
open(fileUri, model)
val symbols = languageServer.documentSymbol(fileUri.newDocumentSymbolParams)
val String actualSymbols = symbols.get.toExpectation
assertEquals(expectedSymbols, actualSymbols)
}
protected def void testSymbol((WorkspaceSymbolConfiguraiton)=>void configurator) {
val extension configuration = new WorkspaceSymbolConfiguraiton
configuration.filePath = 'MyModel.' + fileExtension
configurator.apply(configuration)
val fileUri = filePath -> model
initialize
open(fileUri, model)
val symbols = languageServer.symbol(query.newWorkspaceSymbolParams).get
val String actualSymbols = symbols.toExpectation
assertEquals(expectedSymbols, actualSymbols)
}
protected def void testReferences((ReferenceTestConfiguration)=>void configurator) {
val extension configuration = new ReferenceTestConfiguration
configuration.filePath = 'MyModel.' + fileExtension
configurator.apply(configuration)
val fileUri = filePath -> model
initialize
open(fileUri, model)
val referenceContext = new ReferenceContextImpl
referenceContext.includeDeclaration = includeDeclaration
val definitions = languageServer.references(newReferenceParams(fileUri, line, column, referenceContext))
val actualDefinitions = definitions.get.toExpectation
assertEquals(expectedReferences, actualDefinitions)
}
}
@Accessors
class TestCompletionConfiguration extends TextDocumentPositionConfiguration {
String expectedCompletionItems = ''
}
@Accessors
class DefinitionTestConfiguration extends TextDocumentPositionConfiguration {
String expectedDefinitions = ''
}
@Accessors
class HoverTestConfiguration extends TextDocumentPositionConfiguration {
String expectedHover = ''
}
@Accessors
class DocumentSymbolConfiguraiton extends TextDocumentConfiguration {
String expectedSymbols = ''
}
@Accessors
class ReferenceTestConfiguration extends TextDocumentPositionConfiguration {
boolean includeDeclaration = false
String expectedReferences = ''
}
@Accessors
class WorkspaceSymbolConfiguraiton extends TextDocumentConfiguration {
String query = ''
String expectedSymbols = ''
}
@Accessors
class TextDocumentPositionConfiguration extends TextDocumentConfiguration {
int line = 0
int column = 0
}
@Accessors
class TextDocumentConfiguration {
String model = ''
String filePath
}

View file

@ -18,3 +18,6 @@ rootProject.name = 'xtext-core'
include projectName
project(":$projectName").projectDir = file("../../tests/$projectName")
}
include 'org.eclipse.xtext.testing'
project(':org.eclipse.xtext.testing').projectDir = file('./org.eclipse.xtext.testing')

View file

@ -27,12 +27,6 @@
</attributes>
</classpathentry>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER">
<attributes>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="con" path="org.eclipse.buildship.core.gradleclasspathcontainer"/>
<classpathentry kind="output" path="target/classes"/>
<classpathentry kind="output" path="bin"/>
</classpath>

View file

@ -4,49 +4,26 @@
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.xtext.ui.shared.xtextBuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.pde.ManifestBuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.pde.api.tools.apiAnalysisBuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.pde.SchemaBuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.m2e.core.maven2Builder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.buildship.core.gradleprojectbuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.m2e.core.maven2Nature</nature>
<nature>org.eclipse.jdt.core.javanature</nature>
<nature>org.eclipse.pde.PluginNature</nature>
<nature>org.eclipse.pde.api.tools.apiAnalysisNature</nature>
<nature>org.eclipse.xtext.ui.shared.xtextNature</nature>
<nature>org.eclipse.buildship.core.gradleprojectnature</nature>
</natures>
<buildSpec>
<buildCommand>
<name>org.eclipse.xtext.ui.shared.xtextBuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.buildship.core.gradleprojectbuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.buildship.core.gradleprojectnature</nature>
<nature>org.eclipse.jdt.core.javanature</nature>
<nature>org.eclipse.xtext.ui.shared.xtextNature</nature>
</natures>
</projectDescription>

View file

@ -1,8 +1,10 @@
dependencies {
compile project(':org.eclipse.xtext.ide')
compile project(':org.eclipse.xtext.testing')
compile project(':org.eclipse.xtext.xtext.generator')
compile "io.typefox.lsapi:io.typefox.lsapi.services:$versions.lsapi"
compile 'junit:junit:4.12'
}
sourceSets.test.java.srcDirs += ['testlang-src', 'testlang-src-gen']
sourceSets.test.java.srcDirs = ['testlang-src', 'testlang-src-gen'] + sourceSets.test.java.srcDirs
sourceSets.test.resources.srcDirs += ['testlang-src', 'testlang-src-gen']

View file

@ -1,18 +0,0 @@
source.. = src/,\
xtend-gen/,\
testlang-src/,\
testlang-src-gen/
bin.includes = META-INF/,\
.,\
plugin.properties,\
about.html
src.includes = about.html
additional.bundles = org.eclipse.xtext.xtext.generator,\
org.eclipse.emf.codegen.ecore,\
org.eclipse.emf.mwe.utils,\
org.eclipse.emf.mwe2.lib,\
org.objectweb.asm,\
org.apache.commons.logging,\
org.apache.log4j,\
com.ibm.icu,\
org.eclipse.emf.mwe2.launch

View file

@ -1,67 +0,0 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.eclipse.xtext</groupId>
<artifactId>org.eclipse.xtext.tycho.parent</artifactId>
<version>2.11.0-SNAPSHOT</version>
<relativePath>../../maven/org.eclipse.xtext.tycho.parent</relativePath>
</parent>
<packaging>eclipse-plugin</packaging>
<name>Xtext IDE Tests</name>
<artifactId>org.eclipse.xtext.ide.tests</artifactId>
<build>
<plugins>
<plugin>
<groupId>org.eclipse.tycho</groupId>
<artifactId>target-platform-configuration</artifactId>
<version>${tycho-version}</version>
<configuration>
<pomDependencies>consider</pomDependencies>
</configuration>
</plugin>
<!-- Maven Assembly Plugin -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
<version>2.4.1</version>
<configuration>
<!-- get all project dependencies -->
<descriptorRefs>
<descriptorRef>jar-with-dependencies</descriptorRef>
</descriptorRefs>
<!-- MainClass in mainfest make a executable jar -->
<archive>
<manifest>
<mainClass>org.eclipse.xtext.ide.server.ServerLauncher</mainClass>
</manifest>
</archive>
</configuration>
<executions>
<execution>
<id>make-assembly</id>
<!-- bind to the packaging phase -->
<phase>package</phase>
<goals>
<goal>single</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
<dependencies>
<dependency>
<groupId>org.eclipse.xtext</groupId>
<artifactId>org.eclipse.xtext</artifactId>
<version>[${project.version}]</version>
</dependency>
<dependency>
<groupId>org.eclipse.xtext</groupId>
<artifactId>org.eclipse.xtext.ide</artifactId>
<version>[${project.version}]</version>
</dependency>
</dependencies>
</project>

View file

@ -1,330 +0,0 @@
/*******************************************************************************
* Copyright (c) 2016 TypeFox GmbH (http://www.typefox.io) and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*******************************************************************************/
package org.eclipse.xtext.ide.tests.server
import com.google.inject.AbstractModule
import com.google.inject.Guice
import com.google.inject.Inject
import io.typefox.lsapi.CompletionItem
import io.typefox.lsapi.Diagnostic
import io.typefox.lsapi.Hover
import io.typefox.lsapi.InitializeParamsImpl
import io.typefox.lsapi.InitializeResult
import io.typefox.lsapi.Location
import io.typefox.lsapi.MarkedString
import io.typefox.lsapi.Position
import io.typefox.lsapi.PublishDiagnosticsParams
import io.typefox.lsapi.Range
import io.typefox.lsapi.ReferenceContextImpl
import io.typefox.lsapi.SymbolInformation
import java.io.File
import java.io.FileWriter
import java.net.URI
import java.nio.file.Path
import java.nio.file.Paths
import java.util.List
import java.util.Map
import java.util.concurrent.CompletableFuture
import java.util.function.Consumer
import org.eclipse.xtend.lib.annotations.Accessors
import org.eclipse.xtend.lib.annotations.FinalFieldsConstructor
import org.eclipse.xtext.LanguageInfo
import org.eclipse.xtext.ide.server.LanguageServerImpl
import org.eclipse.xtext.ide.server.ServerModule
import org.eclipse.xtext.ide.server.UriExtensions
import org.eclipse.xtext.ide.server.concurrent.RequestManager
import org.eclipse.xtext.resource.IResourceServiceProvider
import org.eclipse.xtext.util.CancelIndicator
import org.eclipse.xtext.util.Files
import org.eclipse.xtext.util.Modules2
import org.junit.Before
import static org.junit.Assert.*
import static extension io.typefox.lsapi.util.LsapiFactories.*
/**
* @author Sven Efftinge - Initial contribution and API
*/
@FinalFieldsConstructor
abstract class AbstractLanguageServerTest implements Consumer<PublishDiagnosticsParams> {
@Accessors
protected val String fileExtension
@Before
def void setup() {
val module = Modules2.mixin(new ServerModule, new AbstractModule() {
override protected configure() {
bind(RequestManager).toInstance(new RequestManager() {
override runWrite((CancelIndicator)=>void writeRequest, CancelIndicator cancelIndicator) {
writeRequest.apply(cancelIndicator)
return CompletableFuture.completedFuture(null)
}
override <V> runRead((CancelIndicator)=>V readRequest, CancelIndicator cancelIndicator) {
return CompletableFuture.completedFuture(readRequest.apply(cancelIndicator))
}
})
}
})
val injector = Guice.createInjector(module)
injector.injectMembers(this)
val resourceServiceProvider = resourceServerProviderRegistry.extensionToFactoryMap.get(fileExtension)
if (resourceServiceProvider instanceof IResourceServiceProvider)
languageInfo = resourceServiceProvider.get(LanguageInfo)
// register notification callbacks
languageServer.getTextDocumentService().onPublishDiagnostics(this)
// create workingdir
root = new File("./test-data/test-project")
if (!root.mkdirs) {
Files.cleanFolder(root, null, true, false)
}
root.deleteOnExit
}
@Inject
protected IResourceServiceProvider.Registry resourceServerProviderRegistry
@Inject extension UriExtensions
@Inject protected LanguageServerImpl languageServer
protected Map<String, List<? extends Diagnostic>> diagnostics = newHashMap()
protected File root
protected LanguageInfo languageInfo
protected def Path getRootPath() {
root.toPath().toAbsolutePath().normalize()
}
protected def Path relativize(String uri) {
val path = Paths.get(new URI(uri))
rootPath.relativize(path)
}
protected def InitializeResult initialize() {
return initialize(null)
}
protected def InitializeResult initialize((InitializeParamsImpl)=>void initializer) {
val params = newInitializeParams(1, rootPath.toString)
initializer?.apply(params)
return languageServer.initialize(params).get
}
protected def void open(String fileUri, String model) {
open(fileUri, languageInfo.languageName, model)
}
protected def void open(String fileUri, String langaugeId, String model) {
languageServer.didOpen(newDidOpenTextDocumentParams(fileUri, langaugeId, 1, model))
}
protected def void close(String fileUri) {
languageServer.didClose(newDidCloseTextDocumentParams(fileUri))
}
def String ->(String path, CharSequence contents) {
val file = new File(root, path)
file.parentFile.mkdirs
file.createNewFile
val writer = new FileWriter(file)
writer.write(contents.toString)
writer.close
return file.toURI.normalize.toPath
}
override accept(PublishDiagnosticsParams t) {
diagnostics.put(t.uri, t.diagnostics)
}
protected def dispatch String toExpectation(List<?> elements) '''
«FOR element : elements»
«element.toExpectation»
«ENDFOR»
'''
protected def dispatch String toExpectation(Void it) { '' }
protected def dispatch String toExpectation(Location it) '''«uri.relativize» «range.toExpectation»'''
protected def dispatch String toExpectation(Range it) '''[«start.toExpectation» .. «end.toExpectation»]'''
protected def dispatch String toExpectation(Position it) '''[«line», «character»]'''
protected def dispatch String toExpectation(SymbolInformation it) '''
symbol "«name»" {
kind: «kind»
location: «location.toExpectation»
«IF !container.nullOrEmpty»
container: "«container»"
«ENDIF»
}
'''
protected def dispatch String toExpectation(CompletionItem it) '''
«label»«IF !detail.nullOrEmpty» («detail»)«ENDIF»«IF insertText != label» -> «insertText»«ENDIF»
'''
protected dispatch def String toExpectation(Hover it) '''
«range.toExpectation»
«FOR content : contents»
«content.toExpectation»
«ENDFOR»
'''
protected dispatch def String toExpectation(
MarkedString it
) '''«IF !language.nullOrEmpty»«language» -> «ENDIF»«value»'''
protected def void testCompletion((TestCompletionConfiguration)=>void configurator) {
val extension configuration = new TestCompletionConfiguration
configuration.filePath = 'MyModel.' + fileExtension
configurator.apply(configuration)
val fileUri = filePath -> model
initialize
open(fileUri, model)
val completionItems = languageServer.completion(newTextDocumentPositionParams(fileUri, line, column))
val actualCompletionItems = completionItems.get.items.toExpectation
assertEquals(expectedCompletionItems, actualCompletionItems)
}
protected def void testDefinition((DefinitionTestConfiguration)=>void configurator) {
val extension configuration = new DefinitionTestConfiguration
configuration.filePath = 'MyModel.' + fileExtension
configurator.apply(configuration)
val fileUri = filePath -> model
initialize
open(fileUri, model)
val definitions = languageServer.definition(newTextDocumentPositionParams(fileUri, line, column))
val actualDefinitions = definitions.get.toExpectation
assertEquals(expectedDefinitions, actualDefinitions)
}
protected def void testHover((HoverTestConfiguration)=>void configurator) {
val extension configuration = new HoverTestConfiguration
configuration.filePath = 'MyModel.' + fileExtension
configurator.apply(configuration)
val fileUri = filePath -> model
initialize
open(fileUri, model)
val hover = languageServer.hover(newTextDocumentPositionParams(fileUri, line, column))
val actualHover = hover.get.toExpectation
assertEquals(expectedHover, actualHover)
}
protected def void testDocumentSymbol((DocumentSymbolConfiguraiton)=>void configurator) {
val extension configuration = new DocumentSymbolConfiguraiton
configuration.filePath = 'MyModel.' + fileExtension
configurator.apply(configuration)
val fileUri = filePath -> model
initialize
open(fileUri, model)
val symbols = languageServer.documentSymbol(fileUri.newDocumentSymbolParams)
val String actualSymbols = symbols.get.toExpectation
assertEquals(expectedSymbols, actualSymbols)
}
protected def void testSymbol((WorkspaceSymbolConfiguraiton)=>void configurator) {
val extension configuration = new WorkspaceSymbolConfiguraiton
configuration.filePath = 'MyModel.' + fileExtension
configurator.apply(configuration)
val fileUri = filePath -> model
initialize
open(fileUri, model)
val symbols = languageServer.symbol(query.newWorkspaceSymbolParams).get
val String actualSymbols = symbols.toExpectation
assertEquals(expectedSymbols, actualSymbols)
}
protected def void testReferences((ReferenceTestConfiguration)=>void configurator) {
val extension configuration = new ReferenceTestConfiguration
configuration.filePath = 'MyModel.' + fileExtension
configurator.apply(configuration)
val fileUri = filePath -> model
initialize
open(fileUri, model)
val referenceContext = new ReferenceContextImpl
referenceContext.includeDeclaration = includeDeclaration
val definitions = languageServer.references(newReferenceParams(fileUri, line, column, referenceContext))
val actualDefinitions = definitions.get.toExpectation
assertEquals(expectedReferences, actualDefinitions)
}
}
@Accessors
class TestCompletionConfiguration extends TextDocumentPositionConfiguration {
String expectedCompletionItems = ''
}
@Accessors
class DefinitionTestConfiguration extends TextDocumentPositionConfiguration {
String expectedDefinitions = ''
}
@Accessors
class HoverTestConfiguration extends TextDocumentPositionConfiguration {
String expectedHover = ''
}
@Accessors
class DocumentSymbolConfiguraiton extends TextDocumentConfiguration {
String expectedSymbols = ''
}
@Accessors
class ReferenceTestConfiguration extends TextDocumentPositionConfiguration {
boolean includeDeclaration = false
String expectedReferences = ''
}
@Accessors
class WorkspaceSymbolConfiguraiton extends TextDocumentConfiguration {
String query = ''
String expectedSymbols = ''
}
@Accessors
class TextDocumentPositionConfiguration extends TextDocumentConfiguration {
int line = 0
int column = 0
}
@Accessors
class TextDocumentConfiguration {
String model = ''
String filePath
}

View file

@ -0,0 +1,21 @@
/*******************************************************************************
* Copyright (c) 2016 TypeFox GmbH (http://www.typefox.io) and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*******************************************************************************/
package org.eclipse.xtext.ide.tests.server
import org.eclipse.xtext.testing.AbstractLanguageServerTest
/**
* @author akosyakov - Initial contribution and API
*/
class AbstractTestLangLanguageServerTest extends AbstractLanguageServerTest {
new() {
super("testlang")
}
}