Skip to content
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 languageserver support #2

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from
Draft

add languageserver support #2

wants to merge 2 commits into from

Conversation

pngdrift
Copy link
Owner

@pngdrift pngdrift commented Nov 29, 2024

At the moment, autocomplete doesn't work correctly, all kinds of options are offered that do not even fit, and somewhere it doesn't work at all, idk why.

@pngdrift pngdrift added enhancement New feature or request help wanted Extra attention is needed labels Nov 29, 2024
@pngdrift pngdrift linked an issue Nov 29, 2024 that may be closed by this pull request
@Fancy2209
Copy link

Fancy2209 commented Dec 9, 2024

What do you mean by options that don't fit? Do you mean the Apache Royale specific options?

@pngdrift
Copy link
Owner Author

pngdrift commented Feb 8, 2025

As it turned out, this is due to an error in the as3mxml language-server

stderr: Feb 08, 2025 5:45:59 PM org.eclipse.lsp4j.jsonrpc.RemoteEndpoint handleNotification
stderr: WARNING: Notification threw an exception: {
stderr: "jsonrpc": "2.0",
stderr: "method": "textDocument/didChange",
stderr: "params": {
stderr: "textDocument": {
stderr: "version": 1,
stderr: "uri": "file:///home/aivaz/Documents/ProTLVK/src/pngdrift/test/BlownOffTurretPhysics.as"
stderr: },
stderr: "contentChanges": [
stderr: {
stderr: "range": {
stderr: "start": {
stderr: "line": 120,
stderr: "character": 64
stderr: },
stderr: "end": {
stderr: "line": 120,
stderr: "character": 65
stderr: }
stderr: },
stderr: "text": ""
stderr: }
stderr: ]
stderr: }
stderr: }
stderr: java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
stderr: at org.eclipse.lsp4j.jsonrpc.services.GenericEndpoint.lambda$null$0(GenericEndpoint.java:67)
stderr: at org.eclipse.lsp4j.jsonrpc.services.GenericEndpoint.notify(GenericEndpoint.java:152)
stderr: at org.eclipse.lsp4j.jsonrpc.RemoteEndpoint.handleNotification(RemoteEndpoint.java:220)
stderr: at org.eclipse.lsp4j.jsonrpc.RemoteEndpoint.consume(RemoteEndpoint.java:187)
stderr: at org.eclipse.lsp4j.jsonrpc.json.StreamMessageProducer.handleMessage(StreamMessageProducer.java:194)
stderr: at org.eclipse.lsp4j.jsonrpc.json.StreamMessageProducer.listen(StreamMessageProducer.java:94)
stderr: at org.eclipse.lsp4j.jsonrpc.json.ConcurrentMessageProcessor.run(ConcurrentMessageProcessor.java:113)
stderr: at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:572)
stderr: at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:317)
stderr: at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144)
stderr: at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642)
stderr: at java.base/java.lang.Thread.run(Thread.java:1575)
stderr: Caused by: java.lang.reflect.InvocationTargetException
stderr: at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:115)
stderr: at java.base/java.lang.reflect.Method.invoke(Method.java:580)
stderr: at org.eclipse.lsp4j.jsonrpc.services.GenericEndpoint.lambda$null$0(GenericEndpoint.java:65)
stderr: ... 11 more
stderr: Caused by: java.lang.NullPointerException: Cannot invoke "java.lang.Integer.intValue()" because the return value of "org.eclipse.lsp4j.TextDocumentContentChangeEvent.getRangeLength()" is null
stderr: at com.as3mxml.vscode.utils.FileTracker.patch(FileTracker.java:131)
stderr: at com.as3mxml.vscode.utils.FileTracker.changeFile(FileTracker.java:67)
stderr: at com.as3mxml.vscode.ActionScriptServices.didChange(ActionScriptServices.java:924)
stderr: at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)
stderr: ... 13 more
stderr:

It should be fixed with the acceptance of BowlerHatLLC/vscode-as3mxml#792

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Provide Language Server
2 participants