added missing pieces to register boot ls for general xml file usage and get notified for changes to xml files

This commit is contained in:
Martin Lippert
2019-01-21 17:39:12 +01:00
parent b97a27992f
commit 228c3d3939
5 changed files with 23 additions and 3 deletions

View File

@@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2017, 2018 Pivotal, Inc.
* Copyright (c) 2017, 2019 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
@@ -190,8 +190,17 @@ public class STS4LanguageClientImpl extends LanguageClientImpl implements STS4La
}
}
@SuppressWarnings("unchecked")
private static void addBootRangeHighlightSupport(IEditorPart editor, ISourceViewer sourceViewer) {
if (editor instanceof AbstractDecoratedTextEditor) {
addBootRangeHighlightSupport((AbstractDecoratedTextEditor)editor, sourceViewer);
}
// else if () {
// // TODO: XML multi page editor handling for highlight support of XML source editor
// }
}
@SuppressWarnings("unchecked")
private static void addBootRangeHighlightSupport(AbstractDecoratedTextEditor editor, ISourceViewer sourceViewer) {
try {
Field f = AbstractDecoratedTextEditor.class.getDeclaredField("fSourceViewerDecorationSupport");
f.setAccessible(true);