-
Notifications
You must be signed in to change notification settings - Fork 57
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add C++ example #360
Add C++ example #360
Conversation
eneufeld
commented
May 3, 2021
- add code generator for c++ code
- add build task
- add debug launch config
- add docker image for the c++ example
Unify dockerimage for cpp with default one |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In general the C++ image works fine for me! I did not test the other image. When trying to run the build locally it fails for me, however I did not check whether this is caused by the PR or whether this already happens on master
.
localhost:3000
I ran the C++ image and the first thing I tried is to open just localhost:3000
which ends up in a bad experience:
root INFO [6993655d-2f3e-48e7-ba09-74ca6bfaec8c] Start of 20 plugins took: 567.4 ms
root ERROR [hosted-plugin: 195] Promise rejection not handled in one second: TypeError: Cannot read property 'path' of undefined , reason: TypeError: Cannot read property 'path' of undefined
root ERROR [hosted-plugin: 195] With stack trace: TypeError: Cannot read property 'path' of undefined
at Object.a [as joinPath] (/usr/coffee-editor/browser-app/plugins/vscode.json-language-features/extension/client/dist/node/jsonClientMain.js:1:248754)
at /usr/coffee-editor/browser-app/plugins/vscode.json-language-features/extension/client/dist/node/jsonClientMain.js:1:116514
at Array.forEach (<anonymous>)
at /usr/coffee-editor/browser-app/plugins/vscode.json-language-features/extension/client/dist/node/jsonClientMain.js:1:116371
at Array.forEach (<anonymous>)
at f (/usr/coffee-editor/browser-app/plugins/vscode.json-language-features/extension/client/dist/node/jsonClientMain.js:1:116229)
at /usr/coffee-editor/browser-app/plugins/vscode.json-language-features/extension/client/dist/node/jsonClientMain.js:1:122454
root ERROR WFCONFIG: May 07, 2021 7:48:58 AM org.eclipse.lsp4j.jsonrpc.RemoteEndpoint fallbackResponseError
SEVERE: Internal error: java.lang.reflect.InvocationTargetException
java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
at org.eclipse.lsp4j.jsonrpc.services.GenericEndpoint.lambda$null$0(GenericEndpoint.java:67)
at org.eclipse.lsp4j.jsonrpc.services.GenericEndpoint.request(GenericEndpoint.java:120)
at org.eclipse.lsp4j.jsonrpc.RemoteEndpoint.handleRequest(RemoteEndpoint.java:261)
at org.eclipse.lsp4j.jsonrpc.RemoteEndpoint.consume(RemoteEndpoint.java:190)
at org.eclipse.lsp4j.jsonrpc.json.StreamMessageProducer.handleMessage(StreamMessageProducer.java:194)
at org.eclipse.lsp4j.jsonrpc.json.StreamMessageProducer.listen(StreamMessageProducer.java:94)
at org.eclipse.lsp4j.jsonrpc.json.ConcurrentMessageProcessor.run(ConcurrentMessageProcessor.java:113)
at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at java.base/java.lang.Thread.run(Thread.java:829)
Caused by: java.lang.reflect.InvocationTargetException
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at org.eclipse.lsp4j.jsonrpc.services.GenericEndpoint.lambda$null$0(GenericEndpoint.java:65)
... 11 more
Caused by: java.lang.NullPointerException
at java.base/java.net.URI$Parser.parse(URI.java:3104)
at java.base/java.net.URI.<init>(URI.java:600)
at org.eclipse.emfcloud.coffee.workflow.dsl.ide.server.WorkflowIndexService.workspaceFolderAdded(WorkflowIndexService.java:98)
at org.eclipse.emfcloud.coffee.workflow.dsl.ide.server.WorkflowIndexService.updateWorkflowIndex(WorkflowIndexService.java:73)
at org.eclipse.emfcloud.coffee.workflow.dsl.ide.server.WorkflowIndexService.initialize(WorkflowIndexService.java:45)
at org.eclipse.emfcloud.coffee.workflow.dsl.ide.server.WorkflowLanguageServer.initialize(WorkflowLanguageServer.java:39)
... 16 more
Retry doesn't help.
The problem doesn't occur when opening the path as suggested in the Readme (localhost:3000/#/usr/coffee-editor/SuperBrewer3000
). So I would like to suggest to just set this as the default path at yarn start. This would make for a better experience and you don't need to describe this exact path in the Readme.
Could also be done in a followup but the language server shouldn't crash when there is no workspace.
Getting started
The getting started text is tailored to the Java use case with no mention of C/C++ at all. We should provide different text and a specific C++ section in it for the C++ use case
C++ & CMake
- Is there a specific reason you did not include the CMakeTools extension?
- The cpp folder is using underscore while we're using normal dashes for other directories
- The build task is hard to find. Should definitely be part of the getting started so I don't need to search for it
- The binary, source files, cmake files are all in one directory which feels super messy. Maybe do it like this?
- cpp/
|_src/
|_build/
|_CMakeLists.txt
- Rebuilding could be a pre-step of the C++ Launch. Or there should be a different launch config:
Rebuild and Debug
. - It's not that nice that Intellisense doesn't work initially after code generation. Maybe also generate the
compile_commands.json
initially? Or execute cmake with the code generation? Is it possible to only generate thecompile_commands.json
via cmake without doing the actual build? - It's not nice that my custom code, which I added where it is marked with
// TODO Add custom implementation here
is thrown away when regenerating the code. Can we also have a separation of concerns like in Java? src_cpp
should also be added to the.gitignore
} | ||
] | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
EOL
/** | ||
* This class controls all aspects of the application's execution | ||
*/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/** | |
* This class controls all aspects of the application's execution | |
*/ |
backend/plugins/org.eclipse.emfcloud.coffee.workflow.generator.cpp/pom.xml
Outdated
Show resolved
Hide resolved
f4e552e
to
8ab1992
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks a lot! Looks great overall! For me the local build worked (run.sh).
Aside from the comments by @sdirix I'd just add the following:
- I get the following error when I try to run the debug from the welcome page (after running run.sh)
root INFO [hosted-plugin: 3101] {
message: '[Error - 11:45:12 AM] May 12, 2021, 11:45:12 AM Error occured while building workspace. Details: \n' +
' message: The import SuperBrewer3000.Preheat cannot be resolved; code: 268435846; resource: /home/philip/Git/OpenSource/coffee-editor/backend/examples/SuperBrewer3000/src/SuperBrewer3000/tests/SuperBrewer3000Runner.java; line: 4\n' +
' message: The import SuperBrewer3000.Brew cannot be resolved; code: 268435846; resource: /home/philip/Git/OpenSource/coffee-editor/backend/examples/SuperBrewer3000/src/SuperBrewer3000/tests/SuperBrewer3000Runner.java; line: 5\n' +
' message: Preheat cannot be resolved to a type; code: 16777218; resource: /home/philip/Git/OpenSource/coffee-editor/backend/examples/SuperBrewer3000/src/SuperBrewer3000/tests/SuperBrewer3000Runner.java; line: 28\n' +
' message: Preheat cannot be resolved to a type; code: 16777218; resource: /home/philip/Git/OpenSource/coffee-editor/backend/examples/SuperBrewer3000/src/SuperBrewer3000/tests/SuperBrewer3000Runner.java; line: 28\n' +
' message: Brew cannot be resolved to a type; code: 16777218; resource: /home/philip/Git/OpenSource/coffee-editor/backend/examples/SuperBrewer3000/src/SuperBrewer3000/tests/SuperBrewer3000Runner.java; line: 44\n' +
' message: Brew cannot be resolved to a type; code: 16777218; resource: /home/philip/Git/OpenSource/coffee-editor/backend/examples/SuperBrewer3000/src/SuperBrewer3000/tests/SuperBrewer3000Runner.java; line: 44',
level: 'info',
timestamp: '2021-05-12 11:45:12.114'
}
-
I think it'd be good to run the build task automatically after the code generation, this way the language support would work immediately, because once you opened a cpp file and with that started clangd, you'd have to restart clangd again after running the build task to get working language support.
-
We should mention in the text on the welcome page regarding C++ generation that you need to run the build first before opening. Or if already opened and it shows errors to run the build and then restart clangd (there is a command for that).
-
When running the debug launch config I get errors and nothing happens (note that I ran run.sh not the docker)
root ERROR Couldn't resize terminal 9, because it doesn't exist.
root ERROR Request getCwdURI failed with error: terminal "14" does not exist Error: terminal "14" does not exist
at ShellTerminalServer.<anonymous> (/home/philip/Git/OpenSource/coffee-editor/web/node_modules/@theia/terminal/lib/node/base-terminal-server.js:135:27)
at step (/home/philip/Git/OpenSource/coffee-editor/web/node_modules/@theia/terminal/lib/node/base-terminal-server.js:60:23)
at Object.next (/home/philip/Git/OpenSource/coffee-editor/web/node_modules/@theia/terminal/lib/node/base-terminal-server.js:41:53)
at /home/philip/Git/OpenSource/coffee-editor/web/node_modules/@theia/terminal/lib/node/base-terminal-server.js:35:71
at new Promise (<anonymous>)
at __awaiter (/home/philip/Git/OpenSource/coffee-editor/web/node_modules/@theia/terminal/lib/node/base-terminal-server.js:31:12)
at ShellTerminalServer.BaseTerminalServer.getCwdURI (/home/philip/Git/OpenSource/coffee-editor/web/node_modules/@theia/terminal/lib/node/base-terminal-server.js:130:16)
at JsonRpcProxyFactory.<anonymous> (/home/philip/Git/OpenSource/coffee-editor/web/node_modules/@theia/core/lib/common/messaging/proxy-factory.js:220:73)
at step (/home/philip/Git/OpenSource/coffee-editor/web/node_modules/@theia/core/lib/common/messaging/proxy-factory.js:48:23)
at Object.next (/home/philip/Git/OpenSource/coffee-editor/web/node_modules/@theia/core/lib/common/messaging/proxy-factory.js:29:53)
root ERROR Request getCwdURI failed with error: terminal "14" does not exist Error: terminal "14" does not exist
at ShellTerminalServer.<anonymous> (/home/philip/Git/OpenSource/coffee-editor/web/node_modules/@theia/terminal/lib/node/base-terminal-server.js:135:27)
at step (/home/philip/Git/OpenSource/coffee-editor/web/node_modules/@theia/terminal/lib/node/base-terminal-server.js:60:23)
at Object.next (/home/philip/Git/OpenSource/coffee-editor/web/node_modules/@theia/terminal/lib/node/base-terminal-server.js:41:53)
at /home/philip/Git/OpenSource/coffee-editor/web/node_modules/@theia/terminal/lib/node/base-terminal-server.js:35:71
at new Promise (<anonymous>)
at __awaiter (/home/philip/Git/OpenSource/coffee-editor/web/node_modules/@theia/terminal/lib/node/base-terminal-server.js:31:12)
at ShellTerminalServer.BaseTerminalServer.getCwdURI (/home/philip/Git/OpenSource/coffee-editor/web/node_modules/@theia/terminal/lib/node/base-terminal-server.js:130:16)
at JsonRpcProxyFactory.<anonymous> (/home/philip/Git/OpenSource/coffee-editor/web/node_modules/@theia/core/lib/common/messaging/proxy-factory.js:220:73)
at step (/home/philip/Git/OpenSource/coffee-editor/web/node_modules/@theia/core/lib/common/messaging/proxy-factory.js:48:23)
at Object.next (/home/philip/Git/OpenSource/coffee-editor/web/node_modules/@theia/core/lib/common/messaging/proxy-factory.js:29:53)
root ERROR Request getCwdURI failed with error: terminal "14" does not exist Error: terminal "14" does not exist
at ShellTerminalServer.<anonymous> (/home/philip/Git/OpenSource/coffee-editor/web/node_modules/@theia/terminal/lib/node/base-terminal-server.js:135:27)
at step (/home/philip/Git/OpenSource/coffee-editor/web/node_modules/@theia/terminal/lib/node/base-terminal-server.js:60:23)
at Object.next (/home/philip/Git/OpenSource/coffee-editor/web/node_modules/@theia/terminal/lib/node/base-terminal-server.js:41:53)
at /home/philip/Git/OpenSource/coffee-editor/web/node_modules/@theia/terminal/lib/node/base-terminal-server.js:35:71
at new Promise (<anonymous>)
at __awaiter (/home/philip/Git/OpenSource/coffee-editor/web/node_modules/@theia/terminal/lib/node/base-terminal-server.js:31:12)
at ShellTerminalServer.BaseTerminalServer.getCwdURI (/home/philip/Git/OpenSource/coffee-editor/web/node_modules/@theia/terminal/lib/node/base-terminal-server.js:130:16)
at JsonRpcProxyFactory.<anonymous> (/home/philip/Git/OpenSource/coffee-editor/web/node_modules/@theia/core/lib/common/messaging/proxy-factory.js:220:73)
at step (/home/philip/Git/OpenSource/coffee-editor/web/node_modules/@theia/core/lib/common/messaging/proxy-factory.js:48:23)
at Object.next (/home/philip/Git/OpenSource/coffee-editor/web/node_modules/@theia/core/lib/common/messaging/proxy-factory.js:29:53)
root ERROR Request getCwdURI failed with error: terminal "14" does not exist Error: terminal "14" does not exist
at ShellTerminalServer.<anonymous> (/home/philip/Git/OpenSource/coffee-editor/web/node_modules/@theia/terminal/lib/node/base-terminal-server.js:135:27)
at step (/home/philip/Git/OpenSource/coffee-editor/web/node_modules/@theia/terminal/lib/node/base-terminal-server.js:60:23)
at Object.next (/home/philip/Git/OpenSource/coffee-editor/web/node_modules/@theia/terminal/lib/node/base-terminal-server.js:41:53)
at /home/philip/Git/OpenSource/coffee-editor/web/node_modules/@theia/terminal/lib/node/base-terminal-server.js:35:71
at new Promise (<anonymous>)
at __awaiter (/home/philip/Git/OpenSource/coffee-editor/web/node_modules/@theia/terminal/lib/node/base-terminal-server.js:31:12)
at ShellTerminalServer.BaseTerminalServer.getCwdURI (/home/philip/Git/OpenSource/coffee-editor/web/node_modules/@theia/terminal/lib/node/base-terminal-server.js:130:16)
at JsonRpcProxyFactory.<anonymous> (/home/philip/Git/OpenSource/coffee-editor/web/node_modules/@theia/core/lib/common/messaging/proxy-factory.js:220:73)
at step (/home/philip/Git/OpenSource/coffee-editor/web/node_modules/@theia/core/lib/common/messaging/proxy-factory.js:48:23)
at Object.next (/home/philip/Git/OpenSource/coffee-editor/web/node_modules/@theia/core/lib/common/messaging/proxy-factory.js:29:53)
root ERROR Request getCwdURI failed with error: terminal "14" does not exist Error: terminal "14" does not exist
at ShellTerminalServer.<anonymous> (/home/philip/Git/OpenSource/coffee-editor/web/node_modules/@theia/terminal/lib/node/base-terminal-server.js:135:27)
at step (/home/philip/Git/OpenSource/coffee-editor/web/node_modules/@theia/terminal/lib/node/base-terminal-server.js:60:23)
at Object.next (/home/philip/Git/OpenSource/coffee-editor/web/node_modules/@theia/terminal/lib/node/base-terminal-server.js:41:53)
at /home/philip/Git/OpenSource/coffee-editor/web/node_modules/@theia/terminal/lib/node/base-terminal-server.js:35:71
at new Promise (<anonymous>)
at __awaiter (/home/philip/Git/OpenSource/coffee-editor/web/node_modules/@theia/terminal/lib/node/base-terminal-server.js:31:12)
at ShellTerminalServer.BaseTerminalServer.getCwdURI (/home/philip/Git/OpenSource/coffee-editor/web/node_modules/@theia/terminal/lib/node/base-terminal-server.js:130:16)
at JsonRpcProxyFactory.<anonymous> (/home/philip/Git/OpenSource/coffee-editor/web/node_modules/@theia/core/lib/common/messaging/proxy-factory.js:220:73)
at step (/home/philip/Git/OpenSource/coffee-editor/web/node_modules/@theia/core/lib/common/messaging/proxy-factory.js:48:23)
at Object.next (/home/philip/Git/OpenSource/coffee-editor/web/node_modules/@theia/core/lib/common/messaging/proxy-factory.js:29:53)
root ERROR Request getCwdURI failed with error: terminal "14" does not exist Error: terminal "14" does not exist
at ShellTerminalServer.<anonymous> (/home/philip/Git/OpenSource/coffee-editor/web/node_modules/@theia/terminal/lib/node/base-terminal-server.js:135:27)
at step (/home/philip/Git/OpenSource/coffee-editor/web/node_modules/@theia/terminal/lib/node/base-terminal-server.js:60:23)
at Object.next (/home/philip/Git/OpenSource/coffee-editor/web/node_modules/@theia/terminal/lib/node/base-terminal-server.js:41:53)
at /home/philip/Git/OpenSource/coffee-editor/web/node_modules/@theia/terminal/lib/node/base-terminal-server.js:35:71
at new Promise (<anonymous>)
at __awaiter (/home/philip/Git/OpenSource/coffee-editor/web/node_modules/@theia/terminal/lib/node/base-terminal-server.js:31:12)
at ShellTerminalServer.BaseTerminalServer.getCwdURI (/home/philip/Git/OpenSource/coffee-editor/web/node_modules/@theia/terminal/lib/node/base-terminal-server.js:130:16)
at JsonRpcProxyFactory.<anonymous> (/home/philip/Git/OpenSource/coffee-editor/web/node_modules/@theia/core/lib/common/messaging/proxy-factory.js:220:73)
at step (/home/philip/Git/OpenSource/coffee-editor/web/node_modules/@theia/core/lib/common/messaging/proxy-factory.js:48:23)
at Object.next (/home/philip/Git/OpenSource/coffee-editor/web/node_modules/@theia/core/lib/common/messaging/proxy-factory.js:29:53)
root ERROR Request getCwdURI failed with error: terminal "14" does not exist Error: terminal "14" does not exist
at ShellTerminalServer.<anonymous> (/home/philip/Git/OpenSource/coffee-editor/web/node_modules/@theia/terminal/lib/node/base-terminal-server.js:135:27)
at step (/home/philip/Git/OpenSource/coffee-editor/web/node_modules/@theia/terminal/lib/node/base-terminal-server.js:60:23)
at Object.next (/home/philip/Git/OpenSource/coffee-editor/web/node_modules/@theia/terminal/lib/node/base-terminal-server.js:41:53)
at /home/philip/Git/OpenSource/coffee-editor/web/node_modules/@theia/terminal/lib/node/base-terminal-server.js:35:71
at new Promise (<anonymous>)
at __awaiter (/home/philip/Git/OpenSource/coffee-editor/web/node_modules/@theia/terminal/lib/node/base-terminal-server.js:31:12)
at ShellTerminalServer.BaseTerminalServer.getCwdURI (/home/philip/Git/OpenSource/coffee-editor/web/node_modules/@theia/terminal/lib/node/base-terminal-server.js:130:16)
at JsonRpcProxyFactory.<anonymous> (/home/philip/Git/OpenSource/coffee-editor/web/node_modules/@theia/core/lib/common/messaging/proxy-factory.js:220:73)
at step (/home/philip/Git/OpenSource/coffee-editor/web/node_modules/@theia/core/lib/common/messaging/proxy-factory.js:48:23)
at Object.next (/home/philip/Git/OpenSource/coffee-editor/web/node_modules/@theia/core/lib/common/messaging/proxy-factory.js:29:53)
root ERROR Request getCwdURI failed with error: terminal "14" does not exist Error: terminal "14" does not exist
at ShellTerminalServer.<anonymous> (/home/philip/Git/OpenSource/coffee-editor/web/node_modules/@theia/terminal/lib/node/base-terminal-server.js:135:27)
at step (/home/philip/Git/OpenSource/coffee-editor/web/node_modules/@theia/terminal/lib/node/base-terminal-server.js:60:23)
at Object.next (/home/philip/Git/OpenSource/coffee-editor/web/node_modules/@theia/terminal/lib/node/base-terminal-server.js:41:53)
at /home/philip/Git/OpenSource/coffee-editor/web/node_modules/@theia/terminal/lib/node/base-terminal-server.js:35:71
at new Promise (<anonymous>)
at __awaiter (/home/philip/Git/OpenSource/coffee-editor/web/node_modules/@theia/terminal/lib/node/base-terminal-server.js:31:12)
at ShellTerminalServer.BaseTerminalServer.getCwdURI (/home/philip/Git/OpenSource/coffee-editor/web/node_modules/@theia/terminal/lib/node/base-terminal-server.js:130:16)
at JsonRpcProxyFactory.<anonymous> (/home/philip/Git/OpenSource/coffee-editor/web/node_modules/@theia/core/lib/common/messaging/proxy-factory.js:220:73)
at step (/home/philip/Git/OpenSource/coffee-editor/web/node_modules/@theia/core/lib/common/messaging/proxy-factory.js:48:23)
at Object.next (/home/philip/Git/OpenSource/coffee-editor/web/node_modules/@theia/core/lib/common/messaging/proxy-factory.js:29:53)
root ERROR Request getCwdURI failed with error: terminal "14" does not exist Error: terminal "14" does not exist
at ShellTerminalServer.<anonymous> (/home/philip/Git/OpenSource/coffee-editor/web/node_modules/@theia/terminal/lib/node/base-terminal-server.js:135:27)
at step (/home/philip/Git/OpenSource/coffee-editor/web/node_modules/@theia/terminal/lib/node/base-terminal-server.js:60:23)
at Object.next (/home/philip/Git/OpenSource/coffee-editor/web/node_modules/@theia/terminal/lib/node/base-terminal-server.js:41:53)
at /home/philip/Git/OpenSource/coffee-editor/web/node_modules/@theia/terminal/lib/node/base-terminal-server.js:35:71
at new Promise (<anonymous>)
at __awaiter (/home/philip/Git/OpenSource/coffee-editor/web/node_modules/@theia/terminal/lib/node/base-terminal-server.js:31:12)
at ShellTerminalServer.BaseTerminalServer.getCwdURI (/home/philip/Git/OpenSource/coffee-editor/web/node_modules/@theia/terminal/lib/node/base-terminal-server.js:130:16)
at JsonRpcProxyFactory.<anonymous> (/home/philip/Git/OpenSource/coffee-editor/web/node_modules/@theia/core/lib/common/messaging/proxy-factory.js:220:73)
at step (/home/philip/Git/OpenSource/coffee-editor/web/node_modules/@theia/core/lib/common/messaging/proxy-factory.js:48:23)
at Object.next (/home/philip/Git/OpenSource/coffee-editor/web/node_modules/@theia/core/lib/common/messaging/proxy-factory.js:29:53)
root ERROR Request getCwdURI failed with error: terminal "14" does not exist Error: terminal "14" does not exist
at ShellTerminalServer.<anonymous> (/home/philip/Git/OpenSource/coffee-editor/web/node_modules/@theia/terminal/lib/node/base-terminal-server.js:135:27)
at step (/home/philip/Git/OpenSource/coffee-editor/web/node_modules/@theia/terminal/lib/node/base-terminal-server.js:60:23)
at Object.next (/home/philip/Git/OpenSource/coffee-editor/web/node_modules/@theia/terminal/lib/node/base-terminal-server.js:41:53)
at /home/philip/Git/OpenSource/coffee-editor/web/node_modules/@theia/terminal/lib/node/base-terminal-server.js:35:71
at new Promise (<anonymous>)
at __awaiter (/home/philip/Git/OpenSource/coffee-editor/web/node_modules/@theia/terminal/lib/node/base-terminal-server.js:31:12)
at ShellTerminalServer.BaseTerminalServer.getCwdURI (/home/philip/Git/OpenSource/coffee-editor/web/node_modules/@theia/terminal/lib/node/base-terminal-server.js:130:16)
at JsonRpcProxyFactory.<anonymous> (/home/philip/Git/OpenSource/coffee-editor/web/node_modules/@theia/core/lib/common/messaging/proxy-factory.js:220:73)
at step (/home/philip/Git/OpenSource/coffee-editor/web/node_modules/@theia/core/lib/common/messaging/proxy-factory.js:48:23)
at Object.next (/home/philip/Git/OpenSource/coffee-editor/web/node_modules/@theia/core/lib/common/messaging/proxy-factory.js:29:53)
root ERROR Request getCwdURI failed with error: terminal "14" does not exist Error: terminal "14" does not exist
at ShellTerminalServer.<anonymous> (/home/philip/Git/OpenSource/coffee-editor/web/node_modules/@theia/terminal/lib/node/base-terminal-server.js:135:27)
at step (/home/philip/Git/OpenSource/coffee-editor/web/node_modules/@theia/terminal/lib/node/base-terminal-server.js:60:23)
at Object.next (/home/philip/Git/OpenSource/coffee-editor/web/node_modules/@theia/terminal/lib/node/base-terminal-server.js:41:53)
at /home/philip/Git/OpenSource/coffee-editor/web/node_modules/@theia/terminal/lib/node/base-terminal-server.js:35:71
at new Promise (<anonymous>)
at __awaiter (/home/philip/Git/OpenSource/coffee-editor/web/node_modules/@theia/terminal/lib/node/base-terminal-server.js:31:12)
at ShellTerminalServer.BaseTerminalServer.getCwdURI (/home/philip/Git/OpenSource/coffee-editor/web/node_modules/@theia/terminal/lib/node/base-terminal-server.js:130:16)
at JsonRpcProxyFactory.<anonymous> (/home/philip/Git/OpenSource/coffee-editor/web/node_modules/@theia/core/lib/common/messaging/proxy-factory.js:220:73)
at step (/home/philip/Git/OpenSource/coffee-editor/web/node_modules/@theia/core/lib/common/messaging/proxy-factory.js:48:23)
at Object.next (/home/philip/Git/OpenSource/coffee-editor/web/node_modules/@theia/core/lib/common/messaging/proxy-factory.js:29:53)
root ERROR [hosted-plugin: 3101] Promise rejection not handled in one second: Error: the debug session connection is disposed, id: c1856233-769a-4ee9-a697-cdbd8b2ffb4d , reason: Error: the debug session connection is disposed, id: c1856233-769a-4ee9-a697-cdbd8b2ffb4d
root ERROR [hosted-plugin: 3101] With stack trace: Error: the debug session connection is disposed, id: c1856233-769a-4ee9-a697-cdbd8b2ffb4d
at DebugSessionConnection.push.../node_modules/@theia/debug/lib/browser/debug-session-connection.js.DebugSessionConnection.checkDisposed (http://127.0.0.1:3000/27.bundle.js:2127:19)
at DebugSessionConnection.push.../node_modules/@theia/debug/lib/browser/debug-session-connection.js.DebugSessionConnection.newEmitter (http://127.0.0.1:3000/27.bundle.js:2338:14)
at DebugSessionConnection.push.../node_modules/@theia/debug/lib/browser/debug-session-connection.js.DebugSessionConnection.getEmitter (http://127.0.0.1:3000/27.bundle.js:2332:55)
at DebugSessionConnection.push.../node_modules/@theia/debug/lib/browser/debug-session-connection.js.DebugSessionConnection.doFire (http://127.0.0.1:3000/27.bundle.js:2329:14)
at DebugSessionConnection.push.../node_modules/@theia/debug/lib/browser/debug-session-connection.js.DebugSessionConnection.handleEvent (http://127.0.0.1:3000/27.bundle.js:2312:22)
at DebugSessionConnection.push.../node_modules/@theia/debug/lib/browser/debug-session-connection.js.DebugSessionConnection.handleMessage (http://127.0.0.1:3000/27.bundle.js:2259:18)
at PluginMessageReader.callback (http://127.0.0.1:3000/27.bundle.js:2149:79)
at PluginMessageReader.push.../node_modules/@theia/plugin-ext/lib/common/plugin-message-reader.js.PluginMessageReader.readMessage (http://127.0.0.1:3000/51.bundle.js:331:18)
at ConnectionMainImpl.<anonymous> (http://127.0.0.1:3000/51.bundle.js:2138:53)
at step (http://127.0.0.1:3000/51.bundle.js:2103:23)
```
I retested the CPP debug after a restart and now it works. Strange... 🤷 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In general I think it's pretty good :)
- I like that you adapted the welcome tab. However it reads a bit bloaty. As the text is often the same for Java and C++ except for a few choice words, it feels like filler. I think the sections should just be combined.
- The welcome section is missing the part on how the C++ code can be built.
- The
clangd
support doesn't properly work. When generating the C++ files, all the files show errors as there is nocompile_commands.json
. I have to build the C++ files AND restart Theia (or execute the restart clangd command) for it to work. Then when deleting and regenerating the files they don't show any errors UNTIL restart. I guess thecompile_commands.json
is cached in between. As the generatedcompile_commands.json
is really straightforward, I would like to suggest to generate it together with the rest of the C++ code. Alternatively you could build the code immediately when generated. I think one of these two solutions should be implemented for a better experience. Idea: Maybe the build task could also run the restart clangd server command?
- Clangd for C/C++ editing support | ||
- Debug for C/C++ debugging support | ||
- Java LSP | ||
- Java Debug |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe use the actual names and link them?
<p>The coffee editor provides full-fleged C++ tooling (based on clangd) including syntax highlighting and auto completion. | ||
This is based on the Monaco code editor and a C++ language server connected via LSP. Make sure you | ||
have generated the code first (see above). Then, open any C++ file |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
<p>The coffee editor provides full-fleged C++ tooling (based on clangd) including syntax highlighting and auto completion. | |
This is based on the Monaco code editor and a C++ language server connected via LSP. Make sure you | |
have generated the code first (see above). Then, open any C++ file | |
<p>The coffee editor provides full-fleged C++ tooling including syntax highlighting and auto completion. | |
This is based on the Monaco code editor and the "clangd" C++ language server connected via LSP. Make sure you | |
have generated the code first (see above). Then, open any C++ file |
8ab1992
to
b338086
Compare
@@ -110,16 +111,25 @@ export class WelcomePageWidget extends ReactWidget { | |||
</div> | |||
<div className='flex-grid'> | |||
<div className='col'> | |||
{this.renderFeatureSection('Code Generator', 'fas fa-cogs', ( | |||
{this.renderFeatureSection('Java Code Generator', 'fas fa-cogs', ( | |||
<p>The coffee editor allows generating example code based on the current model. The code generator itself is written | |||
using Xtend. Right click the file "superbrewer3000.coffee" in the file explorer and select "Generate Workflow code". |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should rename this action to "Generate Java Workflow code
8263a8d
to
1453f5b
Compare
- add code generator for c++ code - add build task - add debug launch config - update docker image to support c++ - update welcome-page to include c++
1453f5b
to
39c8f9e
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It works 👍
In general I still don't like that:
- We have repetitive sections in the quick starter, i.e.
Java Code Generator
andC++ Code Generator
are 80% the same text. I would like to see the Java and C++ sections combined. - The C++ makefiles and binary are just dumped into the
cpp/src
folder - The src files are overwritten when regenerating the code, losing all custom code.
Let us create issues for this. The first one you can ssign to me. For the second one, some spec would be nice. The last one I personall find OK for a Demo |
I created follow ups: |
If I'm not mistaken we have that for the Java generated code. All I would do is to not overwrite src files but only header files on generation. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As we create follow up issues I'm fine to merge this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, looks good to me! 👍