unified language server support plugins for eclipse

This commit is contained in:
Martin Lippert
2016-12-02 09:54:09 +01:00
parent 623e2d1f28
commit c41e4525e6
22 changed files with 184 additions and 301 deletions

View File

@@ -1,7 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<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="src" path="src"/>
<classpathentry kind="output" path="bin"/>
</classpath>

View File

@@ -1,28 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>org.springframework.boot.ide.properties.editors</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.pde.ManifestBuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.pde.SchemaBuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.pde.PluginNature</nature>
<nature>org.eclipse.jdt.core.javanature</nature>
</natures>
</projectDescription>

View File

@@ -1,7 +0,0 @@
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
org.eclipse.jdt.core.compiler.compliance=1.8
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
org.eclipse.jdt.core.compiler.source=1.8

View File

@@ -1,14 +0,0 @@
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: Spring Boot IDE LSP-based Property Editors
Bundle-SymbolicName: org.springframework.boot.ide.properties.editors;singleton:=true
Bundle-Version: 4.0.0.qualifier
Bundle-Vendor: Pivotal, Inc.
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
Require-Bundle: org.eclipse.ui.genericeditor;bundle-version="1.0.0",
org.eclipse.core.runtime;bundle-version="3.12.0",
org.eclipse.jface.text;bundle-version="3.11.100",
org.eclipse.jdt.ui;bundle-version="3.13.0",
org.dadacoalition.yedit;bundle-version="1.0.20",
org.eclipse.lsp4e;bundle-version="0.1.0"
Import-Package: org.eclipse.jface.preference

View File

@@ -1,5 +0,0 @@
source.. = src/
output.. = bin/
bin.includes = META-INF/,\
.,\
plugin.xml

View File

@@ -1,98 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<?eclipse version="3.4"?>
<plugin>
<extension
point="org.eclipse.core.contenttype.contentTypes">
<content-type
base-type="org.eclipse.jdt.core.javaProperties"
default-charset="ISO-8859-1"
id="org.springframework.boot.ide.properties.application.properties"
name="Spring Properties File"
priority="high">
</content-type>
<file-association
content-type="org.springframework.boot.ide.properties.application.properties"
file-names="application.properties,application-dev.properties">
</file-association>
</extension>
<extension
point="org.eclipse.core.contenttype.contentTypes">
<content-type
base-type="org.eclipse.core.runtime.text"
default-charset="UTF-8"
id="org.springframework.boot.ide.properties.application.yml"
name="Spring Yaml Properties File"
priority="high">
</content-type>
<file-association
content-type="org.springframework.boot.ide.properties.application.yml"
file-names="application.yml,bootstrap.yml,application-dev.yml">
</file-association>
</extension>
<extension
point="org.eclipse.core.contenttype.contentTypes">
<content-type
base-type="org.eclipse.core.runtime.text"
default-charset="UTF-8"
id="org.springframework.boot.ide.manifest.yml"
name="Cloudfoundry Manifest"
priority="high">
</content-type>
<file-association
content-type="org.springframework.boot.ide.manifest.yml"
file-names="manifest.yml">
</file-association>
</extension>
<extension
point="org.eclipse.ui.editors">
<editorContentTypeBinding
contentTypeId="org.springframework.boot.ide.properties.application.properties"
editorId="org.eclipse.ui.genericeditor.GenericEditor">
</editorContentTypeBinding>
</extension>
<extension
point="org.eclipse.ui.editors">
<editorContentTypeBinding
contentTypeId="org.springframework.boot.ide.properties.application.yml"
editorId="org.eclipse.ui.genericeditor.GenericEditor">
</editorContentTypeBinding>
</extension>
<extension
point="org.eclipse.ui.editors">
<editorContentTypeBinding
contentTypeId="org.springframework.boot.ide.manifest.yml"
editorId="org.eclipse.ui.genericeditor.GenericEditor">
</editorContentTypeBinding>
</extension>
<extension
point="org.eclipse.ui.genericeditor.presentationReconcilers">
<presentationReconciler
class="org.springframework.boot.ide.properties.editors.SpringPropertiesPresentationReconciler"
contentType="org.springframework.boot.ide.properties.application.properties">
</presentationReconciler>
</extension>
<extension
point="org.eclipse.ui.genericeditor.presentationReconcilers">
<presentationReconciler
class="org.springframework.boot.ide.properties.editors.SpringYMLPresentationReconciler"
contentType="org.springframework.boot.ide.properties.application.yml">
</presentationReconciler>
</extension>
<extension
point="org.eclipse.ui.genericeditor.presentationReconcilers">
<presentationReconciler
class="org.springframework.boot.ide.properties.editors.SpringYMLPresentationReconciler"
contentType="org.springframework.boot.ide.manifest.yml">
</presentationReconciler>
</extension>
</plugin>

View File

@@ -1,37 +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.springframework.boot.ide</groupId>
<artifactId>org.springframework.boot.ide</artifactId>
<version>4.0.0-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
<artifactId>org.springframework.boot.ide.properties.editors</artifactId>
<packaging>eclipse-plugin</packaging>
<name>org.springframework.boot.ide.properties.editors</name>
<build>
<plugins>
<plugin>
<groupId>org.eclipse.tycho</groupId>
<artifactId>tycho-p2-plugin</artifactId>
<version>${tycho-version}</version>
<executions>
<execution>
<id>second-generate-p2-metadata</id>
<goals>
<goal>p2-metadata</goal>
</goals>
<phase>verify</phase>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>

View File

@@ -1,17 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>org.springframework.boot.ide.properties.feature</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.pde.FeatureBuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.pde.FeatureNature</nature>
</natures>
</projectDescription>

View File

@@ -1 +0,0 @@
bin.includes = feature.xml

View File

@@ -1,20 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<feature
id="org.springframework.boot.ide.properties.feature"
label="Spring Boot IDE Property Editing Feature"
version="4.0.0.qualifier"
provider-name="Pivotal, Inc.">
<requires>
<import plugin="org.eclipse.ui.genericeditor"/>
<import plugin="org.eclipse.lsp4e"/>
</requires>
<plugin
id="org.springframework.boot.ide.properties.editors"
download-size="0"
install-size="0"
version="0.0.0"
unpack="false"/>
</feature>

View File

@@ -1,35 +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.springframework.boot.ide</groupId>
<artifactId>org.springframework.boot.ide</artifactId>
<version>4.0.0-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
<artifactId>org.springframework.boot.ide.properties.feature</artifactId>
<packaging>eclipse-feature</packaging>
<build>
<plugins>
<plugin>
<groupId>org.eclipse.tycho</groupId>
<artifactId>tycho-p2-plugin</artifactId>
<version>${tycho-version}</version>
<executions>
<execution>
<id>second-generate-p2-metadata</id>
<goals>
<goal>p2-metadata</goal>
</goals>
<phase>verify</phase>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>

View File

@@ -1,19 +1,21 @@
<?xml version="1.0" encoding="UTF-8"?>
<feature
id="org.springframework.boot.ide.cloudfoundry.server.feature"
label="Spring Boot IDE Cloud Foundry Manifest Language Server Feature"
version="4.0.0.qualifier"
provider-name="Pivotal, Inc.">
id="org.springframework.boot.ide.cloudfoundry.server.feature"
label="Spring Boot IDE Cloud Foundry Manifest Language Server Feature"
version="4.0.0.qualifier"
provider-name="Pivotal, Inc.">
<requires>
<import plugin="org.eclipse.lsp4e"/>
</requires>
<requires>
<import plugin="org.eclipse.ui.genericeditor"/>
<import plugin="org.eclipse.lsp4e"/>
</requires>
<plugin
id="org.springframework.boot.ide.cloudfoundry.server"
download-size="0"
install-size="0"
version="0.0.0"
unpack="false"/>
<plugin
id="org.springframework.boot.ide.cloudfoundry.server"
download-size="0"
install-size="0"
version="0.0.0"
unpack="false">
</plugin>
</feature>

View File

@@ -6,5 +6,10 @@ Bundle-Version: 4.0.0.qualifier
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
Require-Bundle: org.eclipse.jdt.launching;bundle-version="3.9.0",
org.eclipse.core.runtime;bundle-version="3.12.0",
org.eclipse.lsp4e;bundle-version="0.1.0"
Import-Package: org.osgi.framework
org.eclipse.lsp4e;bundle-version="0.1.0",
org.eclipse.ui.genericeditor;bundle-version="1.0.0",
org.eclipse.jface.text;bundle-version="3.11.100",
org.eclipse.jdt.ui;bundle-version="3.13.0",
org.dadacoalition.yedit;bundle-version="1.0.18"
Import-Package: org.eclipse.jface.preference,
org.osgi.framework

View File

@@ -2,6 +2,37 @@
<?eclipse version="3.4"?>
<plugin>
<extension
point="org.eclipse.core.contenttype.contentTypes">
<content-type
base-type="org.eclipse.core.runtime.text"
default-charset="UTF-8"
id="org.springframework.boot.ide.manifest.yml"
name="Cloudfoundry Manifest"
priority="high">
</content-type>
<file-association
content-type="org.springframework.boot.ide.manifest.yml"
file-names="manifest.yml">
</file-association>
</extension>
<extension
point="org.eclipse.ui.editors">
<editorContentTypeBinding
contentTypeId="org.springframework.boot.ide.manifest.yml"
editorId="org.eclipse.ui.genericeditor.GenericEditor">
</editorContentTypeBinding>
</extension>
<extension
point="org.eclipse.ui.genericeditor.presentationReconcilers">
<presentationReconciler
class="org.springframework.boot.ide.cloudfoundry.server.CloudFoundryYMLPresentationReconciler"
contentType="org.springframework.boot.ide.manifest.yml">
</presentationReconciler>
</extension>
<extension
point="org.eclipse.lsp4e.languageServer">
<server

View File

@@ -0,0 +1,36 @@
/*******************************************************************************
* Copyright (c) 2016 Pivotal, Inc.
* 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
*
* Contributors:
* Pivotal, Inc. - initial API and implementation
*******************************************************************************/
package org.springframework.boot.ide.cloudfoundry.server;
import org.dadacoalition.yedit.editor.ColorManager;
import org.dadacoalition.yedit.editor.YEditDamageRepairer;
import org.dadacoalition.yedit.editor.scanner.YAMLScanner;
import org.eclipse.jface.text.IDocument;
import org.eclipse.jface.text.presentation.PresentationReconciler;
import org.eclipse.jface.text.rules.DefaultDamagerRepairer;
import org.eclipse.jface.text.rules.ITokenScanner;
/**
* @author Martin Lippert
*/
public class CloudFoundryYMLPresentationReconciler extends PresentationReconciler {
public CloudFoundryYMLPresentationReconciler() {
ColorManager colorManager = new ColorManager();
ITokenScanner yamlScanner = new YAMLScanner( colorManager );
DefaultDamagerRepairer dr = new YEditDamageRepairer(yamlScanner);
this.setDamager(dr, IDocument.DEFAULT_CONTENT_TYPE);
this.setRepairer(dr, IDocument.DEFAULT_CONTENT_TYPE);
}
}

View File

@@ -1,19 +1,21 @@
<?xml version="1.0" encoding="UTF-8"?>
<feature
id="org.springframework.boot.ide.properties.servers.feature"
label="Spring Boot IDE Property Editing Language Server Feature"
version="4.0.0.qualifier"
provider-name="Pivotal, Inc.">
id="org.springframework.boot.ide.properties.servers.feature"
label="Spring Boot IDE Property Editing Language Server Feature"
version="4.0.0.qualifier"
provider-name="Pivotal, Inc.">
<requires>
<import plugin="org.eclipse.lsp4e"/>
</requires>
<requires>
<import plugin="org.eclipse.ui.genericeditor"/>
<import plugin="org.eclipse.lsp4e"/>
</requires>
<plugin
id="org.springframework.boot.ide.properties.servers"
download-size="0"
install-size="0"
version="0.0.0"
unpack="false"/>
<plugin
id="org.springframework.boot.ide.properties.servers"
download-size="0"
install-size="0"
version="0.0.0"
unpack="false">
</plugin>
</feature>

View File

@@ -6,5 +6,10 @@ Bundle-Version: 4.0.0.qualifier
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
Require-Bundle: org.eclipse.jdt.launching;bundle-version="3.9.0",
org.eclipse.core.runtime;bundle-version="3.12.0",
org.eclipse.lsp4e;bundle-version="0.1.0"
Import-Package: org.osgi.framework
org.eclipse.lsp4e;bundle-version="0.1.0",
org.eclipse.ui.genericeditor;bundle-version="1.0.0",
org.eclipse.jface.text;bundle-version="3.11.100",
org.eclipse.jdt.ui;bundle-version="3.13.0",
org.dadacoalition.yedit;bundle-version="1.0.18"
Import-Package: org.eclipse.jface.preference,
org.osgi.framework

View File

@@ -2,6 +2,68 @@
<?eclipse version="3.4"?>
<plugin>
<extension
point="org.eclipse.core.contenttype.contentTypes">
<content-type
base-type="org.eclipse.jdt.core.javaProperties"
default-charset="ISO-8859-1"
id="org.springframework.boot.ide.properties.application.properties"
name="Spring Properties File"
priority="high">
</content-type>
<file-association
content-type="org.springframework.boot.ide.properties.application.properties"
file-names="application.properties,application-dev.properties">
</file-association>
</extension>
<extension
point="org.eclipse.core.contenttype.contentTypes">
<content-type
base-type="org.eclipse.core.runtime.text"
default-charset="UTF-8"
id="org.springframework.boot.ide.properties.application.yml"
name="Spring Yaml Properties File"
priority="high">
</content-type>
<file-association
content-type="org.springframework.boot.ide.properties.application.yml"
file-names="application.yml,bootstrap.yml,application-dev.yml">
</file-association>
</extension>
<extension
point="org.eclipse.ui.editors">
<editorContentTypeBinding
contentTypeId="org.springframework.boot.ide.properties.application.properties"
editorId="org.eclipse.ui.genericeditor.GenericEditor">
</editorContentTypeBinding>
</extension>
<extension
point="org.eclipse.ui.editors">
<editorContentTypeBinding
contentTypeId="org.springframework.boot.ide.properties.application.yml"
editorId="org.eclipse.ui.genericeditor.GenericEditor">
</editorContentTypeBinding>
</extension>
<extension
point="org.eclipse.ui.genericeditor.presentationReconcilers">
<presentationReconciler
class="org.springframework.boot.ide.properties.servers.SpringPropertiesPresentationReconciler"
contentType="org.springframework.boot.ide.properties.application.properties">
</presentationReconciler>
</extension>
<extension
point="org.eclipse.ui.genericeditor.presentationReconcilers">
<presentationReconciler
class="org.springframework.boot.ide.properties.servers.SpringYMLPresentationReconciler"
contentType="org.springframework.boot.ide.properties.application.yml">
</presentationReconciler>
</extension>
<extension
point="org.eclipse.lsp4e.languageServer">
<server

View File

@@ -8,7 +8,7 @@
* Contributors:
* Pivotal, Inc. - initial API and implementation
*******************************************************************************/
package org.springframework.boot.ide.properties.editors;
package org.springframework.boot.ide.properties.servers;
import org.eclipse.jdt.internal.ui.JavaPlugin;
import org.eclipse.jdt.internal.ui.propertiesfileeditor.IPropertiesFilePartitions;

View File

@@ -8,7 +8,7 @@
* Contributors:
* Pivotal, Inc. - initial API and implementation
*******************************************************************************/
package org.springframework.boot.ide.properties.editors;
package org.springframework.boot.ide.properties.servers;
import org.dadacoalition.yedit.editor.ColorManager;
import org.dadacoalition.yedit.editor.YEditDamageRepairer;

View File

@@ -16,4 +16,8 @@
<category name="deps"/>
</bundle>
<bundle id="org.dadacoalition.yedit">
<category name="deps"/>
</bundle>
</site>

View File

@@ -91,6 +91,11 @@
<layout>p2</layout>
<url>http://download.eclipse.org/lsp4e/snapshots/</url>
</repository>
<repository>
<id>yedit</id>
<layout>p2</layout>
<url>http://dist.springsource.com/release/TOOLS/third-party/yedit</url>
</repository>
</repositories>
</profile>