Providing support for occurrences highlighting, with a
restriction due a bug in the io.typefox.lsapi.services 0.3.0
bundle, which assumes that the language server will return
a single occurrence to highlight, instead of a list of
occurrences.
Signed-off-by: Xavier Coulon <xcoulon@redhat.com>
Added a ShowMessageProcessor and a ShowMessageMessager classes to process
incoming `window/showMessage` notification and display a notification
in `float` mode in the UI if the message type is `error` or `warning`, in
the events panel otherwise. Note that the notification type for `error`
messages is incorrectly set to `Log` because of a bug in the typefox
dependency: `io.typefox.lsapi.MessageType#Log` has the value `1` instead of
`4`.
This issue depends on https://github.com/eclipse/che/pull/3113
(Add a 'warning' state for the notifications)
To test the pull request, please follow the instructions on
https://github.com/eclipse/che/pull/3123 to run the 'test-lang' server.
Once in the workspace, create a project, add a `foo.test` file (the
Language Server support for the 'test-lang' will be activated), then
type the following line
> window/showMessage:error: a message
and wait for the editor to save the changes. This will trigger a
`window/showMessage` notification from the 'test-lang' server in the Che UI.
Signed-off-by: Xavier Coulon <xcoulon@redhat.com>
* Avoid overloading the DOM tree of the ContentAssistWidget
Signed-off-by: Kaloyan Raev <kaloyan.r@zend.com>
* Ensure the code assist widget is closed when applying proposal
Signed-off-by: Kaloyan Raev <kaloyan.r@zend.com>
* Respect isIncomplete flag in the completion result
If the isIncomplete flag is false, i.e. the completion result is
complete, then additional typing for the same word should not trigger a
new completion request. The latest completion result should be reused.
Signed-off-by: Kaloyan Raev <kaloyan.r@zend.com>
* Fix flickering between keystrokes during code completion
Signed-off-by: Kaloyan Raev <kaloyan.r@zend.com>
* Fine tune the rules for making new completion request
Signed-off-by: Kaloyan Raev <kaloyan.r@zend.com>
* Set the correct offset when applying code completion
* Force a completion request message on Ctrl+Space
Signed-off-by: Kaloyan Raev <kaloyan.r@zend.com>
* Fixed retrieval of CompletionItem document via Resolve request
Signed-off-by: Kaloyan Raev <kaloyan.r@zend.com>
* Fixes#2728: Respect user settings when sending formatting options to LS
Signed-off-by: Kaloyan Raev <kaloyan.r@zend.com>
* Remove spaces in empty line
* Get projects after workspace has been already initialized
This commit also includes API reorganization. Move client service implementations from the core-api to the core-app. Code cleanup. Removed dependency to the javax.inject from the core-api to avoid duplicate using @Inject annotation from the com.google.inject and javax.inject. (Client side uses only com.google.inject.Inject annotation)
Created two components:
WsAgentInitializer - which is responsible to initialize workspace component on the client side. Component consumes developer machine object at startup stage.
WsAgentMessageBusProvider - which is responsible to initialize message bus after workspace has been initialized.
API movements:
OAuthServiceClient was moved from the org.eclipse.che.ide.api.auth to the org.eclipse.ide.api.oauth
* Move WsAgentInitizalizer to the core-app
* Add @Override annotation
* Add @Override annotation
* Remove @Singleton annotation
* Remove @Singleton annotation
* Revert javax.inject.Inject annotation
* Update codebase due to changes in the master branch
If the hover message consists of multiple MarkedStrings then they should
be joined via double newline, so they are rendered as seperate Markdown
paragraphs.
If a MarkedString has the `language` property provided then it should be
rendered as a Markdown code block.
Signed-off-by: Kaloyan Raev <kaloyan.r@zend.com>
* Fixes#2592: Filter code completion proposals from language server
Implements filtering based on the existing FuzzyMatches used for the
GoToSymbolAction.
Signed-off-by: Kaloyan Raev <kaloyan.r@zend.com>
* Add empty line at end of file.
* Fixes#2437: Shift remaining ranges when applying multi-edit formatting
A formatting request to a language server may result in a list of
multiple text edits. The ranges of all these text edits are based on the
yet unmodified document. Che applies the edits to the document one by
one. If the inserted text has a different length than the replaced text
then the ranges of the remaining edits become invalid and they must be
shifted appropriately.
This patch shifts the ranges as necessary. To achieve this, it first
converts the ranges based on lines and characters to linear ranges,
which are easier for shifting.
Signed-off-by: Kaloyan Raev <kaloyan.r@zend.com>
* Simplify the shifting logic
Signed-off-by: Kaloyan Raev <kaloyan.r@zend.com>
* Reworked: just applying the text edits backwards is enough
The protocol specifies that the InitializeParams object contains a
capabilities property. Eclipse Che does not define it, so there are
language servers that fails to initialize because of this.
Signed-off-by: Kaloyan Raev <kaloyan.r@zend.com>