forked from eclipse-lemminx/lemminx
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Provides file completion when the user starts typing a path in an attribute value Displays all folders and files as of now. Fixes eclipse-lemminx#345 Signed-off-by: Nikolas Komonen <[email protected]>
- Loading branch information
1 parent
636bdcf
commit 7aefb36
Showing
18 changed files
with
856 additions
and
64 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
46 changes: 46 additions & 0 deletions
46
org.eclipse.lsp4xml/src/main/java/org/eclipse/lsp4xml/extensions/general/FilePathPlugin.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,46 @@ | ||
/******************************************************************************* | ||
* 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.extensions.general; | ||
|
||
import org.eclipse.lsp4j.InitializeParams; | ||
import org.eclipse.lsp4xml.extensions.general.completion.FilePathCompletionParticipant; | ||
import org.eclipse.lsp4xml.services.extensions.IXMLExtension; | ||
import org.eclipse.lsp4xml.services.extensions.XMLExtensionsRegistry; | ||
import org.eclipse.lsp4xml.services.extensions.save.ISaveContext; | ||
|
||
/** | ||
* FilePathPlugin | ||
*/ | ||
public class FilePathPlugin implements IXMLExtension { | ||
|
||
private final FilePathCompletionParticipant completionParticipant; | ||
|
||
public FilePathPlugin() { | ||
completionParticipant = new FilePathCompletionParticipant(); | ||
} | ||
|
||
@Override | ||
public void start(InitializeParams params, XMLExtensionsRegistry registry) { | ||
registry.registerCompletionParticipant(completionParticipant); | ||
} | ||
|
||
@Override | ||
public void stop(XMLExtensionsRegistry registry) { | ||
registry.unregisterCompletionParticipant(completionParticipant); | ||
} | ||
|
||
@Override | ||
public void doSave(ISaveContext context) { | ||
|
||
} | ||
|
||
|
||
} |
Oops, something went wrong.