replaced yedit syntax coloring implementation with textmate.java

This commit is contained in:
Martin Lippert
2017-01-18 13:07:04 +01:00
parent 31698c10dc
commit bd62b6f732
12 changed files with 2368 additions and 89 deletions

View File

@@ -10,6 +10,7 @@ Require-Bundle: org.eclipse.jdt.launching;bundle-version="3.9.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"
org.eclipse.tm4e.core;bundle-version="1.0.0",
org.eclipse.tm4e.ui;bundle-version="1.0.0"
Import-Package: org.eclipse.jface.preference,
org.osgi.framework

View File

@@ -3,4 +3,5 @@ output.. = bin/
bin.includes = META-INF/,\
.,\
plugin.xml,\
servers/
servers/,\
syntaxes/

View File

@@ -28,11 +28,23 @@
<extension
point="org.eclipse.ui.genericeditor.presentationReconcilers">
<presentationReconciler
class="org.springframework.boot.ide.cloudfoundry.server.CloudFoundryYMLPresentationReconciler"
class="org.eclipse.tm4e.ui.text.TMPresentationReconciler"
contentType="org.springframework.boot.ide.manifest.yml">
</presentationReconciler>
</extension>
<extension
point="org.eclipse.tm4e.core.grammars">
<grammar
scopeName="source.yaml"
path="./syntaxes/YAML.tmLanguage" >
</grammar>
<scopeNameContentTypeBinding
contentTypeId="org.springframework.boot.ide.manifest.yml"
scopeName="source.yaml">
</scopeNameContentTypeBinding>
</extension>
<extension
point="org.eclipse.lsp4e.languageServer">
<server

View File

@@ -1,36 +0,0 @@
/*******************************************************************************
* 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);
}
}