How do I start from scratch? #110
-
|
Hi, I intend to develop a modeling tool for my custom usecase. I have created an ecore diagram and the corresponding genmodel, along with the generated code files (The Factory, Package, Impl, and Switch classes) using the Eclipse IDE. I intend to replace the provided example ecore file with my newly created ecore file and its corressponding classes, and start afresh. The final aim is to be able to draw a diagram as per the usecase, while keeping the serialization format as XML instead of JSON. I refered the Workflow Diagram example to reuse the existing stub. I could figure out that the ecore and genmodel file needs to be placed in the model directory, and the generated classes (classes generated in Eclipse IDE) to be placed in the src-gen directory. Server code downloaded from the following URL: https://github.com/eclipse-glsp/glsp-server Could you please guide me/provide solutions for the following queries?
Please let me know if you need any more details. |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 10 replies
-
|
Workflow diagram looks like a good example to me. In any case, starting by generating the domain plugin like you did is the mandatory first step. The "model" or "src-gen" are the classic way to structure it. If your sources were generated in an "src" directory instead, you can configure this in the .genmodel file, but it is only a matter of configuration and should not be blocking for future steps. For the next steps, you must configure and launch your model server component, before connecting a client (probably based on Theia) to it. For these steps, the Coffee editor would provide you a better understanding, as it contains "examples" branches which will make it easier to understand the process step by step. Finally, the XML or JSON format is just a matter of serialization and encoding. This should be configurable within the Guice modules. But it's kind of the last step and easy to implement once you've mastered the rest of the framework. |
Beta Was this translation helpful? Give feedback.
-
|
When you start from scratch with just a .ecore file and a .genmode file. How did you generate the code? |
Beta Was this translation helpful? Give feedback.
-
|
I have now isolated the glsp workflow example in a separate project: https://github.com/rsoika/glsp-workflow-example I think this makes it easier to start from scratch as it only contains the necessary source code artefacts. You can fork the project as a template to get started with your own. |
Beta Was this translation helpful? Give feedback.
-
|
In the mean time I also figured out how to define your own .ecore file based on the GLSP Definitions. Find my documentation here @IngaleAbhishek : how have you managed to get started from scratch? |
Beta Was this translation helpful? Give feedback.
Workflow diagram looks like a good example to me.
You can also take a look at the Coffee editor ( https://github.com/eclipse-emfcloud/coffee-editor/ ) if you want to see other features such as json forms. The workflow diagram is also integrated in it.
In any case, starting by generating the domain plugin like you did is the mandatory first step. The "model" or "src-gen" are the classic way to structure it. If your sources were generated in an "src" directory instead, you can configure this in the .genmodel file, but it is only a matter of configuration and should not be blocking for future steps.
For the next steps, you must configure and launch your model server component, before connect…