-
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.
Provide Document Lifecycle Participant for tracking didOpen, did*
Fixes #603 Signed-off-by: azerr <azerr@redhat.com>
- Loading branch information
1 parent
d5569b9
commit 0688731
Showing
6 changed files
with
354 additions
and
12 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
55 changes: 55 additions & 0 deletions
55
.../src/main/java/org/eclipse/lemminx/services/extensions/IDocumentLifecycleParticipant.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,55 @@ | ||
/******************************************************************************* | ||
* Copyright (c) 2021 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 | ||
* | ||
* SPDX-License-Identifier: EPL-2.0 | ||
* | ||
* Contributors: | ||
* Red Hat Inc. - initial API and implementation | ||
*******************************************************************************/ | ||
package org.eclipse.lemminx.services.extensions; | ||
|
||
import java.util.List; | ||
|
||
import org.eclipse.lemminx.dom.DOMDocument; | ||
import org.eclipse.lsp4j.TextDocumentContentChangeEvent; | ||
|
||
/** | ||
* Document LifecycleService participant API. | ||
* | ||
* @since 0.18.0 | ||
*/ | ||
public interface IDocumentLifecycleParticipant { | ||
|
||
/** | ||
* Handler called when a XML document is opened. | ||
* | ||
* @param document the DOM document | ||
*/ | ||
void didOpen(DOMDocument document); | ||
|
||
/** | ||
* Handler called when a XML document is changed. | ||
* | ||
* @param document the DOM document | ||
* @param contentChanges the content changes | ||
*/ | ||
void didChange(DOMDocument document, List<TextDocumentContentChangeEvent> contentChanges); | ||
|
||
/** | ||
* Handler called when a XML document is saved. | ||
* | ||
* @param document the DOM document | ||
*/ | ||
void didSave(DOMDocument xmlDocument); | ||
|
||
/** | ||
* Handler called when a XML document is closed. | ||
* | ||
* @param document the DOM document | ||
*/ | ||
void didClose(DOMDocument 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
Oops, something went wrong.