diff --git a/org.eclipse.lsp4xml/src/main/java/org/eclipse/lsp4xml/XMLLanguageServer.java b/org.eclipse.lsp4xml/src/main/java/org/eclipse/lsp4xml/XMLLanguageServer.java index 0189ca6fa4..a76238eb2c 100644 --- a/org.eclipse.lsp4xml/src/main/java/org/eclipse/lsp4xml/XMLLanguageServer.java +++ b/org.eclipse.lsp4xml/src/main/java/org/eclipse/lsp4xml/XMLLanguageServer.java @@ -53,7 +53,7 @@ import org.eclipse.lsp4xml.settings.ServerSettings; import org.eclipse.lsp4xml.settings.SharedSettings; import org.eclipse.lsp4xml.settings.XMLGeneralClientSettings; -import org.eclipse.lsp4xml.settings.XMLExperimentalCapabilities; +import org.eclipse.lsp4xml.settings.XMLIncrementalSupportSettings; import org.eclipse.lsp4xml.settings.XMLFormattingOptions; import org.eclipse.lsp4xml.settings.capabilities.ServerCapabilitiesInitializer; import org.eclipse.lsp4xml.settings.capabilities.XMLCapabilityManager; @@ -121,7 +121,7 @@ public void initialized(InitializedParams params) { * * @param initializationOptionsSettings the XML settings */ - public void updateSettings(Object initializationOptionsSettings) { + public synchronized void updateSettings(Object initializationOptionsSettings) { if (initializationOptionsSettings == null) { return; } @@ -150,15 +150,6 @@ public void updateSettings(Object initializationOptionsSettings) { String workDir = serverSettings.getNormalizedWorkDir(); FilesUtils.setCachePathSetting(workDir); } - - // Experimental capabilities - XMLExperimentalCapabilities experimental = xmlClientSettings.getExperimental(); - if (experimental != null) { - boolean incrementalSupport = experimental.getIncrementalSupport() != null - && experimental.getIncrementalSupport().getEnabled() != null - && experimental.getIncrementalSupport().getEnabled().booleanValue(); - xmlTextDocumentService.setIncrementalSupport(incrementalSupport); - } } ContentModelSettings cmSettings = ContentModelSettings.getContentModelXMLSettings(initializationOptionsSettings); if(cmSettings != null) { diff --git a/org.eclipse.lsp4xml/src/main/java/org/eclipse/lsp4xml/XMLTextDocumentService.java b/org.eclipse.lsp4xml/src/main/java/org/eclipse/lsp4xml/XMLTextDocumentService.java index 33aa9baa1d..c49ae2ce81 100644 --- a/org.eclipse.lsp4xml/src/main/java/org/eclipse/lsp4xml/XMLTextDocumentService.java +++ b/org.eclipse.lsp4xml/src/main/java/org/eclipse/lsp4xml/XMLTextDocumentService.java @@ -45,7 +45,6 @@ import org.eclipse.lsp4j.DocumentSymbol; import org.eclipse.lsp4j.DocumentSymbolParams; import org.eclipse.lsp4j.FoldingRange; -import org.eclipse.lsp4j.FoldingRangeCapabilities; import org.eclipse.lsp4j.FoldingRangeRequestParams; import org.eclipse.lsp4j.Hover; import org.eclipse.lsp4j.Location; @@ -427,7 +426,7 @@ private XMLLanguageService getXMLLanguageService() { } public void updateCompletionSettings(CompletionSettings newCompletion) { - sharedSettings.completionSettings.setAutoCloseTags(newCompletion.isAutoCloseTags()); + sharedSettings.setCompletionSettings(newCompletion); } public boolean isIncrementalSupport() { @@ -438,10 +437,6 @@ public XMLFormattingOptions getSharedFormattingSettings() { return sharedSettings.formattingSettings; } - public void setIncrementalSupport(boolean incrementalSupport) { - this.documents.setIncremental(incrementalSupport); - } - public XMLValidationSettings getValidationSettings() { return sharedSettings.validationSettings; diff --git a/org.eclipse.lsp4xml/src/main/java/org/eclipse/lsp4xml/commons/TextDocument.java b/org.eclipse.lsp4xml/src/main/java/org/eclipse/lsp4xml/commons/TextDocument.java index 8bd667df48..2a6c79a98b 100644 --- a/org.eclipse.lsp4xml/src/main/java/org/eclipse/lsp4xml/commons/TextDocument.java +++ b/org.eclipse.lsp4xml/src/main/java/org/eclipse/lsp4xml/commons/TextDocument.java @@ -139,6 +139,8 @@ public void update(List changes) { try { synchronized (buffer) { for (TextDocumentContentChangeEvent changeEvent : changes) { + ListLineTracker lt = new ListLineTracker(); + lt.set(buffer.toString()); Range range = changeEvent.getRange(); int length = 0; @@ -147,17 +149,17 @@ public void update(List changes) { length = changeEvent.getRangeLength().intValue(); } else { // range is optional and if not given, the whole file content is replaced - length = getText().length(); - range = new Range(positionAt(0), positionAt(length)); + length = buffer.toString().length(); + range = new Range(lt.getPositionAt(0), lt.getPositionAt(length)); } String text = changeEvent.getText(); - int startOffset = offsetAt(range.getStart()); + int startOffset = lt.getOffsetAt(range.getStart()); buffer.replace(startOffset, startOffset + length, text); } setText(buffer.toString()); } } catch (BadLocationException e) { - // Should never occurs. + // Should never occur. } } else { // like vscode does, get the last changes diff --git a/org.eclipse.lsp4xml/src/main/java/org/eclipse/lsp4xml/commons/TextDocuments.java b/org.eclipse.lsp4xml/src/main/java/org/eclipse/lsp4xml/commons/TextDocuments.java index c352fa224c..5053e273f2 100644 --- a/org.eclipse.lsp4xml/src/main/java/org/eclipse/lsp4xml/commons/TextDocuments.java +++ b/org.eclipse.lsp4xml/src/main/java/org/eclipse/lsp4xml/commons/TextDocuments.java @@ -26,21 +26,13 @@ */ public class TextDocuments implements ITextDocumentFactory { - private boolean incremental; + private final boolean incremental; private final Map documents; public TextDocuments() { documents = new HashMap<>(); - } - - /** - * Set the incremental support. - * - * @param incremental - */ - public void setIncremental(boolean incremental) { - this.incremental = incremental; + incremental = true; // Quick fix to set incremental documents.values().forEach(document -> document.setIncremental(incremental)); } diff --git a/org.eclipse.lsp4xml/src/main/java/org/eclipse/lsp4xml/dom/DTDNotationDecl.java b/org.eclipse.lsp4xml/src/main/java/org/eclipse/lsp4xml/dom/DTDNotationDecl.java index 33d62b7db3..498b113bdc 100644 --- a/org.eclipse.lsp4xml/src/main/java/org/eclipse/lsp4xml/dom/DTDNotationDecl.java +++ b/org.eclipse.lsp4xml/src/main/java/org/eclipse/lsp4xml/dom/DTDNotationDecl.java @@ -12,7 +12,6 @@ package org.eclipse.lsp4xml.dom; -import java.util.ArrayList; /** * DTDNotationDecl diff --git a/org.eclipse.lsp4xml/src/main/java/org/eclipse/lsp4xml/settings/XMLExperimentalCapabilities.java b/org.eclipse.lsp4xml/src/main/java/org/eclipse/lsp4xml/settings/XMLExperimentalSettings.java similarity index 65% rename from org.eclipse.lsp4xml/src/main/java/org/eclipse/lsp4xml/settings/XMLExperimentalCapabilities.java rename to org.eclipse.lsp4xml/src/main/java/org/eclipse/lsp4xml/settings/XMLExperimentalSettings.java index ea368346fb..bad45b44cf 100644 --- a/org.eclipse.lsp4xml/src/main/java/org/eclipse/lsp4xml/settings/XMLExperimentalCapabilities.java +++ b/org.eclipse.lsp4xml/src/main/java/org/eclipse/lsp4xml/settings/XMLExperimentalSettings.java @@ -14,15 +14,15 @@ * XML experimental capabilities. * */ -public class XMLExperimentalCapabilities { +public class XMLExperimentalSettings { - private XMLIncrementalSupportCapabilities incrementalSupport; + private XMLIncrementalSupportSettings incrementalSupport; - public void setIncrementalSupport(XMLIncrementalSupportCapabilities incrementalSupport) { + public void setIncrementalSupport(XMLIncrementalSupportSettings incrementalSupport) { this.incrementalSupport = incrementalSupport; } - public XMLIncrementalSupportCapabilities getIncrementalSupport() { + public XMLIncrementalSupportSettings getIncrementalSupport() { return incrementalSupport; } } diff --git a/org.eclipse.lsp4xml/src/main/java/org/eclipse/lsp4xml/settings/XMLGeneralClientSettings.java b/org.eclipse.lsp4xml/src/main/java/org/eclipse/lsp4xml/settings/XMLGeneralClientSettings.java index 83c40c7116..5dd8df2d3c 100644 --- a/org.eclipse.lsp4xml/src/main/java/org/eclipse/lsp4xml/settings/XMLGeneralClientSettings.java +++ b/org.eclipse.lsp4xml/src/main/java/org/eclipse/lsp4xml/settings/XMLGeneralClientSettings.java @@ -37,8 +37,6 @@ public class XMLGeneralClientSettings { private LogsSettings logs; private XMLFormattingOptions format; - - private XMLExperimentalCapabilities experimental; private CompletionSettings completion; @@ -59,10 +57,6 @@ public void setFormat(XMLFormattingOptions format) { public XMLFormattingOptions getFormat() { return format; } - - public XMLExperimentalCapabilities getExperimental() { - return experimental; - } /** * Set completion settings diff --git a/org.eclipse.lsp4xml/src/main/java/org/eclipse/lsp4xml/settings/XMLIncrementalSupportCapabilities.java b/org.eclipse.lsp4xml/src/main/java/org/eclipse/lsp4xml/settings/XMLIncrementalSupportSettings.java similarity index 82% rename from org.eclipse.lsp4xml/src/main/java/org/eclipse/lsp4xml/settings/XMLIncrementalSupportCapabilities.java rename to org.eclipse.lsp4xml/src/main/java/org/eclipse/lsp4xml/settings/XMLIncrementalSupportSettings.java index 92de28d239..7ac965ae1c 100644 --- a/org.eclipse.lsp4xml/src/main/java/org/eclipse/lsp4xml/settings/XMLIncrementalSupportCapabilities.java +++ b/org.eclipse.lsp4xml/src/main/java/org/eclipse/lsp4xml/settings/XMLIncrementalSupportSettings.java @@ -14,11 +14,14 @@ * XML experimental incremental support capabilities. * */ -public class XMLIncrementalSupportCapabilities { +public class XMLIncrementalSupportSettings { private Boolean enabled; public Boolean getEnabled() { + if(enabled == null) { + enabled = true; // default on + } return enabled; } diff --git a/org.eclipse.lsp4xml/src/main/java/org/eclipse/lsp4xml/settings/capabilities/ServerCapabilitiesConstants.java b/org.eclipse.lsp4xml/src/main/java/org/eclipse/lsp4xml/settings/capabilities/ServerCapabilitiesConstants.java index 82a4fdc30c..d7a48b2b56 100644 --- a/org.eclipse.lsp4xml/src/main/java/org/eclipse/lsp4xml/settings/capabilities/ServerCapabilitiesConstants.java +++ b/org.eclipse.lsp4xml/src/main/java/org/eclipse/lsp4xml/settings/capabilities/ServerCapabilitiesConstants.java @@ -72,6 +72,6 @@ private ServerCapabilitiesConstants() { public static final String WORKSPACE_WATCHED_FILES_ID = UUID.randomUUID().toString(); public static final CompletionOptions DEFAULT_COMPLETION_OPTIONS = new CompletionOptions(false, Arrays.asList(".", ":", "<", "\"", "=", "/", "?", "\'")); - public static final TextDocumentSyncKind DEFAULT_SYNC_OPTION = TextDocumentSyncKind.Full; + public static final TextDocumentSyncKind DEFAULT_SYNC_OPTION = TextDocumentSyncKind.Incremental; public static final DocumentLinkOptions DEFAULT_LINK_OPTIONS = new DocumentLinkOptions(true); } \ No newline at end of file diff --git a/org.eclipse.lsp4xml/src/main/java/org/eclipse/lsp4xml/settings/capabilities/ServerCapabilitiesInitializer.java b/org.eclipse.lsp4xml/src/main/java/org/eclipse/lsp4xml/settings/capabilities/ServerCapabilitiesInitializer.java index a747b34f9a..3d6c0c4951 100644 --- a/org.eclipse.lsp4xml/src/main/java/org/eclipse/lsp4xml/settings/capabilities/ServerCapabilitiesInitializer.java +++ b/org.eclipse.lsp4xml/src/main/java/org/eclipse/lsp4xml/settings/capabilities/ServerCapabilitiesInitializer.java @@ -38,18 +38,13 @@ public static ServerCapabilities getNonDynamicServerCapabilities(ClientCapabilit boolean isIncremental) { ServerCapabilities serverCapabilities = new ServerCapabilities(); - serverCapabilities.setTextDocumentSync(DEFAULT_SYNC_OPTION); - - serverCapabilities - .setTextDocumentSync(isIncremental ? TextDocumentSyncKind.Incremental : TextDocumentSyncKind.Full); + serverCapabilities.setTextDocumentSync(isIncremental ? TextDocumentSyncKind.Incremental : TextDocumentSyncKind.Full); serverCapabilities.setDocumentSymbolProvider(!clientCapabilities.isDocumentSymbolDynamicRegistered()); serverCapabilities.setDocumentHighlightProvider(!clientCapabilities.isDocumentHighlightDynamicRegistered()); serverCapabilities.setCodeActionProvider(!clientCapabilities.isCodeActionDynamicRegistered()); - serverCapabilities - .setDocumentFormattingProvider(!clientCapabilities.isFormattingDynamicRegistrationSupported()); - serverCapabilities.setDocumentRangeFormattingProvider( - !clientCapabilities.isRangeFormattingDynamicRegistrationSupported()); + serverCapabilities.setDocumentFormattingProvider(!clientCapabilities.isFormattingDynamicRegistrationSupported()); + serverCapabilities.setDocumentRangeFormattingProvider(!clientCapabilities.isRangeFormattingDynamicRegistrationSupported()); serverCapabilities.setHoverProvider(!clientCapabilities.isHoverDynamicRegistered()); serverCapabilities.setRenameProvider(!clientCapabilities.isRenameDynamicRegistrationSupported()); serverCapabilities.setFoldingRangeProvider(!clientCapabilities.isRangeFoldingDynamicRegistrationSupported()); diff --git a/org.eclipse.lsp4xml/src/main/java/org/eclipse/lsp4xml/settings/capabilities/XMLCapabilityManager.java b/org.eclipse.lsp4xml/src/main/java/org/eclipse/lsp4xml/settings/capabilities/XMLCapabilityManager.java index e899b532d9..a98e134570 100644 --- a/org.eclipse.lsp4xml/src/main/java/org/eclipse/lsp4xml/settings/capabilities/XMLCapabilityManager.java +++ b/org.eclipse.lsp4xml/src/main/java/org/eclipse/lsp4xml/settings/capabilities/XMLCapabilityManager.java @@ -20,6 +20,8 @@ import static org.eclipse.lsp4xml.settings.capabilities.ServerCapabilitiesConstants.FOLDING_RANGE_ID; import static org.eclipse.lsp4xml.settings.capabilities.ServerCapabilitiesConstants.FORMATTING_ID; import static org.eclipse.lsp4xml.settings.capabilities.ServerCapabilitiesConstants.FORMATTING_RANGE_ID; +import static org.eclipse.lsp4xml.settings.capabilities.ServerCapabilitiesConstants.SYNC_ID; +import static org.eclipse.lsp4xml.settings.capabilities.ServerCapabilitiesConstants.DEFAULT_SYNC_OPTION; import static org.eclipse.lsp4xml.settings.capabilities.ServerCapabilitiesConstants.HOVER_ID; import static org.eclipse.lsp4xml.settings.capabilities.ServerCapabilitiesConstants.LINK_ID; import static org.eclipse.lsp4xml.settings.capabilities.ServerCapabilitiesConstants.RENAME_ID; @@ -40,11 +42,13 @@ import org.eclipse.lsp4j.ClientCapabilities; import org.eclipse.lsp4j.Registration; import org.eclipse.lsp4j.RegistrationParams; +import org.eclipse.lsp4j.TextDocumentSyncKind; import org.eclipse.lsp4j.Unregistration; import org.eclipse.lsp4j.UnregistrationParams; import org.eclipse.lsp4j.services.LanguageClient; import org.eclipse.lsp4xml.XMLTextDocumentService; import org.eclipse.lsp4xml.settings.XMLFormattingOptions; +import org.eclipse.lsp4xml.settings.XMLIncrementalSupportSettings; /** * Manager for capability related tasks @@ -147,8 +151,10 @@ public void initializeCapabilities() { } /** - * Registers all capabilities that this server can support client side - * preferences to turn on/off + * Registers(indicates the servers ability to support the service) all capabilities that have the ability to be turned + * on/off on the client side through preferences. + * + * In the case the preference is set to off/false this server will tell the cliet it does not support this capability. * * If a capability is not dynamic, it's handled by * {@link ServerCapabilitiesInitializer} diff --git a/org.eclipse.lsp4xml/src/test/java/org/eclipse/lsp4xml/services/IncrementalParsingTest.java b/org.eclipse.lsp4xml/src/test/java/org/eclipse/lsp4xml/services/IncrementalParsingTest.java new file mode 100644 index 0000000000..398eae1d59 --- /dev/null +++ b/org.eclipse.lsp4xml/src/test/java/org/eclipse/lsp4xml/services/IncrementalParsingTest.java @@ -0,0 +1,250 @@ +/******************************************************************************* +* Copyright (c) 2019 Red Hat Inc. and others. +* All rights reserved. This program and the accompanying materials +* which accompanies this distribution, and is available at +* http://www.eclipse.org/legal/epl-v20.html +* +* Contributors: +* Red Hat Inc. - initial API and implementation +*******************************************************************************/ + +package org.eclipse.lsp4xml.services; + +import java.util.ArrayList; + +import org.eclipse.lsp4j.Position; +import org.eclipse.lsp4j.Range; +import org.eclipse.lsp4j.TextDocumentContentChangeEvent; +import org.eclipse.lsp4xml.commons.TextDocument; +import org.junit.Test; +import static org.junit.Assert.*; + +/** + * IncrementalParsingTest + */ +public class IncrementalParsingTest { + String textTemplate = + "\r\n" + + "\r\n" + + "\r\n" + + "\r\n" + + "\r\n" + + "\r\n" + + "\r\n" + + "\r\n"; + + @Test + public void testBasicChange() { + String text = + "<>\r\n" + /// <-- inserting 'a' in tag name + " \r\n" + + " \r\n" + + "\r\n"; + + String expectedText = + "\r\n" + /// <-- inserted 'a' in tag name + " \r\n" + + " \r\n" + + "\r\n"; + + TextDocument document = new TextDocument(text, "uri"); + document.setIncremental(true); + + Range range1 = new Range(new Position(0, 1), new Position(0,1)); + TextDocumentContentChangeEvent change1 = new TextDocumentContentChangeEvent(range1, 0, "a"); + + ArrayList changes = new ArrayList(); + changes.add(change1); + + document.update(changes); + + assertEquals(expectedText, document.getText()); + + } + + @Test + public void testBasicChangeWord() { + String text = + "<>\r\n" + /// <-- inserting 'a' in tag name + " \r\n" + + " \r\n" + + "\r\n"; + + String expectedText = + "\r\n" + /// <-- inserted 'a' in tag name + " \r\n" + + " \r\n" + + "\r\n"; + + TextDocument document = new TextDocument(text, "uri"); + document.setIncremental(true); + + Range range1 = new Range(new Position(0, 1), new Position(0,1)); + TextDocumentContentChangeEvent change1 = new TextDocumentContentChangeEvent(range1, 0, "aaa"); + + ArrayList changes = new ArrayList(); + changes.add(change1); + + document.update(changes); + + assertEquals(expectedText, document.getText()); + } + + @Test + public void testChangeReplaceRange() { + String text = + "\r\n" + /// <-- inserting 'a' in tag name + " \r\n" + + " \r\n" + + "\r\n"; + + String expectedText = + "\r\n" + /// <-- inserted 'a' in tag name + " \r\n" + + " \r\n" + + "\r\n"; + + TextDocument document = new TextDocument(text, "uri"); + document.setIncremental(true); + + Range range1 = new Range(new Position(0, 1), new Position(0,4)); + TextDocumentContentChangeEvent change1 = new TextDocumentContentChangeEvent(range1, 3, "aaa"); + + ArrayList changes = new ArrayList(); + changes.add(change1); + + document.update(changes); + + assertEquals(expectedText, document.getText()); + } + + @Test + public void testBasicChangeMultipleChanges() { + String text = + "<>\r\n" + // <-- inserting 'a' in tag name + " \r\n" + + " \r\n" + // <-- inserting 'b' in tag name + "\r\n"; + + String expectedText = + "\r\n" + // <-- inserted 'a' in tag name + " \r\n" + + " \r\n" + // <-- inserted 'b' in tag name + "\r\n"; + + TextDocument document = new TextDocument(text, "uri"); + document.setIncremental(true); + + Range range1 = new Range(new Position(0, 1), new Position(0,1)); + TextDocumentContentChangeEvent change1 = new TextDocumentContentChangeEvent(range1, 0, "a"); + + Range range2 = new Range(new Position(2, 4), new Position(2,4)); + TextDocumentContentChangeEvent change2 = new TextDocumentContentChangeEvent(range2, 0, "b"); + + ArrayList changes = new ArrayList(); + // The order they are added in is backwards with the largest offset being first + changes.add(change2); + changes.add(change1); + + document.update(changes); + + assertEquals(expectedText, document.getText()); + + } + + @Test + public void testBasicChangeMultipleChangesReplaceRange() { + String text = + "\r\n" + // <-- inserting 'a' in tag name + " \r\n" + + " \r\n" + // <-- inserting 'b' in tag name + "\r\n"; + + String expectedText = + "\r\n" + // <-- inserted 'a' in tag name + " \r\n" + + " \r\n" + // <-- inserted 'b' in tag name + "\r\n"; + + TextDocument document = new TextDocument(text, "uri"); + document.setIncremental(true); + + Range range1 = new Range(new Position(0, 1), new Position(0,4)); + TextDocumentContentChangeEvent change1 = new TextDocumentContentChangeEvent(range1, 3, "a"); + + Range range2 = new Range(new Position(2, 4), new Position(2,7)); + TextDocumentContentChangeEvent change2 = new TextDocumentContentChangeEvent(range2, 3, "b"); + + ArrayList changes = new ArrayList(); + // The order they are added in is backwards with the largest offset being first + changes.add(change2); + changes.add(change1); + + document.update(changes); + + assertEquals(expectedText, document.getText()); + + } + + @Test + public void testBasicDeletionChange() { + String text = + "\r\n" + /// <-- deleting 'a' in tag name + " \r\n" + + " \r\n" + + "\r\n"; + + String expectedText = + "\r\n" + /// <-- deleted 'a' in tag name + " \r\n" + + " \r\n" + + "\r\n"; + + TextDocument document = new TextDocument(text, "uri"); + document.setIncremental(true); + + Range range1 = new Range(new Position(0, 2), new Position(0,3)); + TextDocumentContentChangeEvent change1 = new TextDocumentContentChangeEvent(range1, 1, ""); + + ArrayList changes = new ArrayList(); + changes.add(change1); + + document.update(changes); + + assertEquals(expectedText, document.getText()); + + } + + @Test + public void testMultipleDeletionChanges() { + String text = + "\r\n" + /// <-- deleting 'a' in tag name + " \r\n" + + " \r\n" + + "\r\n"; + + String expectedText = + "\r\n" + /// <-- deleted 'a' in tag name + " \r\n" + + " \r\n" + + "\r\n"; + + TextDocument document = new TextDocument(text, "uri"); + document.setIncremental(true); + + Range range1 = new Range(new Position(0, 2), new Position(0,3)); + TextDocumentContentChangeEvent change1 = new TextDocumentContentChangeEvent(range1, 1, ""); + + Range range2 = new Range(new Position(2, 5), new Position(2,6)); + TextDocumentContentChangeEvent change2 = new TextDocumentContentChangeEvent(range2, 1, ""); + + ArrayList changes = new ArrayList(); + changes.add(change2); + changes.add(change1); + + document.update(changes); + + assertEquals(expectedText, document.getText()); + + } +} \ No newline at end of file diff --git a/org.eclipse.lsp4xml/src/test/java/org/eclipse/lsp4xml/settings/capabilities/XMLCapabilitiesTest.java b/org.eclipse.lsp4xml/src/test/java/org/eclipse/lsp4xml/settings/capabilities/XMLCapabilitiesTest.java index 2306b1743d..ef36f3b924 100644 --- a/org.eclipse.lsp4xml/src/test/java/org/eclipse/lsp4xml/settings/capabilities/XMLCapabilitiesTest.java +++ b/org.eclipse.lsp4xml/src/test/java/org/eclipse/lsp4xml/settings/capabilities/XMLCapabilitiesTest.java @@ -42,7 +42,6 @@ import org.eclipse.lsp4j.TextDocumentClientCapabilities; import org.eclipse.lsp4j.services.LanguageClient; import org.eclipse.lsp4xml.XMLTextDocumentService; -import org.eclipse.lsp4xml.settings.XMLFormattingOptions; import org.junit.Before; import org.junit.Test;