GithubHelp home page GithubHelp logo

adacore / ada-intellij Goto Github PK

View Code? Open in Web Editor NEW
21.0 30.0 8.0 585 KB

Support for Ada and SPARK languages in IntelliJ IDEA

License: Apache License 2.0

Java 77.41% Ada 20.62% Makefile 0.16% CSS 0.02% JavaScript 1.73% Python 0.04% C 0.01% C++ 0.02%

ada-intellij's Introduction

Ada-IntelliJ

Ada-IntelliJ is a plugin for IntelliJ-based IDEs adding support for the Ada programming language, with many planned features including syntax and error highlighting, code completion, reference resolution, project management, building, and more.

The plugin is currently under development and most supported features are still experimental. If you encounter problems/bugs, please submit an issue to this repository.

Supported Features

  • Recognizing .adb, .ads and .gpr files
  • Limited syntax highlighting for .adb, .ads and .gpr files
  • Syntax error highlighting for .adb and .ads files
  • Basic project file and GPRbuild support:
    • Build configurations
    • Build arguments
    • Scenario variables
    • Location hyperlinks in output errors
  • Basic references/usages features:
    • Goto definition
    • Usage highlighting
    • Find references
  • Global symbol renaming
  • Code outline
  • Code completion
  • Quick line commenting/uncommenting
  • Project creation from predefined templates

Sections

Development

The plugin is written entirely in Java 8. The highest usable Java version is upper-bounded by that of the JBRE which at the time of writing is based on OpenJDK 8.

The plugin architecture is centered around the Microsoft Language Server Protocol (LSP). It is therefore designed in such a way as to perform as little Ada code analysis as possible. Instead, it features an integrated LSP client and relies on an external Ada LSP server in order to achieve most of the smart features it provides. The integrated LSP client is tailored to work with the Ada Language Server (ALS), a specific implementation of an LSP server for Ada with minor extensions to provide support for Ada-specific features such as project files and GPRbuild scenario variables.

The project depends directly on the following:

The project makes heavy use of JetBrains annotations such as @Contract(...), @NotNull and @Nullable. IntelliJ IDEA runs live inspections based on these annotations and reports redundancies, potential problems and improvements directly in the source code. It is therefore recommended to use IntelliJ IDEA when working on the project in order to make the most out of these annotations.

You can find a list of change notes here.

Useful resources:

Gradle

The project uses Gradle and the Gradle IntelliJ plugin for building, testing, packaging and deploying the plugin. In the following sections, the given instructions involve running Gradle tasks from the command-line using the Gradle wrapper script. A Gradle task called example can be run as follows:

# Linux / macOS
./gradlew example
@REM Windows
gradlew.bat example

Note that all Gradle tasks can also be run from within IntelliJ IDEA's Gradle plugin interface.

Building the Plugin

Steps

  1. Clone the project (or download the latest release and extract it) and move into the root directory

  2. Run the Gradle wrapper script with the build task

The build task involves running JUnit tests (see Testing the plugin) after compiling the Java sources, which is recommended when running the plugin by installing it from disk to ensure that it passes the tests first. If however you wish to build the plugin without running the tests, use the buildPlugin task instead.

All build-generated files reside in the build/ directory and can be cleaned up by running the clean task.

Running the Plugin

There are currently two ways to run the plugin in an IntelliJ IDE.

Note that in order to enable smart features such as code completion and goto-definition, you need to install the Ada Language Server (follow the instructions here).

Using Gradle (recommended)

This is the easier and recommended method as it does not require any additional installation, not even an IntelliJ-based IDE! The Gradle wrapper takes care of fetching all the dependencies, including an appropriate version of IntelliJ IDEA CE, and running it in a sandboxed environment with the plugin installed.

Even though the plugin should in general never affect the configuration of the IDE instance in which it is installed, this may still happen due to a bug that might appear during the development phase, which is why this method is recommended as it does not involve installing the plugin to your IDE installation. If however you wish to try the plugin without giving up all your IDE configurations, or you wish to try it on an IntelliJ IDE other than IDEA, then you may proceed with Installing the Plugin from Disk at your own risk.

Steps

  1. Clone the project (or download the latest release and extract it) and move into the root directory

Before running the plugin, you may want to run the tests and make sure they all pass.

  1. Run the Gradle wrapper script with task runIde

That's it! If all goes well, IntelliJ IDEA should start with the plugin installed.

Installing the Plugin from Disk

This method requires building the project with Gradle before installing it to an IntelliJ IDE.

Steps

  1. Clone/Download and build the plugin, making sure that the build is successful

  2. Open the IntelliJ-based IDE of your choice and go to File | Settings | Plugins

  3. Click on Install plugin from disk... (to access this option in newer version, you first need to click on the gear icon next to the Updates tab)

  4. In the file chooser that opens, navigate to the directory of the cloned/extracted Ada-IntelliJ repo, then from there navigate into build > distributions and choose the zip archive named Ada-IntelliJ-<version>.zip (if the distributions directory does not exist then the build in step 1 probably failed)

  5. Finally, in the Plugins tab of the Settings window, click on Restart <IDE name>

If all goes well, your IDE should restart with the plugin installed.

Testing the Plugin

The project uses JUnit5 for testing.

Currently, only the lexer and lexer regex classes are tested. We have plans to set up more comprehensive tests, which is tricky given the limitations of testing within the IntelliJ platform.

Test source files are located in src/test/control/ and test resource files are located in src/test/resources/.

Steps

  1. Clone the project (or download the latest release and extract it) and move into the root directory

  2. Run the Gradle wrapper script with task test

If no test failures are reported, then all the tests passed.

A comprehensive test report including success rates and execution durations is automatically generated by Gradle in HTML form and can be found in build/reports/tests/test/.

ada-intellij's People

Contributors

benconvey avatar enzbang avatar georgemackayshore avatar raja-s avatar setton avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ada-intellij's Issues

java.lang.IllegalStateException: getClient must not return null

This exception might not be very important. I got it only once, when I opened the first Ada file on the first time I run the plugin.

In file: file:///home/artium/Projects/Ada_Curve/src/curve.adb

java.lang.IllegalStateException: @NotNull method com/adacore/adaintellij/lsp/AdaLSPDriver.getClient must not return null
	at com.adacore.adaintellij.lsp.AdaLSPDriver.$$$reportNull$$$0(AdaLSPDriver.java)
	at com.adacore.adaintellij.lsp.AdaLSPDriver.getClient(AdaLSPDriver.java:246)
	at com.adacore.adaintellij.analysis.semantic.diagnostics.AdaAnnotator.annotate(AdaAnnotator.java:50)
	at com.intellij.codeInsight.daemon.impl.DefaultHighlightVisitor.runAnnotators(DefaultHighlightVisitor.java:139)
	at com.intellij.codeInsight.daemon.impl.DefaultHighlightVisitor.visit(DefaultHighlightVisitor.java:102)
	at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.runVisitors(GeneralHighlightingPass.java:366)
	at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.lambda$collectHighlights$5(GeneralHighlightingPass.java:298)
	at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.analyzeByVisitors(GeneralHighlightingPass.java:325)
	at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.lambda$analyzeByVisitors$6(GeneralHighlightingPass.java:328)
	at com.intellij.codeInsight.daemon.impl.DefaultHighlightVisitor.analyze(DefaultHighlightVisitor.java:86)
	at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.analyzeByVisitors(GeneralHighlightingPass.java:328)
	at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.collectHighlights(GeneralHighlightingPass.java:295)
	at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.collectInformationWithProgress(GeneralHighlightingPass.java:238)
	at com.intellij.codeInsight.daemon.impl.ProgressableTextEditorHighlightingPass.doCollectInformation(ProgressableTextEditorHighlightingPass.java:83)
	at com.intellij.codeHighlighting.TextEditorHighlightingPass.collectInformation(TextEditorHighlightingPass.java:69)
	at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.lambda$null$1(PassExecutorService.java:423)
	at com.intellij.openapi.application.impl.ApplicationImpl.tryRunReadAction(ApplicationImpl.java:1151)
	at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.lambda$doRun$2(PassExecutorService.java:416)
	at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:580)
	at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:525)
	at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:85)
	at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.doRun(PassExecutorService.java:415)
	at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.lambda$run$0(PassExecutorService.java:391)
	at com.intellij.openapi.application.impl.ReadMostlyRWLock.executeByImpatientReader(ReadMostlyRWLock.java:147)
	at com.intellij.openapi.application.impl.ApplicationImpl.executeByImpatientReader(ApplicationImpl.java:218)
	at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.run(PassExecutorService.java:389)
	at com.intellij.concurrency.JobLauncherImpl$VoidForkJoinTask$1.exec(JobLauncherImpl.java:161)
	at java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:289)
	at java.util.concurrent.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1056)
	at java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1692)
	at java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:157)

Following exceptions happened soon after this one, most probably they are induced.


2018-12-13T00:04:36.941
In file: file:///home/artium/Projects/Ada_Curve/src/curve.adb
java.lang.IllegalStateException: @NotNull method com/adacore/adaintellij/lsp/AdaLSPDriver.getClient must not return null
	at com.adacore.adaintellij.lsp.AdaLSPDriver.$$$reportNull$$$0(AdaLSPDriver.java)
	at com.adacore.adaintellij.lsp.AdaLSPDriver.getClient(AdaLSPDriver.java:246)
	at com.adacore.adaintellij.analysis.semantic.diagnostics.AdaAnnotator.annotate(AdaAnnotator.java:50)
	at com.intellij.codeInsight.daemon.impl.DefaultHighlightVisitor.runAnnotators(DefaultHighlightVisitor.java:139)
	at com.intellij.codeInsight.daemon.impl.DefaultHighlightVisitor.visit(DefaultHighlightVisitor.java:102)
	at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.runVisitors(GeneralHighlightingPass.java:366)
	at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.lambda$collectHighlights$5(GeneralHighlightingPass.java:304)
	at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.analyzeByVisitors(GeneralHighlightingPass.java:325)
	at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.lambda$analyzeByVisitors$6(GeneralHighlightingPass.java:328)
	at com.intellij.codeInsight.daemon.impl.DefaultHighlightVisitor.analyze(DefaultHighlightVisitor.java:86)
	at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.analyzeByVisitors(GeneralHighlightingPass.java:328)
	at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.collectHighlights(GeneralHighlightingPass.java:295)
	at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.collectInformationWithProgress(GeneralHighlightingPass.java:238)
	at com.intellij.codeInsight.daemon.impl.ProgressableTextEditorHighlightingPass.doCollectInformation(ProgressableTextEditorHighlightingPass.java:83)
	at com.intellij.codeHighlighting.TextEditorHighlightingPass.collectInformation(TextEditorHighlightingPass.java:69)
	at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.lambda$null$1(PassExecutorService.java:423)
	at com.intellij.openapi.application.impl.ApplicationImpl.tryRunReadAction(ApplicationImpl.java:1151)
	at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.lambda$doRun$2(PassExecutorService.java:416)
	at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:580)
	at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:525)
	at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:85)
	at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.doRun(PassExecutorService.java:415)
	at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.lambda$run$0(PassExecutorService.java:391)
	at com.intellij.openapi.application.impl.ReadMostlyRWLock.executeByImpatientReader(ReadMostlyRWLock.java:147)
	at com.intellij.openapi.application.impl.ApplicationImpl.executeByImpatientReader(ApplicationImpl.java:218)
	at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.run(PassExecutorService.java:389)
	at com.intellij.concurrency.JobLauncherImpl$VoidForkJoinTask$1.exec(JobLauncherImpl.java:161)
	at java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:289)
	at java.util.concurrent.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1056)
	at java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1692)
	at java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:157)

Ada language server notfound on the PATH on OSX

As the title states I get an error complaining the ada language server isn't found on the path when I first open Itellij IDEA CE 2020.1.

I have downloaded the binaries and added them to the path as suggested in the read me. I'm on OSX so i've added them in my ~/.bash_profile file...
PATH="/Users/benconvey/Downloads/darwin3:/Users/benconvey/.pyenv/bin:/Users/benconvey/install/bin:$PATH";
(ada_language_server is in the darwin3 folder)

Digging a little deeper, I then downloaded the plugin and opened it as a project in intellij, added some logging, built it and installed the plugin from disc within the same IDEA instance before restarting

It seems that the path IDEA has doesnt include anything I add via the bash_profile file


import com.adacore.adaintellij.notifications.AdaIJNotification;
import com.intellij.notification.NotificationType;
import com.intellij.notification.Notifications;
import com.intellij.openapi.actionSystem.AnAction;
import com.intellij.openapi.actionSystem.AnActionEvent;

public class BensAction extends AnAction {
    @Override
    public void actionPerformed(AnActionEvent e) {
        String[] paths = System.getenv("PATH").split(System.getProperty("path.separator"));

        for(String path : paths) {
            Notifications.Bus.notify(new AdaIJNotification(
                    "PATH path: ",
                    path,
                    NotificationType.INFORMATION
            ));
        }
    }
}

in plugin.xml

...other stuff
		<action id="com.adacore.adaintellij.actions.BensAction" class="com.adacore.adaintellij.actions.BensAction"
				text="print paths">
			<add-to-group group-id="EditMenu" anchor="first"/>
		</action>

Screen Shot 2020-04-09 at 13 34 26

Weirdly, If I then run the plugin within a development instance, everything works fine and the path DOES include the contents of my bash_profile file

Screen Shot 2020-04-09 at 13 58 50

Where does the development instance get its PATH from?

Plugin does not seem to work when installed from marketplace

I installed the plugin via the JetBrains marketplace, and it doesn't seem to have set up correctly.

  • A new Ada project immediately reports, "Error adding module to project: Project setup started while no project template has been selected"
  • In projects that are not Ada projects, it sends a message at startup: "Ada-IntelliJ Plugin - No Compiler Found on the PATH: Please set the gprbuild path in Run | Edit Configurations."
  • When I open Run | Edit Configurations, it is not at all clear how I am supposed to set up a gprbuild path.

Questions:

  • Is there any documentation on how to use this when installed from the plugin store? The only documentation I see here indicates how to build it and install it, and appears to assume from then on that things will simply work.
  • The plugin documentation does mention Eclipse LSP4J, is this the same as the LSP plugin for Idea, or something different? My impression is that it's something different; if so, do I have to build it myself? or is this just needed for building the plugin?

What is ALS and how do I get it?

I built and run the current development version of the plugin.

Auto completion and go to reference features are not working.

There is a a warning in the event log:

2:34 PM Ada-IntelliJ Plugin - Ada Language Server not found on PATH: In order to provide semantic features and smart assistance for Ada, the Ada-IntelliJ plugin relies heavily on the Ada Language Server (ALS). To enable these features, you need download and install the ALS, add it to your PATH, then reload open projects for the effect to take place.

Where do I get ALS?

Can it be part of the plugin itself?

Send LSP text synchronization save requests/notifications

LSP save methods textDocument/didSave, textDocument/willSave and textDocument/willSaveWaitUntil are implemented but the requests/notifications are currently never sent to the server.
The FileDocumentManagerListener interface is probably what we need for willSave and willSaveWaitUntil, however there doesn't seem to be support for a listener to be called after a document is saved, so I'm not sure how sending didSave notifications can be implemented.

AdaFoldingBuilderTest.testFolds() fails

When trying to invoke ./gradlew build, I get the following error:

> Task :test
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by com.intellij.util.ReflectionUtil (file:/home/kosztadani/.gradle/caches/modules-2/files-2.1/com.jetbrains.intellij.idea/ideaIC/2020.1/cbeeb1f1aebd4c9ea8fb5ab990c5904a676fc41a/ideaIC-2020.1/lib/util.jar) to field java.io.DeleteOnExitHook.files
WARNING: Please consider reporting this to the maintainers of com.intellij.util.ReflectionUtil
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release

com.adacore.adaintellij.misc.AdaFoldingBuilderTest > testFolds() FAILED
    com.intellij.testFramework.LoggedErrorProcessor$TestLoggerAssertionError
        Caused by: java.lang.NullPointerException

52 tests completed, 1 failed

> Task :test FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':test'.
> There were failing tests. See the report at: file:///tmp/Ada-IntelliJ/build/reports/tests/test/index.html

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 7s
12 actionable tasks: 3 executed, 9 up-to-date

Gradle build scan: https://scans.gradle.com/s/24glpoder2z2k

Configuration listeners not notified when a GPRbuild configuration is modified from GPRbuild tool window

RunManagerListeners registered with RunManagerImpl#addRunManagerListener(RunManagerListener) are not notified when a configuration is modified from the GPRbuild tool window. This is probably due to the fact that all configuration data (gprbuild arguments and scenario variables) are stored and modified entirely on the plugin side, and therefore the run manager has no idea that a configuration has been changed when the plugin defined methods GPRbuildConfiguration#setGprbuildArguments(String) and GPRbuildConfiguration#setScenarioVariables(Map) are called.

One possible solution is to manually implement configuration change events/listeners for GPRbuild configurations only, by maintaining a set of listeners in GPRbuildConfigurationManager and notifying them whenever the custom GPRbuild configuration modification methods are called.

Trailing spaces from commenter causing builds to fail

The Ada commenter currently returns the comment prefix -- followed by two spaces to follow GNAT coding style. The IDE seems to comment empty lines as well, which results in trailing spaces in those lines causing builds to fail.
There does not seem to be a way to implement "dynamic" commenting in the IntelliJ platform, for example a commenter that takes as an argument the line to be commented and returns a prefix to comment that line with, so we need to find another way to solve this. The simplest solution would probably be some hack involving a change listener that figures out which lines were commented and manually strips them from trailing spaces immediately after the comment action.

Proper support of project modules in the IntelliJ platform

IntelliJ-based IDEs have a specific workspace model: a project is a collection of modules which may reside at different locations in the file system without any sort of hierarchy. This model may be suitable to represent project hierarchies, with a separate module for each "withed" project, which would allow to have entries for all the different subprojects of a project in the "Project" tool window, very similar to what GPS does.

Currently, the Ada-IntelliJ plugin simply assumes the presence of a single module in an Ada project. It even completely ignores modules and directly works with the project, for example using Project#getBaseDir() to get the project's root directory. The fact that this method is now deprecated in newer versions is proof that this behavior is broken and should be fixed by properly handling project modules:

@deprecated No such concept as "project root". Project consists of module set, each has own content root set.

There's even a bug related to project templates originating from this broken behavior: creating a project from a template is done by creating a module of the currently defined Ada module type, but that operation either fails or produces incorrect results when manually creating a new module in an existing project (as opposed to the module being automatically created during the process of creating an entire new project) since the template files are copied to the root of the project instead of that of the module being created.

A fix to this broken behavior may require major changes throughout the project, including:

  • Properly defining Ada module type(s) within the IntelliJ platform
  • Possibly transforming certain project components into module components
  • Readapting affected functionalities to the notion of modules

Enable case-insensitive lexical analysis

Currently, the lexer expects keywords to be all-lowercase and any mixed-case variant will be considered an identifier. This needs to be fixed by normalizing characters before advancing the lexer regexes on them.

update failed for AnAction(com.intellij.find.actions.ShowUsagesAction) with ID=ShowUsages

I got this stack trace when using the Ada plugin with Intellij:

update failed for AnAction(com.intellij.find.actions.ShowUsagesAction) with ID=ShowUsages

com.intellij.psi.PsiInvalidElementAccessException: Element: class com.adacore.adaintellij.analysis.syntactic.AdaPsiReference #Ada  because: psi is outdated
invalidated at: no info; com.adacore.adaintellij.analysis.syntactic.AdaPsiReference:AdaTokenType.IDENTIFIER
	at com.intellij.psi.impl.source.tree.LeafPsiElement.invalid(LeafPsiElement.java:102)
	at com.intellij.psi.impl.source.tree.LeafPsiElement.getProject(LeafPsiElement.java:260)
	at com.adacore.adaintellij.analysis.syntactic.AdaPsiReference.resolveAdaReference(AdaPsiReference.java:178)
	at com.adacore.adaintellij.analysis.syntactic.AdaPsiReference.resolve(AdaPsiReference.java:135)
	at com.adacore.adaintellij.analysis.syntactic.AdaPsiReference.resolve(AdaPsiReference.java:29)
	at com.intellij.codeInsight.TargetElementUtilBase.getReferencedElement(TargetElementUtilBase.java:177)
	at com.intellij.codeInsight.TargetElementUtilBase.doGetReferenceOrReferencedElement(TargetElementUtilBase.java:165)
	at com.intellij.codeInsight.TargetElementUtilBase.getReferenceOrReferencedElement(TargetElementUtilBase.java:204)
	at com.intellij.codeInsight.TargetElementUtilBase.getReferencedElement(TargetElementUtilBase.java:248)
	at com.intellij.codeInsight.TargetElementUtilBase.doFindTargetElement(TargetElementUtilBase.java:227)
	at com.intellij.codeInsight.TargetElementUtilBase.findTargetElement(TargetElementUtilBase.java:295)
	at com.intellij.codeInsight.TargetElementUtil.findTargetElement(TargetElementUtil.java:147)
	at com.intellij.openapi.fileEditor.impl.text.TextEditorPsiDataProvider.getPsiElementIn(TextEditorPsiDataProvider.java:194)
	at com.intellij.openapi.fileEditor.impl.text.TextEditorPsiDataProvider.getData(TextEditorPsiDataProvider.java:82)
	at com.intellij.openapi.fileEditor.ex.FileEditorManagerEx.getData(FileEditorManagerEx.java:153)
	at com.intellij.openapi.fileEditor.impl.text.TextEditorComponent.lambda$createBackgroundDataProvider$1(TextEditorComponent.java:220)
	at com.intellij.openapi.fileEditor.impl.text.PsiAwareTextEditorImpl$PsiAwareTextEditorComponent.lambda$createBackgroundDataProvider$0(PsiAwareTextEditorImpl.java:138)
	at com.intellij.openapi.actionSystem.BackgroundableDataProvider.getData(BackgroundableDataProvider.java:20)
	at com.intellij.ide.impl.DataManagerImpl.getDataFromProvider(DataManagerImpl.java:91)
	at com.intellij.ide.impl.DataManagerImpl.getDataFromProvider(DataManagerImpl.java:79)
	at com.intellij.ide.impl.DataManagerImpl.lambda$getDataFromProvider$0(DataManagerImpl.java:97)
	at com.intellij.ide.impl.DataManagerImpl.lambda$getDataRule$1(DataManagerImpl.java:132)
	at com.intellij.openapi.actionSystem.DataKey.getData(DataKey.java:62)
	at com.intellij.usages.UsageTargetUtil.findUsageTargets(UsageTargetUtil.java:30)
	at com.intellij.ide.impl.dataRules.UsageTargetsRule.getData(UsageTargetsRule.java:13)
	at com.intellij.ide.impl.DataManagerImpl.lambda$getDataRule$2(DataManagerImpl.java:132)
	at com.intellij.ide.impl.DataManagerImpl.getDataFromProvider(DataManagerImpl.java:97)
	at com.intellij.ide.impl.DataManagerImpl.getData(DataManagerImpl.java:71)
	at com.intellij.ide.impl.DataManagerImpl$MyDataContext.calcData(DataManagerImpl.java:370)
	at com.intellij.ide.impl.DataManagerImpl$MyDataContext.doGetData(DataManagerImpl.java:362)
	at com.intellij.ide.impl.DataManagerImpl$MyDataContext.getData(DataManagerImpl.java:341)
	at com.intellij.openapi.actionSystem.DataContextWrapper.getData(DataContextWrapper.java:38)
	at com.intellij.openapi.actionSystem.AnActionEvent$1.getData(AnActionEvent.java:164)
	at com.intellij.openapi.actionSystem.DataContext.getData(DataContext.java:40)
	at com.intellij.openapi.actionSystem.AnActionEvent.getData(AnActionEvent.java:184)
	at com.intellij.find.actions.ShowUsagesAction.update(ShowUsagesAction.java:158)
	at com.intellij.openapi.actionSystem.ex.ActionUtil.performDumbAwareUpdate(ActionUtil.java:178)
	at com.intellij.openapi.actionSystem.impl.ActionUpdater.doUpdate(ActionUpdater.java:465)
	at com.intellij.openapi.actionSystem.impl.ActionUpdater.lambda$new$1(ActionUpdater.java:94)
	at com.intellij.openapi.actionSystem.impl.ActionUpdater.callAction(ActionUpdater.java:134)
	at com.intellij.openapi.actionSystem.impl.ActionUpdater.lambda$new$2(ActionUpdater.java:95)
	at com.intellij.openapi.actionSystem.impl.ActionUpdater.update(ActionUpdater.java:447)
	at com.intellij.openapi.actionSystem.impl.ActionUpdater.expandGroupChild(ActionUpdater.java:297)
	at com.intellij.openapi.actionSystem.impl.ActionUpdater.lambda$doExpandActionGroup$19(ActionUpdater.java:276)
	at com.intellij.util.containers.ContainerUtil.concat(ContainerUtil.java:1599)
	at com.intellij.openapi.actionSystem.impl.ActionUpdater.doExpandActionGroup(ActionUpdater.java:276)
	at com.intellij.openapi.actionSystem.impl.ActionUpdater.expandActionGroup(ActionUpdater.java:186)
	at com.intellij.openapi.actionSystem.impl.ActionUpdater.expandActionGroup(ActionUpdater.java:160)
	at com.intellij.openapi.actionSystem.impl.ActionUpdater.lambda$expandActionGroupWithTimeout$11(ActionUpdater.java:202)
	at com.intellij.openapi.progress.ProgressManager.lambda$runProcess$0(ProgressManager.java:59)
	at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcess$2(CoreProgressManager.java:178)
	at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:658)
	at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:610)
	at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:65)
	at com.intellij.openapi.progress.impl.CoreProgressManager.runProcess(CoreProgressManager.java:165)
	at com.intellij.openapi.progress.ProgressManager.runProcess(ProgressManager.java:59)
	at com.intellij.openapi.progress.util.ProgressIndicatorUtils.withTimeout(ProgressIndicatorUtils.java:306)
	at com.intellij.openapi.actionSystem.impl.ActionUpdater.expandActionGroupWithTimeout(ActionUpdater.java:202)
	at com.intellij.openapi.actionSystem.impl.Utils.expandActionGroupWithTimeout(Utils.java:88)
	at com.intellij.ui.mac.touchbar.TouchBar.updateActionItems(TouchBar.java:460)
	at com.intellij.ui.mac.touchbar.TouchBar.onBeforeShow(TouchBar.java:329)
	at com.intellij.ui.mac.touchbar.StackTouchBars$TouchBarHolder._setNextTouchBar(StackTouchBars.java:156)
	at com.intellij.ui.mac.touchbar.StackTouchBars$TouchBarHolder.lambda$setTouchBar$0(StackTouchBars.java:140)
	at java.desktop/javax.swing.Timer.fireActionPerformed(Timer.java:317)
	at java.desktop/javax.swing.Timer$DoPostEvent.run(Timer.java:249)
	at java.desktop/java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:313)
	at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:776)
	at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:727)
	at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:721)
	at java.base/java.security.AccessController.doPrivileged(Native Method)
	at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:85)
	at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:746)
	at com.intellij.ide.IdeEventQueue.defaultDispatchEvent(IdeEventQueue.java:976)
	at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:843)
	at com.intellij.ide.IdeEventQueue.lambda$dispatchEvent$8(IdeEventQueue.java:454)
	at com.intellij.openapi.progress.impl.CoreProgressManager.computePrioritized(CoreProgressManager.java:773)
	at com.intellij.ide.IdeEventQueue.lambda$dispatchEvent$9(IdeEventQueue.java:453)
	at com.intellij.openapi.application.impl.ApplicationImpl.runIntendedWriteActionOnCurrentThread(ApplicationImpl.java:822)
	at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:507)
	at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:203)
	at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:124)
	at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:113)
	at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:109)
	at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
	at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:90)

IntelliJ IDEA 2020.3.1 (Ultimate Edition)
Build #IU-203.6682.168, built on December 29, 2020
Runtime version: 11.0.9.1+11-b1145.63 x86_64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.
macOS 10.16
GC: ParNew, ConcurrentMarkSweep
Memory: 1979M
Cores: 16
Registry: ide.balloon.shadow.size=0
Non-Bundled Plugins: com.adacore.Ada-IntelliJ, com.daynight.plugin, com.mallowigi, org.antlr.intellij.plugin, mobi.hsz.idea.gitignore, name.kropp.intellij.makefile, org.toml.lang, com.neueda4j.intellij.plugin.cypher, org.jetbrains.kotlin, com.chrisrm.idea.MaterialThemeUI, izhangzhihao.rainbow.brackets

Implement missing LSP client methods

A couple LSP client methods are still not implemented, including dynamic registration/unregisteration of server capabilities and applying edits. These methods are currently not used by the ALS but might be in the future so the plugin should support them.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.