Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1113,9 +1113,7 @@ else()

# utility for importing themes
add_subdirectory(codelite-generate-themes)

add_subdirectory(codelite_echo)
add_subdirectory(ctagsd)

add_subdirectory(LiteEditor)
if(NOT APPLE)
Expand All @@ -1126,7 +1124,6 @@ else()
add_dependencies(plugin libcodelite)
add_dependencies(codelite plugin)
add_dependencies(codelite ctags)
add_dependencies(codelite ctagsd)
add_dependencies(codelite cc-wrapper)
if(MINGW)
add_dependencies(codelite wx-config)
Expand Down
29 changes: 0 additions & 29 deletions CodeLite/ctags_manager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -754,32 +754,3 @@ void TagsManager::GetTagsByPartialNames(const wxArrayString& partialNames, std::
{
GetDatabase()->GetTagsByPartName(partialNames, tags);
}

void TagsManager::ParseWorkspaceIncremental()
{
// restart ctagsd (this way we ensure that new settings are loaded)
clLanguageServerEvent stop_event{wxEVT_LSP_RESTART};
stop_event.SetLspName("ctagsd");
EventNotifier::Get()->AddPendingEvent(stop_event);
}

void TagsManager::ParseWorkspaceFull(const wxString& workspace_dir)
{
// stop ctagsd
clLanguageServerEvent stop_event{wxEVT_LSP_STOP};
stop_event.SetLspName("ctagsd");
EventNotifier::Get()->ProcessEvent(stop_event);

// delete the tags.db file
wxFileName tags_db{workspace_dir, "tags.db"};
tags_db.AppendDir(".ctagsd");

if (tags_db.FileExists()) {
FileUtils::RemoveFile(tags_db, wxEmptyString);
}

// start ctagsd again
clLanguageServerEvent start_event{wxEVT_LSP_START};
start_event.SetLspName("ctagsd");
EventNotifier::Get()->ProcessEvent(start_event);
}
10 changes: 0 additions & 10 deletions CodeLite/ctags_manager.h
Original file line number Diff line number Diff line change
Expand Up @@ -214,16 +214,6 @@ class WXDLLIMPEXP_CL TagsManager : public wxEvtHandler
*/
void CloseDatabase();

/**
* @brief trigger a complete parsing of the workspace
*/
void ParseWorkspaceFull(const wxString& workspace_dir);

/**
* @brief trigger an incremental workspace parsing
*/
void ParseWorkspaceIncremental();

/**
* return tags belongs to given scope and kind
* @param scopeName the scope to search
Expand Down
3 changes: 0 additions & 3 deletions Gizmos/gizmos.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -553,9 +553,6 @@ void WizardsPlugin::CreateClass(NewClassInfo& info)
clFileSystemEvent eventFilesCreated(wxEVT_FILE_CREATED);
eventFilesCreated.GetPaths().swap(paths);
EventNotifier::Get()->QueueEvent(eventFilesCreated.Clone());

// Notify CodeLite to parse the files
TagsManagerST::Get()->ParseWorkspaceIncremental();
}

void WizardsPlugin::OnGizmos(wxCommandEvent& e)
Expand Down
3 changes: 0 additions & 3 deletions LiteEditor/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -367,9 +367,6 @@ if(MINGW OR CYGWIN)
write_file(${POST_INSTALL_SCRIPT} "file(GLOB FILES_TO_REMOVE \"${CL_INSTALL_BIN}/plugins/*.a\")")
write_file(${POST_INSTALL_SCRIPT} "file(REMOVE \${FILES_TO_REMOVE})" APPEND)

# remove test executables from ctagsd
write_file(${POST_INSTALL_SCRIPT} "file(REMOVE \"${CL_INSTALL_BIN}/ctagsd-tests.exe\")" APPEND)

# remove libdapcxx.dll.a & libdatabaselayersqlite.dll.a
write_file(${POST_INSTALL_SCRIPT} "file(REMOVE \"${CL_INSTALL_BIN}/libdapcxx.dll.a\")" APPEND)
write_file(${POST_INSTALL_SCRIPT} "file(REMOVE \"${CL_INSTALL_BIN}/libdatabaselayersqlite.dll.a\")" APPEND)
Expand Down
31 changes: 0 additions & 31 deletions LiteEditor/context_cpp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,6 @@ EVT_MENU(XRCID("add_multi_impl"), ContextCpp::OnAddMultiImpl)
EVT_MENU(XRCID("setters_getters"), ContextCpp::OnGenerateSettersGetters)
EVT_MENU(XRCID("add_include_file"), ContextCpp::OnAddIncludeFile)
EVT_MENU(XRCID("add_forward_decl"), ContextCpp::OnAddForwardDecl)
EVT_MENU(XRCID("retag_file"), ContextCpp::OnRetagFile)
EVT_MENU(XRCID("open_include_file"), ContextCpp::OnContextOpenDocument)
END_EVENT_TABLE()

Expand Down Expand Up @@ -1688,36 +1687,6 @@ bool ContextCpp::IsComment(long pos) const
style == wxSTC_C_COMMENTDOCKEYWORDERROR);
}

void ContextCpp::OnRetagFile(wxCommandEvent& e)
{
CHECK_JS_RETURN_VOID();
VALIDATE_WORKSPACE();

wxUnusedVar(e);
clEditor& editor = GetCtrl();
if (editor.GetModify()) {
wxMessageBox(wxString::Format(_("Please save the file before retagging it")));
return;
}

RetagFile();
editor.SetActive();
}

void ContextCpp::RetagFile()
{
CHECK_JS_RETURN_VOID();
if (ManagerST::Get()->GetRetagInProgress()) {
return;
}

clEditor& editor = GetCtrl();
ManagerST::Get()->RetagFile(editor.GetFileName().GetFullPath());

// incase this file is not cache this function does nothing
TagsManagerST::Get()->ClearCachedFile(editor.GetFileName().GetFullPath());
}

void ContextCpp::OnUserTypedXChars(const wxString& word)
{
// user typed more than 3 chars, display completion box with C++ keywords
Expand Down
5 changes: 2 additions & 3 deletions LiteEditor/context_cpp.h
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,8 @@ class ContextCpp : public ContextBase
bool DoCodeComplete(long pos);
void DoCreateFile(const wxFileName& fn);
void DoUpdateCalltipHighlight();
size_t DoGetEntriesForHeaderAndImpl(std::vector<TagEntryPtr>& prototypes, std::vector<TagEntryPtr>& functions,
size_t DoGetEntriesForHeaderAndImpl(std::vector<TagEntryPtr>& prototypes,
std::vector<TagEntryPtr>& functions,
wxString& otherfile);

public:
Expand Down Expand Up @@ -84,7 +85,6 @@ class ContextCpp : public ContextBase
void AddMenuDynamicContent(wxMenu* menu) override;
void RemoveMenuDynamicContent(wxMenu* menu) override;
void ApplySettings() override;
void RetagFile() override;
wxString CallTipContent() override;
void SetActive() override;
void SemicolonShift() override;
Expand Down Expand Up @@ -120,7 +120,6 @@ class ContextCpp : public ContextBase
virtual void OnMoveImpl(wxCommandEvent& e);
virtual void OnAddImpl(wxCommandEvent& e);
virtual void OnAddMultiImpl(wxCommandEvent& e);
virtual void OnRetagFile(wxCommandEvent& e);
virtual void OnUserTypedXChars(const wxString& word);
void OnCallTipClick(wxStyledTextEvent& e) override;
void OnCalltipCancel() override;
Expand Down
28 changes: 0 additions & 28 deletions LiteEditor/fileview.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,6 @@ EVT_MENU(XRCID("pin_project"), FileViewTree::OnPinProject)
EVT_MENU(XRCID("rebuild_project"), FileViewTree::OnReBuild)
EVT_MENU(XRCID("generate_makefile"), FileViewTree::OnRunPremakeStep)
EVT_MENU(XRCID("stop_build"), FileViewTree::OnStopBuild)
EVT_MENU(XRCID("retag_project"), FileViewTree::OnRetagProject)
EVT_MENU(XRCID("build_project_only"), FileViewTree::OnBuildProjectOnly)
EVT_MENU(XRCID("clean_project_only"), FileViewTree::OnCleanProjectOnly)
EVT_MENU(XRCID("rebuild_project_only"), FileViewTree::OnRebuildProjectOnly)
Expand Down Expand Up @@ -140,8 +139,6 @@ EVT_UPDATE_UI(XRCID("build_order"), FileViewTree::OnBuildInProgress)
EVT_UPDATE_UI(XRCID("clean_project"), FileViewTree::OnBuildInProgress)
EVT_UPDATE_UI(XRCID("build_project"), FileViewTree::OnBuildInProgress)
EVT_UPDATE_UI(XRCID("rebuild_project"), FileViewTree::OnBuildInProgress)
EVT_UPDATE_UI(XRCID("retag_project"), FileViewTree::OnRetagInProgressUI)
EVT_UPDATE_UI(XRCID("retag_workspace"), FileViewTree::OnRetagInProgressUI)
EVT_UPDATE_UI(XRCID("build_project_only"), FileViewTree::OnBuildInProgress)
EVT_UPDATE_UI(XRCID("clean_project_only"), FileViewTree::OnBuildInProgress)
EVT_UPDATE_UI(XRCID("rebuild_project_only"), FileViewTree::OnBuildInProgress)
Expand Down Expand Up @@ -1335,22 +1332,6 @@ size_t FileViewTree::GetMultiSelection(wxArrayTreeItemIds& arr)
}
}

void FileViewTree::OnRetagProject(wxCommandEvent& event)
{
wxUnusedVar(event);
wxTreeItemId item = GetSingleSelection();
if (item.IsOk()) {
wxString projectName = GetItemText(item);
ManagerST::Get()->RetagProject(projectName, true);
}
}

void FileViewTree::OnRetagWorkspace(wxCommandEvent& event)
{
wxUnusedVar(event);
ManagerST::Get()->RetagWorkspace(TagsManager::Retag_Quick);
}

void FileViewTree::OnItemBeginDrag(wxTreeEvent& event)
{
wxArrayTreeItemIds selections;
Expand Down Expand Up @@ -2060,11 +2041,6 @@ void FileViewTree::OnLocalWorkspaceSettings(wxCommandEvent& e)
}
}

void FileViewTree::OnRetagInProgressUI(wxUpdateUIEvent& event)
{
event.Enable(!ManagerST::Get()->GetRetagInProgress());
}

void FileViewTree::OnOpenWithDefaultApplication(wxCommandEvent& event)
{
wxArrayTreeItemIds items;
Expand Down Expand Up @@ -2433,10 +2409,6 @@ void FileViewTree::OnFolderDropped(clCommandEvent& event)
evtOpenworkspace.SetEventObject(clMainFrame::Get());
clMainFrame::Get()->GetEventHandler()->AddPendingEvent(evtOpenworkspace);
}

// And trigger a full reparse of the workspace
wxCommandEvent evtOpenworkspace(wxEVT_MENU, XRCID("full_retag_workspace"));
clMainFrame::Get()->GetEventHandler()->AddPendingEvent(evtOpenworkspace);
}

void FileViewTree::FolderDropped(const wxArrayString& folders)
Expand Down
3 changes: 0 additions & 3 deletions LiteEditor/fileview.h
Original file line number Diff line number Diff line change
Expand Up @@ -164,11 +164,8 @@ class FileViewTree : public clThemedTreeCtrl
virtual void OnCleanProjectOnly(wxCommandEvent& event);
virtual void OnRebuildProjectOnly(wxCommandEvent& event);
virtual void OnStopBuild(wxCommandEvent& event);
virtual void OnRetagProject(wxCommandEvent& event);
virtual void OnRetagWorkspace(wxCommandEvent& event);
virtual void OnBuildInProgress(wxUpdateUIEvent& event);
virtual void OnExcludeFromBuildUI(wxUpdateUIEvent& event);
virtual void OnRetagInProgressUI(wxUpdateUIEvent& event);
virtual void OnItemBeginDrag(wxTreeEvent& event);
virtual void OnItemEndDrag(wxTreeEvent& event);
virtual void OnImportDirectory(wxCommandEvent& e);
Expand Down
51 changes: 3 additions & 48 deletions LiteEditor/frame.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@
//////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////

#include "precompiled_header.h"

#include "frame.h"

#include "BreakpointsView.hpp"
Expand Down Expand Up @@ -101,7 +103,6 @@
#include "plugin.h"
#include "pluginmanager.h"
#include "pluginmgrdlg.h"
#include "precompiled_header.h"
#include "project.h"
#include "quickdebugdlg.h"
#include "resources/clXmlResource.hpp"
Expand Down Expand Up @@ -457,8 +458,6 @@ EVT_MENU(XRCID("new_project"), clMainFrame::OnProjectNewProject)
EVT_MENU(XRCID("file_new_project"), clMainFrame::OnProjectNewProject)
EVT_MENU(XRCID("add_project"), clMainFrame::OnProjectAddProject)
EVT_MENU(XRCID("reconcile_project"), clMainFrame::OnReconcileProject)
EVT_MENU(XRCID("retag_workspace"), clMainFrame::OnRetagWorkspace)
EVT_MENU(XRCID("full_retag_workspace"), clMainFrame::OnRetagWorkspace)
EVT_MENU(XRCID("project_properties"), clMainFrame::OnShowActiveProjectSettings)
EVT_MENU(XRCID("set_active_project"), clMainFrame::OnSetActivePoject)

Expand All @@ -471,8 +470,6 @@ EVT_UPDATE_UI(XRCID("add_project"), clMainFrame::OnWorkspaceMenuUI)
EVT_UPDATE_UI(XRCID("file_new_project"), clMainFrame::OnWorkspaceOpen)
EVT_UPDATE_UI(XRCID("new_project"), clMainFrame::OnNewProjectUI)
EVT_UPDATE_UI(XRCID("reconcile_project"), clMainFrame::OnShowActiveProjectSettingsUI)
EVT_UPDATE_UI(XRCID("retag_workspace"), clMainFrame::OnRetagWorkspaceUI)
EVT_UPDATE_UI(XRCID("full_retag_workspace"), clMainFrame::OnRetagWorkspaceUI)
EVT_UPDATE_UI(XRCID("project_properties"), clMainFrame::OnShowActiveProjectSettingsUI)
EVT_UPDATE_UI(XRCID("set_active_project"), clMainFrame::OnSetActivePojectUI)

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

clMainFrame* clMainFrame::Get() { return m_theFrame; }
Expand Down Expand Up @@ -2461,10 +2457,6 @@ void clMainFrame::OnCtagsOptions(wxCommandEvent& event)
if ((newColVars != colVars) || (colourTypes != m_tagsOptionsData.GetCcColourFlags())) {
GetMainBook()->UpdateColours();
}

// When new include paths were added, an incremental parse is enough
wxCommandEvent e(wxEVT_MENU, XRCID("retag_workspace"));
AddPendingEvent(e);
}

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

// ReTag workspace database if needed (this can happen due to schema version changes)
// It is important to place the retag code here since the retag workspace should take place after
// the parser search path have been updated (if needed)
if (m_workspaceRetagIsRequired) {
m_workspaceRetagIsRequired = false;
wxCommandEvent evt(wxEVT_COMMAND_MENU_SELECTED, XRCID("full_retag_workspace"));
this->AddPendingEvent(evt);
m_infoBar->DisplayMessage(_("A workspace reparse is needed"), wxICON_INFORMATION);
}

// For some reason, under Linux we need to force the menu accelerator again
// otherwise some shortcuts are getting lose (e.g. Ctrl-/ to comment line)
ManagerST::Get()->UpdateMenuAccelerators();
Expand Down Expand Up @@ -4658,31 +4640,6 @@ void clMainFrame::OnIncrementalReplace(wxCommandEvent& event)
GetMainBook()->ShowQuickBar(true);
}

void clMainFrame::OnRetagWorkspace(wxCommandEvent& event)
{
// See if any of the plugins want to handle this event by itself
bool fullRetag = !(event.GetId() == XRCID("retag_workspace"));
wxCommandEvent e(fullRetag ? wxEVT_CMD_RETAG_WORKSPACE_FULL : wxEVT_CMD_RETAG_WORKSPACE, GetId());
e.SetEventObject(this);
if (EventNotifier::Get()->ProcessEvent(e)) {
return;
}

TagsManager::RetagType type = TagsManager::Retag_Quick_No_Scan;
if (event.GetId() == XRCID("retag_workspace")) {
type = TagsManager::Retag_Quick;
}

else if (event.GetId() == XRCID("full_retag_workspace")) {
type = TagsManager::Retag_Full;
}

else if (event.GetId() == XRCID("retag_workspace_no_includes")) {
type = TagsManager::Retag_Quick_No_Scan;
}
ManagerST::Get()->RetagWorkspace(type);
}

void clMainFrame::OnShowBuiltInTerminal(wxCommandEvent& e)
{
wxUnusedVar(e);
Expand Down Expand Up @@ -5102,8 +5059,6 @@ void clMainFrame::UpdateAUI()
m_mgr.Update();
}

void clMainFrame::OnRetagWorkspaceUI(wxUpdateUIEvent& event) { CHECK_SHUTDOWN(); }

void clMainFrame::OnViewWordWrap(wxCommandEvent& e)
{
CHECK_SHUTDOWN();
Expand Down
2 changes: 0 additions & 2 deletions LiteEditor/frame.h
Original file line number Diff line number Diff line change
Expand Up @@ -526,7 +526,6 @@ class clMainFrame : public wxFrame
void OnReconcileProject(wxCommandEvent& event);
void OnWorkspaceOpen(wxUpdateUIEvent& event);
void OnNewProjectUI(wxUpdateUIEvent& event);
void OnRetagWorkspaceUI(wxUpdateUIEvent& event);
void OnAddEnvironmentVariable(wxCommandEvent& event);
void OnAdvanceSettings(wxCommandEvent& event);
void OnCtagsOptions(wxCommandEvent& event);
Expand All @@ -536,7 +535,6 @@ class clMainFrame : public wxFrame
void OnShowBuildMenu(wxCommandEvent& e);
void OnBuildAndRunProject(wxCommandEvent& event);
void OnRebuildProject(wxCommandEvent& event);
void OnRetagWorkspace(wxCommandEvent& event);
void OnBuildProjectUI(wxUpdateUIEvent& event);
void OnStopBuild(wxCommandEvent& event);
void OnStopBuildUI(wxUpdateUIEvent& event);
Expand Down
12 changes: 0 additions & 12 deletions LiteEditor/mainbook.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1031,18 +1031,6 @@ void MainBook::ReloadExternallyModified(bool prompt)

// reset the recursive protector
depth = wxNOT_FOUND;

std::vector<wxFileName> filesToRetag;
for (size_t i = 0; i < files.size(); i++) {
if (files[i].second) {
editors[i]->ReloadFromDisk(true);
filesToRetag.push_back(files[i].first);
}
}

if (filesToRetag.size() > 1) {
TagsManagerST::Get()->ParseWorkspaceIncremental();
}
}

bool MainBook::ClosePage(wxWindow* page)
Expand Down
Loading
Loading