PT #151978919 VSCode navigation to resource from hovers (POC)

This commit is contained in:
BoykoAlex
2018-01-19 19:26:29 -05:00
parent bf096850a4
commit 286d435d53
14 changed files with 417 additions and 13 deletions

View File

@@ -0,0 +1,46 @@
/*******************************************************************************
* Copyright (c) 2018 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
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Pivotal, Inc. - initial API and implementation
*******************************************************************************/
package org.springframework.ide.vscode.commons.languageserver.util;
/**
* LSP Client information utilities
*
* @author Alex Boyko
*
*/
public class LspClient {
public enum Client {
UNKNOWN,
VSCODE,
ECLIPSE,
ATOM,
INTELLIJ
}
/**
* Extracts the LSP client from the current environment
* @return current LSP client
*/
public static Client currentClient() {
Client client = Client.UNKNOWN;
String clientStr = System.getProperty("sts.lsp.client");
if (clientStr != null) {
try {
client = Client.valueOf(clientStr.toUpperCase());
} catch (IllegalArgumentException e) {
// ignore
}
}
return client;
}
}