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

'Format Document' command isn't functional in Java Language. #1068

Closed
DustFinger001 opened this issue Jan 17, 2018 · 5 comments · Fixed by #1583
Closed

'Format Document' command isn't functional in Java Language. #1068

DustFinger001 opened this issue Jan 17, 2018 · 5 comments · Fixed by #1583
Assignees
Labels
java issues related to the java language

Comments

@DustFinger001
Copy link

DustFinger001 commented Jan 17, 2018

Clicked the menu item 'Format Document' is no effect,When editing a java source code document.
image
But in a javascript document, this command would preformed an act of expectation.
image
And I want 'Format Document' command is functional in a custom language. what should l do ?

@svenefftinge
Copy link
Contributor

It is part of the language server protocol, that Theia supports. Does your language have a language server?

@svenefftinge svenefftinge added the java issues related to the java language label Jan 19, 2018
@DustFinger001
Copy link
Author

My custom language had not have a language server, i will work it out.
The 'Format Document' was not working in java language. Was it a issue or to-do?

@svenefftinge svenefftinge changed the title 'Format Document' command is't functional in Java Language. 'Format Document' command isn't functional in Java Language. Jan 22, 2018
@svenefftinge
Copy link
Contributor

https://github.com/eclipse/eclipse.jdt.ls supports it so it should work.
@gorkem Could it be that the java LS expects specific settings on initialize to enable formatting?

@gorkem
Copy link
Contributor

gorkem commented Feb 9, 2018

@svenefftinge There should not be anything specific I will check it out.

@gorkem gorkem self-assigned this Feb 9, 2018
@gorkem
Copy link
Contributor

gorkem commented Mar 25, 2018

This is due to initialization issue as described on eclipse-jdtls/eclipse.jdt.ls#601. It is also affected from #1577

gorkem added a commit to gorkem/theia that referenced this issue Mar 27, 2018
Updates the server to the latest snapshot which includes
a fix that is required for Theia. Also changes the way
language server is started to adjust to the changes
on environment variables.

fixes eclipse-theia#1068
gorkem added a commit to gorkem/theia that referenced this issue Mar 27, 2018
Updates the server to the latest snapshot which includes
a fix that is required for Theia. Also changes the way
language server is started to adjust to the changes
on environment variables.

fixes eclipse-theia#1068

Signed-off-by: Gorkem Ercan <[email protected]>
gorkem added a commit to gorkem/theia that referenced this issue Mar 27, 2018
Updates the server to the latest snapshot which includes
a fix that is required for Theia. Also changes the way
language server is started to adjust to the changes
on environment variables.

fixes eclipse-theia#1068

Signed-off-by: Gorkem Ercan <[email protected]>
gorkem added a commit to gorkem/theia that referenced this issue Mar 28, 2018
Updates the server to the latest snapshot which includes
a fix that is required for Theia. Also changes the way
language server is started to adjust to the changes
on environment variables.

fixes eclipse-theia#1068

Signed-off-by: Gorkem Ercan <[email protected]>
gorkem added a commit to gorkem/theia that referenced this issue Mar 28, 2018
Updates the server to the latest snapshot which includes
a fix that is required for Theia. Also changes the way
language server is started to adjust to the changes
on environment variables.

fixes eclipse-theia#1068

Signed-off-by: Gorkem Ercan <[email protected]>
gorkem added a commit to gorkem/theia that referenced this issue Apr 3, 2018
Updates the server to the latest snapshot which includes
a fix that is required for Theia. Also changes the way
language server is started to adjust to the changes
on environment variables.

fixes eclipse-theia#1068

Signed-off-by: Gorkem Ercan <[email protected]>
gorkem added a commit to gorkem/theia that referenced this issue Apr 5, 2018
Updates the server to the latest snapshot which includes
a fix that is required for Theia. Also changes the way
language server is started to adjust to the changes
on environment variables.

fixes eclipse-theia#1068

Signed-off-by: Gorkem Ercan <[email protected]>
gorkem added a commit to gorkem/theia that referenced this issue Apr 9, 2018
Updates the server to the latest snapshot which includes
a fix that is required for Theia. Also changes the way
language server is started to adjust to the changes
on environment variables.

fixes eclipse-theia#1068

Signed-off-by: Gorkem Ercan <[email protected]>
gorkem added a commit that referenced this issue Apr 16, 2018
Updates the server to the latest snapshot which includes
a fix that is required for Theia. Also changes the way
language server is started to adjust to the changes
on environment variables.

fixes #1068

Signed-off-by: Gorkem Ercan <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
java issues related to the java language
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants