Skip to content

Commit 499638c

Browse files
authored
Dropping ctagsd LSP. (#3882)
1 parent ecf92c6 commit 499638c

25 files changed

+11
-404
lines changed

CMakeLists.txt

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1113,9 +1113,7 @@ else()
11131113
11141114
# utility for importing themes
11151115
add_subdirectory(codelite-generate-themes)
1116-
11171116
add_subdirectory(codelite_echo)
1118-
add_subdirectory(ctagsd)
11191117
11201118
add_subdirectory(LiteEditor)
11211119
if(NOT APPLE)
@@ -1126,7 +1124,6 @@ else()
11261124
add_dependencies(plugin libcodelite)
11271125
add_dependencies(codelite plugin)
11281126
add_dependencies(codelite ctags)
1129-
add_dependencies(codelite ctagsd)
11301127
add_dependencies(codelite cc-wrapper)
11311128
if(MINGW)
11321129
add_dependencies(codelite wx-config)

CodeLite/ctags_manager.cpp

Lines changed: 0 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -754,32 +754,3 @@ void TagsManager::GetTagsByPartialNames(const wxArrayString& partialNames, std::
754754
{
755755
GetDatabase()->GetTagsByPartName(partialNames, tags);
756756
}
757-
758-
void TagsManager::ParseWorkspaceIncremental()
759-
{
760-
// restart ctagsd (this way we ensure that new settings are loaded)
761-
clLanguageServerEvent stop_event{wxEVT_LSP_RESTART};
762-
stop_event.SetLspName("ctagsd");
763-
EventNotifier::Get()->AddPendingEvent(stop_event);
764-
}
765-
766-
void TagsManager::ParseWorkspaceFull(const wxString& workspace_dir)
767-
{
768-
// stop ctagsd
769-
clLanguageServerEvent stop_event{wxEVT_LSP_STOP};
770-
stop_event.SetLspName("ctagsd");
771-
EventNotifier::Get()->ProcessEvent(stop_event);
772-
773-
// delete the tags.db file
774-
wxFileName tags_db{workspace_dir, "tags.db"};
775-
tags_db.AppendDir(".ctagsd");
776-
777-
if (tags_db.FileExists()) {
778-
FileUtils::RemoveFile(tags_db, wxEmptyString);
779-
}
780-
781-
// start ctagsd again
782-
clLanguageServerEvent start_event{wxEVT_LSP_START};
783-
start_event.SetLspName("ctagsd");
784-
EventNotifier::Get()->ProcessEvent(start_event);
785-
}

CodeLite/ctags_manager.h

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -214,16 +214,6 @@ class WXDLLIMPEXP_CL TagsManager : public wxEvtHandler
214214
*/
215215
void CloseDatabase();
216216

217-
/**
218-
* @brief trigger a complete parsing of the workspace
219-
*/
220-
void ParseWorkspaceFull(const wxString& workspace_dir);
221-
222-
/**
223-
* @brief trigger an incremental workspace parsing
224-
*/
225-
void ParseWorkspaceIncremental();
226-
227217
/**
228218
* return tags belongs to given scope and kind
229219
* @param scopeName the scope to search

Gizmos/gizmos.cpp

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -553,9 +553,6 @@ void WizardsPlugin::CreateClass(NewClassInfo& info)
553553
clFileSystemEvent eventFilesCreated(wxEVT_FILE_CREATED);
554554
eventFilesCreated.GetPaths().swap(paths);
555555
EventNotifier::Get()->QueueEvent(eventFilesCreated.Clone());
556-
557-
// Notify CodeLite to parse the files
558-
TagsManagerST::Get()->ParseWorkspaceIncremental();
559556
}
560557

561558
void WizardsPlugin::OnGizmos(wxCommandEvent& e)

LiteEditor/CMakeLists.txt

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -367,9 +367,6 @@ if(MINGW OR CYGWIN)
367367
write_file(${POST_INSTALL_SCRIPT} "file(GLOB FILES_TO_REMOVE \"${CL_INSTALL_BIN}/plugins/*.a\")")
368368
write_file(${POST_INSTALL_SCRIPT} "file(REMOVE \${FILES_TO_REMOVE})" APPEND)
369369

370-
# remove test executables from ctagsd
371-
write_file(${POST_INSTALL_SCRIPT} "file(REMOVE \"${CL_INSTALL_BIN}/ctagsd-tests.exe\")" APPEND)
372-
373370
# remove libdapcxx.dll.a & libdatabaselayersqlite.dll.a
374371
write_file(${POST_INSTALL_SCRIPT} "file(REMOVE \"${CL_INSTALL_BIN}/libdapcxx.dll.a\")" APPEND)
375372
write_file(${POST_INSTALL_SCRIPT} "file(REMOVE \"${CL_INSTALL_BIN}/libdatabaselayersqlite.dll.a\")" APPEND)

LiteEditor/context_cpp.cpp

Lines changed: 0 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,6 @@ EVT_MENU(XRCID("add_multi_impl"), ContextCpp::OnAddMultiImpl)
144144
EVT_MENU(XRCID("setters_getters"), ContextCpp::OnGenerateSettersGetters)
145145
EVT_MENU(XRCID("add_include_file"), ContextCpp::OnAddIncludeFile)
146146
EVT_MENU(XRCID("add_forward_decl"), ContextCpp::OnAddForwardDecl)
147-
EVT_MENU(XRCID("retag_file"), ContextCpp::OnRetagFile)
148147
EVT_MENU(XRCID("open_include_file"), ContextCpp::OnContextOpenDocument)
149148
END_EVENT_TABLE()
150149

@@ -1688,36 +1687,6 @@ bool ContextCpp::IsComment(long pos) const
16881687
style == wxSTC_C_COMMENTDOCKEYWORDERROR);
16891688
}
16901689

1691-
void ContextCpp::OnRetagFile(wxCommandEvent& e)
1692-
{
1693-
CHECK_JS_RETURN_VOID();
1694-
VALIDATE_WORKSPACE();
1695-
1696-
wxUnusedVar(e);
1697-
clEditor& editor = GetCtrl();
1698-
if (editor.GetModify()) {
1699-
wxMessageBox(wxString::Format(_("Please save the file before retagging it")));
1700-
return;
1701-
}
1702-
1703-
RetagFile();
1704-
editor.SetActive();
1705-
}
1706-
1707-
void ContextCpp::RetagFile()
1708-
{
1709-
CHECK_JS_RETURN_VOID();
1710-
if (ManagerST::Get()->GetRetagInProgress()) {
1711-
return;
1712-
}
1713-
1714-
clEditor& editor = GetCtrl();
1715-
ManagerST::Get()->RetagFile(editor.GetFileName().GetFullPath());
1716-
1717-
// incase this file is not cache this function does nothing
1718-
TagsManagerST::Get()->ClearCachedFile(editor.GetFileName().GetFullPath());
1719-
}
1720-
17211690
void ContextCpp::OnUserTypedXChars(const wxString& word)
17221691
{
17231692
// user typed more than 3 chars, display completion box with C++ keywords

LiteEditor/context_cpp.h

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,8 @@ class ContextCpp : public ContextBase
5555
bool DoCodeComplete(long pos);
5656
void DoCreateFile(const wxFileName& fn);
5757
void DoUpdateCalltipHighlight();
58-
size_t DoGetEntriesForHeaderAndImpl(std::vector<TagEntryPtr>& prototypes, std::vector<TagEntryPtr>& functions,
58+
size_t DoGetEntriesForHeaderAndImpl(std::vector<TagEntryPtr>& prototypes,
59+
std::vector<TagEntryPtr>& functions,
5960
wxString& otherfile);
6061

6162
public:
@@ -84,7 +85,6 @@ class ContextCpp : public ContextBase
8485
void AddMenuDynamicContent(wxMenu* menu) override;
8586
void RemoveMenuDynamicContent(wxMenu* menu) override;
8687
void ApplySettings() override;
87-
void RetagFile() override;
8888
wxString CallTipContent() override;
8989
void SetActive() override;
9090
void SemicolonShift() override;
@@ -120,7 +120,6 @@ class ContextCpp : public ContextBase
120120
virtual void OnMoveImpl(wxCommandEvent& e);
121121
virtual void OnAddImpl(wxCommandEvent& e);
122122
virtual void OnAddMultiImpl(wxCommandEvent& e);
123-
virtual void OnRetagFile(wxCommandEvent& e);
124123
virtual void OnUserTypedXChars(const wxString& word);
125124
void OnCallTipClick(wxStyledTextEvent& e) override;
126125
void OnCalltipCancel() override;

LiteEditor/fileview.cpp

Lines changed: 0 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,6 @@ EVT_MENU(XRCID("pin_project"), FileViewTree::OnPinProject)
105105
EVT_MENU(XRCID("rebuild_project"), FileViewTree::OnReBuild)
106106
EVT_MENU(XRCID("generate_makefile"), FileViewTree::OnRunPremakeStep)
107107
EVT_MENU(XRCID("stop_build"), FileViewTree::OnStopBuild)
108-
EVT_MENU(XRCID("retag_project"), FileViewTree::OnRetagProject)
109108
EVT_MENU(XRCID("build_project_only"), FileViewTree::OnBuildProjectOnly)
110109
EVT_MENU(XRCID("clean_project_only"), FileViewTree::OnCleanProjectOnly)
111110
EVT_MENU(XRCID("rebuild_project_only"), FileViewTree::OnRebuildProjectOnly)
@@ -140,8 +139,6 @@ EVT_UPDATE_UI(XRCID("build_order"), FileViewTree::OnBuildInProgress)
140139
EVT_UPDATE_UI(XRCID("clean_project"), FileViewTree::OnBuildInProgress)
141140
EVT_UPDATE_UI(XRCID("build_project"), FileViewTree::OnBuildInProgress)
142141
EVT_UPDATE_UI(XRCID("rebuild_project"), FileViewTree::OnBuildInProgress)
143-
EVT_UPDATE_UI(XRCID("retag_project"), FileViewTree::OnRetagInProgressUI)
144-
EVT_UPDATE_UI(XRCID("retag_workspace"), FileViewTree::OnRetagInProgressUI)
145142
EVT_UPDATE_UI(XRCID("build_project_only"), FileViewTree::OnBuildInProgress)
146143
EVT_UPDATE_UI(XRCID("clean_project_only"), FileViewTree::OnBuildInProgress)
147144
EVT_UPDATE_UI(XRCID("rebuild_project_only"), FileViewTree::OnBuildInProgress)
@@ -1335,22 +1332,6 @@ size_t FileViewTree::GetMultiSelection(wxArrayTreeItemIds& arr)
13351332
}
13361333
}
13371334

1338-
void FileViewTree::OnRetagProject(wxCommandEvent& event)
1339-
{
1340-
wxUnusedVar(event);
1341-
wxTreeItemId item = GetSingleSelection();
1342-
if (item.IsOk()) {
1343-
wxString projectName = GetItemText(item);
1344-
ManagerST::Get()->RetagProject(projectName, true);
1345-
}
1346-
}
1347-
1348-
void FileViewTree::OnRetagWorkspace(wxCommandEvent& event)
1349-
{
1350-
wxUnusedVar(event);
1351-
ManagerST::Get()->RetagWorkspace(TagsManager::Retag_Quick);
1352-
}
1353-
13541335
void FileViewTree::OnItemBeginDrag(wxTreeEvent& event)
13551336
{
13561337
wxArrayTreeItemIds selections;
@@ -2060,11 +2041,6 @@ void FileViewTree::OnLocalWorkspaceSettings(wxCommandEvent& e)
20602041
}
20612042
}
20622043

2063-
void FileViewTree::OnRetagInProgressUI(wxUpdateUIEvent& event)
2064-
{
2065-
event.Enable(!ManagerST::Get()->GetRetagInProgress());
2066-
}
2067-
20682044
void FileViewTree::OnOpenWithDefaultApplication(wxCommandEvent& event)
20692045
{
20702046
wxArrayTreeItemIds items;
@@ -2433,10 +2409,6 @@ void FileViewTree::OnFolderDropped(clCommandEvent& event)
24332409
evtOpenworkspace.SetEventObject(clMainFrame::Get());
24342410
clMainFrame::Get()->GetEventHandler()->AddPendingEvent(evtOpenworkspace);
24352411
}
2436-
2437-
// And trigger a full reparse of the workspace
2438-
wxCommandEvent evtOpenworkspace(wxEVT_MENU, XRCID("full_retag_workspace"));
2439-
clMainFrame::Get()->GetEventHandler()->AddPendingEvent(evtOpenworkspace);
24402412
}
24412413

24422414
void FileViewTree::FolderDropped(const wxArrayString& folders)

LiteEditor/fileview.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -164,11 +164,8 @@ class FileViewTree : public clThemedTreeCtrl
164164
virtual void OnCleanProjectOnly(wxCommandEvent& event);
165165
virtual void OnRebuildProjectOnly(wxCommandEvent& event);
166166
virtual void OnStopBuild(wxCommandEvent& event);
167-
virtual void OnRetagProject(wxCommandEvent& event);
168-
virtual void OnRetagWorkspace(wxCommandEvent& event);
169167
virtual void OnBuildInProgress(wxUpdateUIEvent& event);
170168
virtual void OnExcludeFromBuildUI(wxUpdateUIEvent& event);
171-
virtual void OnRetagInProgressUI(wxUpdateUIEvent& event);
172169
virtual void OnItemBeginDrag(wxTreeEvent& event);
173170
virtual void OnItemEndDrag(wxTreeEvent& event);
174171
virtual void OnImportDirectory(wxCommandEvent& e);

LiteEditor/frame.cpp

Lines changed: 3 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@
2323
//////////////////////////////////////////////////////////////////////////////
2424
//////////////////////////////////////////////////////////////////////////////
2525

26+
#include "precompiled_header.h"
27+
2628
#include "frame.h"
2729

2830
#include "BreakpointsView.hpp"
@@ -101,7 +103,6 @@
101103
#include "plugin.h"
102104
#include "pluginmanager.h"
103105
#include "pluginmgrdlg.h"
104-
#include "precompiled_header.h"
105106
#include "project.h"
106107
#include "quickdebugdlg.h"
107108
#include "resources/clXmlResource.hpp"
@@ -457,8 +458,6 @@ EVT_MENU(XRCID("new_project"), clMainFrame::OnProjectNewProject)
457458
EVT_MENU(XRCID("file_new_project"), clMainFrame::OnProjectNewProject)
458459
EVT_MENU(XRCID("add_project"), clMainFrame::OnProjectAddProject)
459460
EVT_MENU(XRCID("reconcile_project"), clMainFrame::OnReconcileProject)
460-
EVT_MENU(XRCID("retag_workspace"), clMainFrame::OnRetagWorkspace)
461-
EVT_MENU(XRCID("full_retag_workspace"), clMainFrame::OnRetagWorkspace)
462461
EVT_MENU(XRCID("project_properties"), clMainFrame::OnShowActiveProjectSettings)
463462
EVT_MENU(XRCID("set_active_project"), clMainFrame::OnSetActivePoject)
464463

@@ -471,8 +470,6 @@ EVT_UPDATE_UI(XRCID("add_project"), clMainFrame::OnWorkspaceMenuUI)
471470
EVT_UPDATE_UI(XRCID("file_new_project"), clMainFrame::OnWorkspaceOpen)
472471
EVT_UPDATE_UI(XRCID("new_project"), clMainFrame::OnNewProjectUI)
473472
EVT_UPDATE_UI(XRCID("reconcile_project"), clMainFrame::OnShowActiveProjectSettingsUI)
474-
EVT_UPDATE_UI(XRCID("retag_workspace"), clMainFrame::OnRetagWorkspaceUI)
475-
EVT_UPDATE_UI(XRCID("full_retag_workspace"), clMainFrame::OnRetagWorkspaceUI)
476473
EVT_UPDATE_UI(XRCID("project_properties"), clMainFrame::OnShowActiveProjectSettingsUI)
477474
EVT_UPDATE_UI(XRCID("set_active_project"), clMainFrame::OnSetActivePojectUI)
478475

@@ -1229,8 +1226,7 @@ void clMainFrame::AddKeyboardAccelerators()
12291226
{"import_from_msvs", _("Import other IDEs solution/workspace files...")},
12301227
{"project_properties", _("Open Active Project Settings..."), "Alt-F7"},
12311228
{"new_project", _("Create New Project")},
1232-
{"add_project", _("Add an Existing Project")},
1233-
{"full_retag_workspace", _("Parse Workspace")}});
1229+
{"add_project", _("Add an Existing Project")}});
12341230
}
12351231

12361232
clMainFrame* clMainFrame::Get() { return m_theFrame; }
@@ -2461,10 +2457,6 @@ void clMainFrame::OnCtagsOptions(wxCommandEvent& event)
24612457
if ((newColVars != colVars) || (colourTypes != m_tagsOptionsData.GetCcColourFlags())) {
24622458
GetMainBook()->UpdateColours();
24632459
}
2464-
2465-
// When new include paths were added, an incremental parse is enough
2466-
wxCommandEvent e(wxEVT_MENU, XRCID("retag_workspace"));
2467-
AddPendingEvent(e);
24682460
}
24692461

24702462
void clMainFrame::RegisterDockWindow(int menuItemId, const wxString& name)
@@ -2951,16 +2943,6 @@ void clMainFrame::OnTimer(wxTimerEvent& event)
29512943
NavMgr::Get()->Clear();
29522944
}
29532945

2954-
// ReTag workspace database if needed (this can happen due to schema version changes)
2955-
// It is important to place the retag code here since the retag workspace should take place after
2956-
// the parser search path have been updated (if needed)
2957-
if (m_workspaceRetagIsRequired) {
2958-
m_workspaceRetagIsRequired = false;
2959-
wxCommandEvent evt(wxEVT_COMMAND_MENU_SELECTED, XRCID("full_retag_workspace"));
2960-
this->AddPendingEvent(evt);
2961-
m_infoBar->DisplayMessage(_("A workspace reparse is needed"), wxICON_INFORMATION);
2962-
}
2963-
29642946
// For some reason, under Linux we need to force the menu accelerator again
29652947
// otherwise some shortcuts are getting lose (e.g. Ctrl-/ to comment line)
29662948
ManagerST::Get()->UpdateMenuAccelerators();
@@ -4658,31 +4640,6 @@ void clMainFrame::OnIncrementalReplace(wxCommandEvent& event)
46584640
GetMainBook()->ShowQuickBar(true);
46594641
}
46604642

4661-
void clMainFrame::OnRetagWorkspace(wxCommandEvent& event)
4662-
{
4663-
// See if any of the plugins want to handle this event by itself
4664-
bool fullRetag = !(event.GetId() == XRCID("retag_workspace"));
4665-
wxCommandEvent e(fullRetag ? wxEVT_CMD_RETAG_WORKSPACE_FULL : wxEVT_CMD_RETAG_WORKSPACE, GetId());
4666-
e.SetEventObject(this);
4667-
if (EventNotifier::Get()->ProcessEvent(e)) {
4668-
return;
4669-
}
4670-
4671-
TagsManager::RetagType type = TagsManager::Retag_Quick_No_Scan;
4672-
if (event.GetId() == XRCID("retag_workspace")) {
4673-
type = TagsManager::Retag_Quick;
4674-
}
4675-
4676-
else if (event.GetId() == XRCID("full_retag_workspace")) {
4677-
type = TagsManager::Retag_Full;
4678-
}
4679-
4680-
else if (event.GetId() == XRCID("retag_workspace_no_includes")) {
4681-
type = TagsManager::Retag_Quick_No_Scan;
4682-
}
4683-
ManagerST::Get()->RetagWorkspace(type);
4684-
}
4685-
46864643
void clMainFrame::OnShowBuiltInTerminal(wxCommandEvent& e)
46874644
{
46884645
wxUnusedVar(e);
@@ -5102,8 +5059,6 @@ void clMainFrame::UpdateAUI()
51025059
m_mgr.Update();
51035060
}
51045061

5105-
void clMainFrame::OnRetagWorkspaceUI(wxUpdateUIEvent& event) { CHECK_SHUTDOWN(); }
5106-
51075062
void clMainFrame::OnViewWordWrap(wxCommandEvent& e)
51085063
{
51095064
CHECK_SHUTDOWN();

0 commit comments

Comments
 (0)