WIP
This commit is contained in:
@@ -10,7 +10,9 @@
|
||||
*******************************************************************************/
|
||||
package org.springframework.ide.vscode.commons.languageserver;
|
||||
|
||||
import org.eclipse.lsp4j.jsonrpc.services.JsonDelegate;
|
||||
import org.eclipse.lsp4j.services.LanguageServer;
|
||||
import org.springframework.ide.vscode.commons.languageserver.sprotty.SprottyService;
|
||||
import org.springframework.ide.vscode.commons.languageserver.util.SimpleTextDocumentService;
|
||||
import org.springframework.ide.vscode.commons.languageserver.util.SimpleWorkspaceService;
|
||||
|
||||
@@ -39,5 +41,9 @@ public interface Sts4LanguageServer extends LanguageServer {
|
||||
* @return
|
||||
*/
|
||||
DiagnosticService getDiagnosticService();
|
||||
|
||||
@JsonDelegate
|
||||
SprottyService getSprottyService();
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
package org.springframework.ide.vscode.commons.languageserver.sprotty;
|
||||
|
||||
import org.eclipse.lsp4j.jsonrpc.services.JsonNotification;
|
||||
|
||||
import com.google.gson.JsonObject;
|
||||
|
||||
public interface SprottyService {
|
||||
|
||||
@JsonNotification("sts/sprotty")
|
||||
void sprottyMessage(JsonObject message);
|
||||
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
package org.springframework.ide.vscode.commons.protocol;
|
||||
|
||||
import org.eclipse.lsp4j.jsonrpc.services.JsonNotification;
|
||||
|
||||
import com.google.gson.JsonObject;
|
||||
|
||||
public interface SprottyClient {
|
||||
|
||||
@JsonNotification("sts/progress")
|
||||
void sprottyMessage(JsonObject message);
|
||||
|
||||
}
|
||||
@@ -42,6 +42,7 @@
|
||||
<module>commons-gradle</module>
|
||||
<module>commons-boot-app-cli</module>
|
||||
<module>language-server-starter</module>
|
||||
<module>commons-sprotty</module>
|
||||
</modules>
|
||||
|
||||
<repositories>
|
||||
|
||||
@@ -8,11 +8,13 @@ if command -v xvfb-run ; then
|
||||
-f ../pom.xml \
|
||||
-pl $modules \
|
||||
-am \
|
||||
clean install
|
||||
clean install \
|
||||
-DskipTests
|
||||
else
|
||||
../mvnw \
|
||||
-f ../pom.xml \
|
||||
-pl $modules \
|
||||
-am \
|
||||
clean install
|
||||
clean install \
|
||||
-DskipTests
|
||||
fi
|
||||
|
||||
@@ -18,18 +18,19 @@ public class PopupModelFactory implements IPopupModelFactory {
|
||||
@Override
|
||||
public SModelRoot createPopupModel(SModelElement element, RequestPopupModelAction request, IDiagramServer server) {
|
||||
|
||||
SGraph graph = new SGraph();
|
||||
graph.setId("popup");
|
||||
List<SModelElement> children = new ArrayList<>();
|
||||
|
||||
SLabel label = new SLabel();
|
||||
label.setType("node:label");
|
||||
label.setText("I'm a tooltip!");
|
||||
children.add(label);
|
||||
|
||||
graph.setChildren(children);
|
||||
|
||||
return graph;
|
||||
// SGraph graph = new SGraph();
|
||||
// graph.setId("popup");
|
||||
// List<SModelElement> children = new ArrayList<>();
|
||||
//
|
||||
// SLabel label = new SLabel();
|
||||
// label.setType("node:label");
|
||||
// label.setText("I'm a tooltip!");
|
||||
// children.add(label);
|
||||
//
|
||||
// graph.setChildren(children);
|
||||
//
|
||||
// return graph;
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user