ladybird/Userland/DevTools/HackStudio
Itamar e16c24bb95 HackStudio: Do not create a new LanguageClient unless needed
Previously, whenever Editor::set_document() was called, we destroyed
the previous LanguageClient instance of the editor and created a new
one.

We now check if the language of the existing LanguageClient matches the
new document, and if so we do not create a new LanguageClient instance.

This fixes an issue where doing "goto definition" would crash
HackStudio. This was probably introduced in 44418cb351.

The crash occurred because when doing "goto definition", we called a
AK::Function callback from the LanguageClient, which internally called
Editor::set_document().

Editor::set_document() destroyed the existing LanguageClient, which
cased a VERIFY in Function::clear() to fail because we were trying to
destroy the AK::Function object while executing inside it.
2021-06-25 18:58:34 +02:00
..
Debugger LibJS: Replace boolean without_side_effects parameters with an enum 2021-06-17 16:52:15 +02:00
Dialogs AK+Everywhere: Disallow constructing Functions from incompatible types 2021-06-06 00:27:30 +04:30
Git AK: Rename Vector::append(Vector) => Vector::extend(Vector) 2021-06-12 13:24:45 +02:00
LanguageClients Userland: Mark subclasses of IPC::{Client,Server}Connection final 2021-05-23 09:53:55 +02:00
LanguageServers HackStudio: Make TODO entries clickable 2021-06-23 19:00:11 +01:00
AutoCompleteResponse.h HackStudio: Make TODO entries clickable 2021-06-23 19:00:11 +01:00
ClassViewWidget.cpp HackStudio: Add comment about lexicographical insertion to ClassView 2021-06-04 19:29:22 +02:00
ClassViewWidget.h Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
CMakeLists.txt HackStudio: Add TODO entries widget 2021-06-23 19:00:11 +01:00
CodeDocument.cpp AK: Rename adopt() to adopt_ref() 2021-04-23 16:46:57 +02:00
CodeDocument.h Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
Editor.cpp HackStudio: Do not create a new LanguageClient unless needed 2021-06-25 18:58:34 +02:00
Editor.h HackStudio: Do not create a new LanguageClient unless needed 2021-06-25 18:58:34 +02:00
EditorWrapper.cpp HackStudio: Indicate git changes in the editor's gutter 2021-06-13 12:33:15 +01:00
EditorWrapper.h HackStudio: Indicate git changes in the editor's gutter 2021-06-13 12:33:15 +01:00
FindInFilesWidget.cpp AK: Rename adopt() to adopt_ref() 2021-04-23 16:46:57 +02:00
FindInFilesWidget.h Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
HackStudio.h Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
HackStudioWidget.cpp HackStudio: Add TODO entries widget 2021-06-23 19:00:11 +01:00
HackStudioWidget.h HackStudio: Add TODO entries widget 2021-06-23 19:00:11 +01:00
Language.cpp Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
Language.h Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
LanguageClient.cpp HackStudio: Make TODO entries clickable 2021-06-23 19:00:11 +01:00
LanguageClient.h HackStudio: Add LanguageClient::Language() getter 2021-06-25 18:58:34 +02:00
Locator.cpp HackStudio: Make locator lose focus on close 2021-06-02 23:15:52 +01:00
Locator.h Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
main.cpp HackStudio: Remove unused includes 2021-06-02 23:15:52 +01:00
Project.cpp DevTools: Remove redundant default destructor and forward declarations 2021-05-21 22:53:33 +01:00
Project.h DevTools: Remove redundant default destructor and forward declarations 2021-05-21 22:53:33 +01:00
ProjectDeclarations.cpp Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
ProjectDeclarations.h Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
ProjectFile.cpp HackStudio: Remove unused includes 2021-06-02 23:15:52 +01:00
ProjectFile.h AK: Rename adopt() to adopt_ref() 2021-04-23 16:46:57 +02:00
ProjectTemplate.cpp HackStudio: Remove unused includes 2021-06-02 23:15:52 +01:00
ProjectTemplate.h Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
TerminalWrapper.cpp Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
TerminalWrapper.h Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
ToDoEntries.cpp HackStudio: Make TODO entries clickable 2021-06-23 19:00:11 +01:00
ToDoEntries.h HackStudio: Make TODO entries clickable 2021-06-23 19:00:11 +01:00
ToDoEntriesWidget.cpp HackStudio: Make TODO entries clickable 2021-06-23 19:00:11 +01:00
ToDoEntriesWidget.h HackStudio: Make TODO entries clickable 2021-06-23 19:00:11 +01:00