Skip to content
Permalink
Browse files

Make "Find References" work in the "File System Workspace"

  • Loading branch information
eranif committed Sep 15, 2019
1 parent 9805bd9 commit ed518a7d25ae6e232dff163bccd9d9fbf989fd76
@@ -539,7 +539,7 @@ WXCFG=gcc_dll\mswu</Environment>
<Project Name="codelite_cppcheck" ConfigName="Win_x64_Release"/>
<Project Name="codelite_echo" ConfigName="Win_x64_Release"/>
</WorkspaceConfiguration>
<WorkspaceConfiguration Name="Win_x64_Debug" Selected="yes">
<WorkspaceConfiguration Name="Win_x64_Debug" Selected="no">
<Environment>WXWIN=C:\src\wxWidgets
WXCFG=gcc_dll\mswu</Environment>
<Project Name="abbreviation" ConfigName="Win_x64_Debug"/>
@@ -107,6 +107,7 @@
#include "wxCodeCompletionBoxManager.h"
#include "ServiceProviderManager.h"
#include "NewProjectDialog.h"
#include "clFileSystemWorkspace.hpp"

#ifndef __WXMSW__
#include <sys/wait.h>
@@ -762,23 +763,50 @@ void Manager::GetWorkspaceFiles(wxArrayString& files)
getFilesEevet.SetClientData(&files);
if(EventNotifier::Get()->ProcessEvent(getFilesEevet)) { return; }

if(!IsWorkspaceOpen()) { return; }
if(clFileSystemWorkspace::Get().IsOpen()) {
const auto& V = clFileSystemWorkspace::Get().GetFiles();
if(V.empty()) { return; }
files.Alloc(V.size());
for(const auto& f : V) {
files.Add(f.GetFullPath());
}
return;
} else {
if(!IsWorkspaceOpen()) { return; }

wxArrayString projects;
GetProjectList(projects);
wxArrayString projects;
GetProjectList(projects);

for(size_t i = 0; i < projects.GetCount(); i++) {
GetProjectFiles(projects.Item(i), files);
for(size_t i = 0; i < projects.GetCount(); i++) {
GetProjectFiles(projects.Item(i), files);
}
}
}

void Manager::GetWorkspaceFiles(std::vector<wxFileName>& files, bool absPath)
{
wxArrayString projects;
GetProjectList(projects);
for(size_t i = 0; i < projects.GetCount(); i++) {
ProjectPtr p = GetProject(projects.Item(i));
p->GetFilesAsVectorOfFileName(files, absPath);
if(clFileSystemWorkspace::Get().IsOpen()) {
const auto& V = clFileSystemWorkspace::Get().GetFiles();
if(V.empty()) { return; }
files.reserve(V.size());
if(absPath) {
files.insert(files.end(), V.begin(), V.end());
} else {
const wxFileName& fnWorkspace = clFileSystemWorkspace::Get().GetFileName();
wxString path = fnWorkspace.GetPath();
for(const auto& f : V) {
wxFileName fn(f);
fn.MakeRelativeTo(path);
files.push_back(fn);
}
}
} else {
wxArrayString projects;
GetProjectList(projects);
for(size_t i = 0; i < projects.GetCount(); i++) {
ProjectPtr p = GetProject(projects.Item(i));
p->GetFilesAsVectorOfFileName(files, absPath);
}
}
}

@@ -21,6 +21,11 @@
<File Name="makedir.cpp"/>
</VirtualDirectory>
<Dependencies/>
<Dependencies Name="DebugUnicode"/>
<Dependencies Name="Release"/>
<Dependencies Name="ReleaseUnicode"/>
<Dependencies Name="Win_x64_Release"/>
<Dependencies Name="Win_x86_Release"/>
<Settings Type="Executable">
<GlobalSettings>
<Compiler Options="" C_Options="" Assembler="">
@@ -31,7 +36,7 @@
</Linker>
<ResourceCompiler Options=""/>
</GlobalSettings>
<Configuration Name="DebugUnicode" CompilerType="g++-64" DebuggerType="GNU gdb debugger" Type="Executable" BuildCmpWithGlobalSettings="append" BuildLnkWithGlobalSettings="append" BuildResWithGlobalSettings="append">
<Configuration Name="DebugUnicode" CompilerType="GCC (x86_64)" DebuggerType="GNU gdb debugger" Type="Executable" BuildCmpWithGlobalSettings="append" BuildLnkWithGlobalSettings="append" BuildResWithGlobalSettings="append">
<Compiler Options="-g;$(shell wx-config --cxxflags --unicode=yes )" C_Options="-g;$(shell wx-config --cxxflags --unicode=yes )" Assembler="" Required="yes" PreCompiledHeader="" PCHInCommandLine="no" PCHFlags="" PCHFlagsPolicy="0">
<Preprocessor Value="__WX__"/>
</Compiler>
@@ -232,9 +237,4 @@
</Completion>
</Configuration>
</Settings>
<Dependencies Name="DebugUnicode"/>
<Dependencies Name="Release"/>
<Dependencies Name="ReleaseUnicode"/>
<Dependencies Name="Win_x64_Release"/>
<Dependencies Name="Win_x86_Release"/>
</CodeLite_Project>
@@ -50,7 +50,7 @@
</Linker>
<ResourceCompiler Options=""/>
</GlobalSettings>
<Configuration Name="Debug" CompilerType="gnu gcc" DebuggerType="GNU gdb debugger" Type="Executable" BuildCmpWithGlobalSettings="append" BuildLnkWithGlobalSettings="append" BuildResWithGlobalSettings="append">
<Configuration Name="Debug" CompilerType="GCC (x86_64)" DebuggerType="GNU gdb debugger" Type="Executable" BuildCmpWithGlobalSettings="append" BuildLnkWithGlobalSettings="append" BuildResWithGlobalSettings="append">
<Compiler Options="-g;-O0;-Wall" C_Options="-g;-O0;-Wall" Assembler="" Required="yes" PreCompiledHeader="" PCHInCommandLine="no" PCHFlags="" PCHFlagsPolicy="0">
<IncludePath Value="."/>
</Compiler>
@@ -21,6 +21,10 @@
<File Name="codelite_launcher.cpp"/>
</VirtualDirectory>
<Dependencies/>
<Dependencies Name="Debug"/>
<Dependencies Name="Release"/>
<Dependencies Name="Win_x64_Release"/>
<Dependencies Name="Win_x86_Release"/>
<Settings Type="Executable">
<GlobalSettings>
<Compiler Options="" C_Options="" Assembler="">
@@ -31,7 +35,7 @@
</Linker>
<ResourceCompiler Options=""/>
</GlobalSettings>
<Configuration Name="Debug" CompilerType="g++-64" DebuggerType="GNU gdb debugger" Type="Executable" BuildCmpWithGlobalSettings="append" BuildLnkWithGlobalSettings="append" BuildResWithGlobalSettings="append">
<Configuration Name="Debug" CompilerType="GCC (x86_64)" DebuggerType="GNU gdb debugger" Type="Executable" BuildCmpWithGlobalSettings="append" BuildLnkWithGlobalSettings="append" BuildResWithGlobalSettings="append">
<Compiler Options="-g;$(shell wx-config --cxxflags --unicode=yes )" C_Options="-g;$(shell wx-config --cxxflags --unicode=yes )" Assembler="" Required="yes" PreCompiledHeader="" PCHInCommandLine="no" PCHFlags="" PCHFlagsPolicy="0">
<Preprocessor Value="__WX__"/>
</Compiler>
@@ -194,8 +198,4 @@
</Completion>
</Configuration>
</Settings>
<Dependencies Name="Debug"/>
<Dependencies Name="Release"/>
<Dependencies Name="Win_x64_Release"/>
<Dependencies Name="Win_x86_Release"/>
</CodeLite_Project>
@@ -47,7 +47,7 @@
</Linker>
<ResourceCompiler Options=""/>
</GlobalSettings>
<Configuration Name="Debug" CompilerType="g++-64" DebuggerType="GNU gdb debugger" Type="Executable" BuildCmpWithGlobalSettings="append" BuildLnkWithGlobalSettings="append" BuildResWithGlobalSettings="append">
<Configuration Name="Debug" CompilerType="GCC (x86_64)" DebuggerType="GNU gdb debugger" Type="Executable" BuildCmpWithGlobalSettings="append" BuildLnkWithGlobalSettings="append" BuildResWithGlobalSettings="append">
<Compiler Options="-g;-O0;-Wall;$(shell wx-config --cxxflags --unicode=yes )" C_Options="-g;-O0;-Wall;" Assembler="" Required="yes" PreCompiledHeader="" PCHInCommandLine="no" PCHFlags="" PCHFlagsPolicy="0">
<IncludePath Value="../CodeLite"/>
<IncludePath Value="../Interfaces"/>
@@ -87,7 +87,7 @@
</Linker>
<ResourceCompiler Options=""/>
</GlobalSettings>
<Configuration Name="Debug" CompilerType="g++-64" DebuggerType="GNU gdb debugger" Type="Executable" BuildCmpWithGlobalSettings="append" BuildLnkWithGlobalSettings="append" BuildResWithGlobalSettings="append">
<Configuration Name="Debug" CompilerType="GCC (x86_64)" DebuggerType="GNU gdb debugger" Type="Executable" BuildCmpWithGlobalSettings="append" BuildLnkWithGlobalSettings="append" BuildResWithGlobalSettings="append">
<Compiler Options="-g;-O0;-Wall;$(shell wx-config --cflags)" C_Options="-g;-O0;-Wall" Assembler="" Required="yes" PreCompiledHeader="" PCHInCommandLine="no" PCHFlags="" PCHFlagsPolicy="0">
<IncludePath Value="."/>
<IncludePath Value="../CodeLite"/>
@@ -41,6 +41,10 @@
<File Name="main.cpp"/>
<File Name="winproc.cpp"/>
</VirtualDirectory>
<Dependencies Name="Debug"/>
<Dependencies Name="Release"/>
<Dependencies Name="Win_x64_Release"/>
<Dependencies Name="Win_x86_Release"/>
<Settings Type="Executable">
<GlobalSettings>
<Compiler Options="" C_Options="" Assembler="">
@@ -51,7 +55,7 @@
</Linker>
<ResourceCompiler Options=""/>
</GlobalSettings>
<Configuration Name="Debug" CompilerType="g++-64" DebuggerType="GNU gdb debugger" Type="Executable" BuildCmpWithGlobalSettings="append" BuildLnkWithGlobalSettings="append" BuildResWithGlobalSettings="append">
<Configuration Name="Debug" CompilerType="GCC (x86_64)" DebuggerType="GNU gdb debugger" Type="Executable" BuildCmpWithGlobalSettings="append" BuildLnkWithGlobalSettings="append" BuildResWithGlobalSettings="append">
<Compiler Options="-g;-O0;-Wall;" C_Options="-g;-O0;-Wall" Assembler="" Required="yes" PreCompiledHeader="" PCHInCommandLine="no" PCHFlags="" PCHFlagsPolicy="0">
<IncludePath Value="."/>
<Preprocessor Value="__DEBUG=1"/>
@@ -217,8 +221,4 @@
</Completion>
</Configuration>
</Settings>
<Dependencies Name="Debug"/>
<Dependencies Name="Release"/>
<Dependencies Name="Win_x64_Release"/>
<Dependencies Name="Win_x86_Release"/>
</CodeLite_Project>
@@ -18,6 +18,10 @@
<File Name="main.cpp"/>
</VirtualDirectory>
<Dependencies/>
<Dependencies Name="Debug"/>
<Dependencies Name="Release"/>
<Dependencies Name="Win_x64_Release"/>
<Dependencies Name="Win_x86_Release"/>
<Settings Type="Executable">
<GlobalSettings>
<Compiler Options="" C_Options="" Assembler="">
@@ -28,7 +32,7 @@
</Linker>
<ResourceCompiler Options=""/>
</GlobalSettings>
<Configuration Name="Debug" CompilerType="g++-64" DebuggerType="GNU gdb debugger" Type="Executable" BuildCmpWithGlobalSettings="append" BuildLnkWithGlobalSettings="append" BuildResWithGlobalSettings="append">
<Configuration Name="Debug" CompilerType="GCC (x86_64)" DebuggerType="GNU gdb debugger" Type="Executable" BuildCmpWithGlobalSettings="append" BuildLnkWithGlobalSettings="append" BuildResWithGlobalSettings="append">
<Compiler Options="-g" C_Options="-g" Assembler="" Required="yes" PreCompiledHeader="" PCHInCommandLine="no" PCHFlags="" PCHFlagsPolicy="0">
<IncludePath Value="."/>
</Compiler>
@@ -190,8 +194,4 @@
</Completion>
</Configuration>
</Settings>
<Dependencies Name="Debug"/>
<Dependencies Name="Release"/>
<Dependencies Name="Win_x64_Release"/>
<Dependencies Name="Win_x86_Release"/>
</CodeLite_Project>
@@ -172,7 +172,7 @@
</Linker>
<ResourceCompiler Options=""/>
</GlobalSettings>
<Configuration Name="Debug" CompilerType="g++-64" DebuggerType="GNU gdb debugger" Type="Executable" BuildCmpWithGlobalSettings="append" BuildLnkWithGlobalSettings="append" BuildResWithGlobalSettings="append">
<Configuration Name="Debug" CompilerType="GCC (x86_64)" DebuggerType="GNU gdb debugger" Type="Executable" BuildCmpWithGlobalSettings="append" BuildLnkWithGlobalSettings="append" BuildResWithGlobalSettings="append">
<Compiler Options="-g" C_Options="-g" Assembler="" Required="yes" PreCompiledHeader="" PCHInCommandLine="no" PCHFlags="" PCHFlagsPolicy="0">
<IncludePath Value="."/>
<IncludePath Value="externals/tinyxml"/>
@@ -131,6 +131,18 @@
<File Name="network/clindexerprotocol.h"/>
<File Name="network/cl_indexer_macros.h"/>
</VirtualDirectory>
<Dependencies Name="Debug_Unix"/>
<Dependencies Name="Debug_Win">
<Project Name="indexer_client"/>
</Dependencies>
<Dependencies Name="Release"/>
<Dependencies Name="ReleaseDebug_Win"/>
<Dependencies Name="Release_Unix"/>
<Dependencies Name="Release_Win">
<Project Name="indexer_client"/>
</Dependencies>
<Dependencies Name="Win_x64_Release"/>
<Dependencies Name="Win_x86_Release"/>
<Settings Type="Executable">
<GlobalSettings>
<Compiler Options="" C_Options="" Assembler="">
@@ -141,7 +153,7 @@
</Linker>
<ResourceCompiler Options=""/>
</GlobalSettings>
<Configuration Name="Debug_Unix" CompilerType="g++-64" DebuggerType="GNU gdb debugger" Type="Executable" BuildCmpWithGlobalSettings="append" BuildLnkWithGlobalSettings="append" BuildResWithGlobalSettings="append">
<Configuration Name="Debug_Unix" CompilerType="GCC (x86_64)" DebuggerType="GNU gdb debugger" Type="Executable" BuildCmpWithGlobalSettings="append" BuildLnkWithGlobalSettings="append" BuildResWithGlobalSettings="append">
<Compiler Options="-g;$(shell wx-config --cflags)" C_Options="-g" Assembler="" Required="yes" PreCompiledHeader="" PCHInCommandLine="no" PCHFlags="" PCHFlagsPolicy="0">
<IncludePath Value="."/>
<IncludePath Value="libctags/"/>
@@ -483,16 +495,4 @@
</Completion>
</Configuration>
</Settings>
<Dependencies Name="Debug_Unix"/>
<Dependencies Name="Debug_Win">
<Project Name="indexer_client"/>
</Dependencies>
<Dependencies Name="Release"/>
<Dependencies Name="ReleaseDebug_Win"/>
<Dependencies Name="Release_Unix"/>
<Dependencies Name="Release_Win">
<Project Name="indexer_client"/>
</Dependencies>
<Dependencies Name="Win_x64_Release"/>
<Dependencies Name="Win_x86_Release"/>
</CodeLite_Project>
@@ -40,6 +40,10 @@
<VirtualDirectory Name="src">
<File Name="wx-config-win.cpp"/>
</VirtualDirectory>
<Dependencies Name="Debug"/>
<Dependencies Name="Release"/>
<Dependencies Name="Win_x64_Release"/>
<Dependencies Name="Win_x86_Release"/>
<Settings Type="Executable">
<GlobalSettings>
<Compiler Options="" C_Options="" Assembler="">
@@ -50,7 +54,7 @@
</Linker>
<ResourceCompiler Options=""/>
</GlobalSettings>
<Configuration Name="Debug" CompilerType="MinGW ( CodeLite-4.8.1 )" DebuggerType="GNU gdb debugger" Type="Executable" BuildCmpWithGlobalSettings="append" BuildLnkWithGlobalSettings="append" BuildResWithGlobalSettings="append">
<Configuration Name="Debug" CompilerType="GCC (x86_64)" DebuggerType="GNU gdb debugger" Type="Executable" BuildCmpWithGlobalSettings="append" BuildLnkWithGlobalSettings="append" BuildResWithGlobalSettings="append">
<Compiler Options="-g;-O0" C_Options="-g" Assembler="" Required="yes" PreCompiledHeader="" PCHInCommandLine="no" PCHFlags="" PCHFlagsPolicy="0">
<IncludePath Value="."/>
</Compiler>
@@ -216,8 +220,4 @@ WXWIN=D:\src\wxWidgets_x64]]>
</Completion>
</Configuration>
</Settings>
<Dependencies Name="Debug"/>
<Dependencies Name="Release"/>
<Dependencies Name="Win_x64_Release"/>
<Dependencies Name="Win_x86_Release"/>
</CodeLite_Project>

0 comments on commit ed518a7

Please sign in to comment.
You can’t perform that action at this time.