-
I wonder if there is a wrong / missing configuration in the java-emf-theia example In the app module the launcher scripts look currently like this:
This seems to me being identically. As a result the backend-modul will always launch the server from the jar file import { GLSPServerContribution } from '@eclipse-glsp/theia-integration/lib/node';
import { ContainerModule } from '@theia/core/shared/inversify';
import { TaskListGLSPServerContribution } from './glsp-server-contribution';
export default new ContainerModule(bind => {
bind(TaskListGLSPServerContribution).toSelf().inSingletonScope();
bind(GLSPServerContribution).toService(TaskListGLSPServerContribution);
}); In earlier version (before 2.3) there was the paramter So my old code looked more like this: export default new ContainerModule(bind => {
if (isDirectWebSocketConnection()) {
console.log('├── DirectWebSocketConnection = true');
return;
}
console.log('├── DirectWebSocketConnection = false');
console.log('│ └── launch server...');
bind(BPMNGLSPSocketServerContribution).toSelf().inSingletonScope();
bind(GLSPServerContribution).toService(BPMNGLSPSocketServerContribution);
});
const directWebSocketArg = '--directWebSocket';
function isDirectWebSocketConnection(): boolean {
const args = process.argv.filter(a => a.toLowerCase().startsWith(directWebSocketArg.toLowerCase()));
return args.length > 0;
} But anyway, currently when I start the server externally and than launch the theia app without starting the server jar file, I get log messages like this without any other errors
And the modeler did not start (editor window is empty). |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
Hi @rsoika,
There never was a --directWebSocket Parameter in the generic GLSP framework. I think you took this implementation from our dev workflow example. The dev workflow example is kind of an all in one example that covers all possible connection cases for testing. Anyways the I checked your lauch scripts in the current open-bpmn master: "start": "theia start --GLSP_PORT=5007 --root-dir=../workspace",
"start:external": "theia start --GLSP_PORT=5007 --root-dir=../workspace --debug", For 2.3. you need to adapt the Potentially Breaking Changes
[launch] Changed the GLSPServerContributionOptions.debugArgument from debug to glspDebug to avoid clashes with nodes debug argument. Launch configurations and scripts need to be updated accordingly [#211](https://github.com/eclipse-glsp/glsp-theia-integration/pull/211) Then launching the server externally and connecting to it should work as expected. |
Beta Was this translation helpful? Give feedback.
Hi @rsoika,
welcome back 😉
There never was a --directWebSocket Parameter in the generic GLSP framework. I think you took this implementation from our dev workflow example. The dev workflow example is kind of an all in one example that covers all possible connection cases for testing.
It should not be used as blueprint (see also the remark in the README.md)
Anyways the
--directWebsocket
Parameter in the Workflow Dev Example is used for the use case where the client should directly connect to an externaly running …