This commit is contained in:
BoykoAlex
2019-08-22 14:51:59 -04:00
parent 83193e5d42
commit 7ea3c0ad55
23 changed files with 973 additions and 22 deletions

View File

@@ -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();
}

View File

@@ -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);
}

View File

@@ -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);
}

View File

@@ -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>

View File

@@ -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

View File

@@ -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;
}
}