-
Notifications
You must be signed in to change notification settings - Fork 93
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add support for incremental text document (not XML document) to minimize
JSON didChange request size when document changed. This incremental support is only available with experimental.incrementalSupport.enabled (see #133)
- Loading branch information
1 parent
bad8ffb
commit 79055fb
Showing
9 changed files
with
218 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
30 changes: 30 additions & 0 deletions
30
org.eclipse.lsp4xml/src/main/java/org/eclipse/lsp4xml/commons/ITextDocumentFactory.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
/** | ||
* Copyright (c) 2018 Angelo ZERR. | ||
* 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: | ||
* Angelo Zerr <angelo.zerr@gmail.com> - initial API and implementation | ||
*/ | ||
package org.eclipse.lsp4xml.commons; | ||
|
||
import org.eclipse.lsp4j.TextDocumentItem; | ||
|
||
/** | ||
* {@link TextDocument} factory. | ||
* | ||
*/ | ||
public interface ITextDocumentFactory { | ||
|
||
/** | ||
* Create a {@link TextDocument} instance from the given | ||
* {@link TextDocumentItem}. | ||
* | ||
* @param document | ||
* @return a {@link TextDocument} instance from the given | ||
* {@link TextDocumentItem}. | ||
*/ | ||
TextDocument createDocument(TextDocumentItem document); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
28 changes: 28 additions & 0 deletions
28
...lipse.lsp4xml/src/main/java/org/eclipse/lsp4xml/settings/XMLExperimentalCapabilities.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
/** | ||
* Copyright (c) 2018 Angelo ZERR | ||
* 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: | ||
* Angelo Zerr <angelo.zerr@gmail.com> - initial API and implementation | ||
*/ | ||
package org.eclipse.lsp4xml.settings; | ||
|
||
/** | ||
* XML experimental capabilities. | ||
* | ||
*/ | ||
public class XMLExperimentalCapabilities { | ||
|
||
private XMLIncrementalSupportCapabilities incrementalSupport; | ||
|
||
public void setIncrementalSupport(XMLIncrementalSupportCapabilities incrementalSupport) { | ||
this.incrementalSupport = incrementalSupport; | ||
} | ||
|
||
public XMLIncrementalSupportCapabilities getIncrementalSupport() { | ||
return incrementalSupport; | ||
} | ||
} |
10 changes: 10 additions & 0 deletions
10
org.eclipse.lsp4xml/src/main/java/org/eclipse/lsp4xml/settings/XMLFormattingOptions.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
29 changes: 29 additions & 0 deletions
29
...lsp4xml/src/main/java/org/eclipse/lsp4xml/settings/XMLIncrementalSupportCapabilities.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
/** | ||
* Copyright (c) 2018 Angelo ZERR | ||
* 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: | ||
* Angelo Zerr <angelo.zerr@gmail.com> - initial API and implementation | ||
*/ | ||
package org.eclipse.lsp4xml.settings; | ||
|
||
/** | ||
* XML experimental incremental support capabilities. | ||
* | ||
*/ | ||
public class XMLIncrementalSupportCapabilities { | ||
|
||
private Boolean enabled; | ||
|
||
public Boolean getEnabled() { | ||
return enabled; | ||
} | ||
|
||
public void setEnabled(Boolean enabled) { | ||
this.enabled = enabled; | ||
} | ||
|
||
} |