-
I was able to run the export const MinimalLanguage: GLSPDiagramLanguage = {
contributionId: 'TaskList',
label: 'Tasklist diagram',
diagramType: 'my-glsp-diagram',
fileExtensions: ['.tasklist']
}; And my GModelFactory looks like public class MyGLSPGModelFactory extends EMFNotationGModelFactory {
@Override
protected void fillRootElement(EObject semanticModel, Diagram notationModel, GModelRoot newRoot) {
// TODO Auto-generated method stub
TaskList taskList = TaskList.class.cast(semanticModel);
GGraph graph = GGraph.class.cast(newRoot);
if (notationModel.getSemanticElement() != null
&& notationModel.getSemanticElement().getResolvedSemanticElement() != null) {
for (Iterator<Task> iterator = taskList.getTasks().iterator(); iterator.hasNext();) {
Task task = (Task) iterator.next();
GNodeBuilder builder = new GNodeBuilder(DefaultTypes.NODE).size(60, 20)
.id(idGenerator.getOrCreateId(task)).addCssClass("minimal-node")
.add(new GLabelBuilder(DefaultTypes.LABEL).text(task.getName()).build());
applyShapeData(task, builder);
graph.getChildren().add(builder.build());
}
}
}
} For now, I have not implemented any operation handlers (I guess just to view existing elements, I wouldn't need it). $ yarn start
yarn run v1.22.17
$ yarn rebuild:browser && yarn --cwd minimal-browser-app start
$ theia rebuild:browser
native node modules are already rebuilt for browser
$ theia start --MINIMAL_GLSP=5007 --root-dir=../workspace
root INFO Theia app listening on http://localhost:3000.
root INFO Configuration directory URI: 'file:///home/ipa-hsd/.theia'
root INFO Changed application state from 'ready' to 'closing_window'.
root INFO >>> Storing the layout...
root INFO <<< The layout has been successfully stored.
root INFO >>> Stopping frontend contributions...
root INFO Detected keyboard layout from browser API: German (PC)
root ERROR Cannot find a service for the path: /services/glsp/TaskList/:id
root INFO Changed application state from 'init' to 'started_contributions'.
root INFO Changed application state from 'started_contributions' to 'attached_shell'.
root INFO >>> Restoring the layout state...
root INFO <<< The layout has been successfully restored.
root INFO Changed application state from 'attached_shell' to 'initialized_layout'.
root ERROR Child node 'open-editors:root' does not belong to this 'open-editors:root' tree.
root INFO Finished loading frontend application after 1.312 seconds
root INFO Changed application state from 'initialized_layout' to 'ready'.
root INFO my-glsp-diagram_0 The last line Edit 1:
But it would be helpful for me to start with the minimal client example to understand what changes are necessary on the client side if the source model changes. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Was a silly mistake. I changed the default package, but missed to update the path for Launcher: https://github.com/ipa-hsd/kinematics-glsp/blob/emf_sourcemodel/glsp-server/pom.xml#L100. But why don't I get an error saying could not start the server or something like that? |
Beta Was this translation helpful? Give feedback.
Was a silly mistake. I changed the default package, but missed to update the path for Launcher: https://github.com/ipa-hsd/kinematics-glsp/blob/emf_sourcemodel/glsp-server/pom.xml#L100.
But why don't I get an error saying could not start the server or something like that?