More code moved from jdt.ls.extension to jdt.ls.commons
jdt.ls extension reduced to a simple wrapper that forwards requests to commons implementation.
This commit is contained in:
@@ -0,0 +1,35 @@
|
||||
/*******************************************************************************
|
||||
* 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.tooling.ls.eclipse.commons;
|
||||
|
||||
public class ClasspathListenerParams {
|
||||
|
||||
private String callbackCommandId;
|
||||
|
||||
public ClasspathListenerParams(String callbackCommandId) {
|
||||
super();
|
||||
this.callbackCommandId = callbackCommandId;
|
||||
}
|
||||
|
||||
public String getCallbackCommandId() {
|
||||
return callbackCommandId;
|
||||
}
|
||||
|
||||
public void setCallbackCommandId(String callbackCommandId) {
|
||||
this.callbackCommandId = callbackCommandId;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "ClasspathListenerParams [callbackCommandId=" + callbackCommandId + "]";
|
||||
}
|
||||
|
||||
}
|
||||
@@ -10,7 +10,10 @@
|
||||
*******************************************************************************/
|
||||
package org.springframework.tooling.ls.eclipse.commons;
|
||||
|
||||
import java.util.concurrent.CompletableFuture;
|
||||
|
||||
import org.eclipse.lsp4j.jsonrpc.services.JsonNotification;
|
||||
import org.eclipse.lsp4j.jsonrpc.services.JsonRequest;
|
||||
import org.eclipse.lsp4j.services.LanguageClient;
|
||||
|
||||
/**
|
||||
@@ -29,4 +32,10 @@ public interface STS4LanguageClient extends LanguageClient {
|
||||
// TODO: @JsonRequest("sts/moveCursor")
|
||||
// CompletableFuture<Object> moveCursor(CursorMovement cursorMovement);
|
||||
|
||||
@JsonRequest("sts/addClasspathListener")
|
||||
CompletableFuture<Object> addClasspathListener(ClasspathListenerParams params);
|
||||
|
||||
@JsonRequest("sts/removeClasspathListener")
|
||||
CompletableFuture<Object> removeClasspathListener(ClasspathListenerParams classpathListenerParams);
|
||||
|
||||
}
|
||||
|
||||
@@ -16,6 +16,7 @@ import java.util.Collection;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.concurrent.CompletableFuture;
|
||||
|
||||
import org.eclipse.core.runtime.IProgressMonitor;
|
||||
import org.eclipse.core.runtime.IStatus;
|
||||
@@ -42,6 +43,7 @@ import org.eclipse.ui.texteditor.AbstractTextEditor;
|
||||
|
||||
import com.google.common.collect.ImmutableList;
|
||||
import com.google.common.collect.ImmutableMap;
|
||||
import com.google.common.util.concurrent.Futures;
|
||||
|
||||
@SuppressWarnings("restriction")
|
||||
public class STS4LanguageClientImpl extends LanguageClientImpl implements STS4LanguageClient {
|
||||
@@ -174,5 +176,17 @@ public class STS4LanguageClientImpl extends LanguageClientImpl implements STS4La
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public CompletableFuture<Object> addClasspathListener(ClasspathListenerParams params) {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public CompletableFuture<Object> removeClasspathListener(ClasspathListenerParams classpathListenerParams) {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user