-
Notifications
You must be signed in to change notification settings - Fork 61
Display more specific JDT error messages #68
Comments
Taking a bit of a closer look at this, it looks like atom-languageclient only listens in on the child's stderr stream. But the JDT server actually throws a bunch of useful info (e.g. stacktraces) into stdout using the method
Which is immediately preceded by (stacktrace truncated by me):
I can throw in a hook that displays notifications from these errors along with expandable stacktraces. @damieng Would it be better if this sort of thing just went into atom-languageclient following the pattern of |
We do currently display logMessages in the new Console window in atom-ide-ui. language/status is a non-standard message so we don't want to do anything in atom-languageclient with it there. If you open the console window in atom-ide-ui (View > Toggle Console) does the error look good there? I wonder if we should just auto-show the Console if it receives an error? |
No actually when I reproduce this specific JDT load error the console just stays blank. Which makes sense because I couldn't find anywhere in the code (in this repo or atom-languageclient) that actually hooks into the child process stdout stream. I actually wasn't really aware of the console.. I can take a closer look at it tonight. |
You won't see anything looking specifically at stdin/stdout as that is what the vscode-jsonrpc library uses as its communication channel between the client and server when talking the language server protocol (it can also use sockets and ipc but for ide-java we just used stdin/stdout). That message you see window/logMessage is a jsonrpc message that will come through atom-languageclient as a 'logMessage' notification and should be appearing in the devtools output window as well if you've turned on message logging with |
I see, yeah I do see the stacktraces when that config option is set. I get these "Incomplete classpath" errors enough that it would probably be worthwhile to add it to the console and possibly modify the warning notification with more specifics, at minimum a note telling the user to look at the console. But if we get a |
You should file an issue on eclipse.jdt.ls about changing these non-standard messages to something that fits within the LSP spec 😉. |
We currently map all those language/status messages to the status bar in ide-java - I think we might want to just make it bigger or put some kind of PR into status-bar to allow hover text for the full content. |
I think a hover text would be ideal if it's kept in the status bar. I find I have just enough status bar based packages that a full message will rarely fit and I'm sure I'm not alone on that. At that rate though auto-focusing the Atom IDE console would also be a good idea (as mentioned before), from a UX perspective a truncated status bar message might be easy to miss. @Arcanemagus Probably a good idea.. Definitely not advocating to handle anything non-standard in the language client package. |
Looked into getting log messages into the Console, after adding console to Unsure what to do about this, but could be solved by adding a hook to the language client Edit: |
Just got an error on JDT startup with this message:
Which was displayed in the server status section of my statusbar, so it was truncated (had to use the inspector to view the HTML to actually get the whole message). Yet the warning I got as an Atom notification was the standard "Incomplete classpath" message. It would be nice to display these more specific errors in a notification, along with whatever possible information it can get from the JDT server as to why it wouldn't start.
The text was updated successfully, but these errors were encountered: