Closed d01010101 closed 4 years ago
Hi @d01010101 ,
sorry for the confusing instructions. We will improve them. Please do the following steps:
node_modules
folder.yarn
Now your client should be ready to be run the first time.
Go to browser-app
and run yarn start
If you change code, you need to build this bundle as well as trigger yarn rebuild:browser
.
I did these steps. I attach the log of the last step, yarn
. However, there is still nothing at http://localhost:3000.
Hi,
I've updated the client's README.md to avoid confusion. I've removed the rebuild:
steps, as they can only be used after the first build (yarn
)
Once the yarn
build is successful, and if you've executed a mvn install
in the server folder, you can move to the client/browser-app
folder and run yarn start
to start the application. Then, you should be able to navigate to http://localhost:3000
and start using the application.
The client complains about theia
missing. I installed it somehow previously, but despite that, the client never ran, so I do not want to repeat the exact method which I have used. What is the good way of installing a compatible version of theia
?
You don't need to install theia. The glsp.log that you attached looks fine. Running yarn
in the client folder is all you need.
Since you manually added some dependencies via npm (npm install theia
according to your initial message), maybe this caused the repo to be in an inconsistent state? In that case, I would recommend clearing the git repo (git reset --hard && git clean -fdx
) and trying again with the updated instructions:
# server build
cd server
mvn install
# client build
cd ../client
yarn
# application start (client + server)
cd browser-app
yarn start
Btw, you may also want to make sure you're using the current master branch, as it contains an important server-side update to remain consistent with the GLSP Server dependency. Without this, the Maven build will likely fail. (You need commit 9aa9c0f
or 08bc996
I downloaded today's snapshot and used the new instructions, and it works. It closes this issue, but I would like to ask before, if it is possible to embed within a web app only the drawing widget, without any IDE around it? I would like to tell it to load an ECORE file, then ask it for snapshots in the same format.
It's possible, but probably requires a bit of glue code. The client side of Ecore GLSP comes with 2 main packages: sprotty-ecore
, which only depends on GLSP + Sprotty (Diagram framework, independent from Theia), and theia-ecore
which integrates the diagrams as a Theia Editor (With all the IDE integration such as opening the editor, adding menus, ...)
So it is possible to reuse the sprotty-ecore
package only; but then you have to implement all the integration part yourself. The GLSP/Sprotty diagram can be integrated as a React component. I'm not sure we have any (recent) example of this, so I can't say how easy or complex that would be.
It would be enough for me to put it into an iframe and add a layer of simplified API (just new, load, save). It would be nice to have, as apart from Theia, the software would also be an interesting widget for the web. Perhaps I will give it a try one day, but I have no much idea about the emf cloud.
We actually provide a stand-alone example: https://github.com/eclipse-glsp/glsp-client/tree/master/examples/workflow-standalone Naturally it does not support all feaures due to not beeing integrated into an IDE, please see here for an overview: https://github.com/eclipse-glsp/glsp#features
The web server never shows. I am new to this, possibly the instructions are not detailed enough for the beginner.
Firstly, I unpack the zip from github and follow the instructions:
$ cd server $ mvn install -U $ cd ../client $ nvm install 10 $ nvm use 10 $ npm install -g yarn $ yarn rebuild:browser ---- it complaint that theia is not found $ npm install theia $ yarn rebuild:browser ---- now it complains that webpack and circular-dependency-plugin are missing $ npm install webpack circular-dependency-plugin $ yarn rebuild:browser yarn run v1.22.5 $ theia rebuild:browser No missing packages found! Done in 0.25s. $ cd browser-app $ yarn start yarn run v1.22.5 $ theia start Done in 0.24s.
"Open http://localhost:3000 in the browser" - it does not work - "this site can’t be reached, localhost refused to connect"