unified language server support plugins for eclipse
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user