本文整理汇总了Java中org.eclipse.lsp4e.server.ProcessStreamConnectionProvider类的典型用法代码示例。如果您正苦于以下问题:Java ProcessStreamConnectionProvider类的具体用法?Java ProcessStreamConnectionProvider怎么用?Java ProcessStreamConnectionProvider使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
ProcessStreamConnectionProvider类属于org.eclipse.lsp4e.server包,在下文中一共展示了ProcessStreamConnectionProvider类的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: PHPLanguageServer
import org.eclipse.lsp4e.server.ProcessStreamConnectionProvider; //导入依赖的package包/类
public PHPLanguageServer() {
List<String> commands = new ArrayList<>();
commands.add("php");
Bundle bundle = Activator.getContext().getBundle();
Path workingDir = Path.EMPTY;
try {
workingDir = new Path(FileLocator.toFileURL(FileLocator.find(bundle, new Path("vendor"), null)).getPath());
commands.add(workingDir.append("/felixfbecker/language-server/bin/php-language-server.php").toOSString());
} catch (IOException e) {
LanguageServerPlugin.logError(e);
}
if (Platform.getOS().equals(Platform.OS_WIN32)) {
commands.add("--tcp=127.0.0.1:" + CONNECTION_PORT);
provider = new ProcessOverSocketStreamConnectionProvider(commands, workingDir.toOSString(), CONNECTION_PORT) {
};
} else {
provider = new ProcessStreamConnectionProvider(commands, workingDir.toOSString()) {
};
}
}