Skip to content

Commit

Permalink
Sub directories (#3420)
Browse files Browse the repository at this point in the history
* Move files into Codelite/Platform/

* Move files into Codelite/database/

* Move files into Codelite/XML/

* Move files into Codelite/AsyncProcess/

* Re-run wxCrafter on AsyncProcess/TerminalEmulatorUI.wxcp

* Remove removed codelite_indexer
  • Loading branch information
Jarod42 authored Jul 11, 2024
1 parent 2dc3cfa commit 679b9d8
Show file tree
Hide file tree
Showing 219 changed files with 389 additions and 336 deletions.
4 changes: 2 additions & 2 deletions CMakePlugin/CMakePlugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -51,11 +51,11 @@
// Declaration
#include "CMakePlugin.h"

#include "AsyncProcess/asyncprocess.h"
#include "AsyncProcess/processreaderthread.h"
#include "CMakeBuilder.h"
#include "ICompilerLocator.h"
#include "StdToWX.h"
#include "asyncprocess.h"
#include "processreaderthread.h"

// wxWidgets
#include <wx/app.h>
Expand Down
2 changes: 1 addition & 1 deletion CodeFormatter/fmtBlack.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#include "fmtBlack.hpp"

#include "Platform.hpp"
#include "Platform/Platform.hpp"

fmtBlack::fmtBlack()
{
Expand Down
2 changes: 1 addition & 1 deletion CodeFormatter/fmtCMakeForamt.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#include "fmtCMakeForamt.hpp"

#include "Platform.hpp"
#include "Platform/Platform.hpp"

fmtCMakeForamt::fmtCMakeForamt()
{
Expand Down
2 changes: 1 addition & 1 deletion CodeFormatter/fmtClangFormat.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#include "fmtClangFormat.hpp"

#include "Platform.hpp"
#include "Platform/Platform.hpp"

fmtClangFormat::fmtClangFormat()
{
Expand Down
2 changes: 1 addition & 1 deletion CodeFormatter/fmtJQ.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#include "fmtJQ.hpp"

#include "Platform.hpp"
#include "Platform/Platform.hpp"

fmtJQ::fmtJQ()
{
Expand Down
2 changes: 1 addition & 1 deletion CodeFormatter/fmtPHPCBF.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#include "fmtPHPCBF.hpp"

#include "Platform.hpp"
#include "Platform/Platform.hpp"

fmtPHPCBF::fmtPHPCBF()
{
Expand Down
2 changes: 1 addition & 1 deletion CodeFormatter/fmtPHPCSFixer.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#include "fmtPHPCSFixer.hpp"

#include "Platform.hpp"
#include "Platform/Platform.hpp"

fmtPHPCSFixer::fmtPHPCSFixer()
{
Expand Down
2 changes: 1 addition & 1 deletion CodeFormatter/fmtRustfmt.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#include "fmtRustfmt.hpp"

#include "Platform.hpp"
#include "Platform/Platform.hpp"

fmtRustfmt::fmtRustfmt()
{
Expand Down
2 changes: 1 addition & 1 deletion CodeFormatter/fmtXmlLint.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#include "fmtXmlLint.hpp"

#include "Platform.hpp"
#include "Platform/Platform.hpp"

fmtXmlLint::fmtXmlLint()
{
Expand Down
2 changes: 1 addition & 1 deletion CodeFormatter/fmtYQ.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#include "fmtYQ.hpp"

#include "Platform.hpp"
#include "Platform/Platform.hpp"

#include <wx/string.h>

Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
#include "ChildProcess.h"

#include "asyncprocess.h"
#include "cl_exception.h"
#include "file_logger.h"
#include "fileutils.h"
#include "processreaderthread.h"

#include <asyncprocess.h>

#if !USE_IPROCESS
#include "UnixProcess.h"
#endif
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,13 @@
#include "UnixProcess.h"
#endif

#include <wx/arrstr.h>
#include <wx/event.h>
#include "asyncprocess.h"
#include "cl_command_event.h"
#include <asyncprocess.h>
#include "codelite_exports.h"

#include <wx/arrstr.h>
#include <wx/event.h>

class WXDLLIMPEXP_CL ChildProcess : public wxEvtHandler
{
#if USE_IPROCESS
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@
}, {
"type": "virtualFolderPicker",
"m_label": "Virtual Folder:",
"m_path": "CodeLite:AsyncProcess"
"m_path": ""
}, {
"type": "choice",
"m_label": "Centre:",
Expand Down Expand Up @@ -120,6 +120,10 @@
"type": "string",
"m_label": "Style:",
"m_value": ""
}, {
"type": "bool",
"m_label": "Keep as a class member",
"m_value": false
}, {
"type": "choice",
"m_label": "Orientation:",
Expand Down Expand Up @@ -322,6 +326,10 @@
"type": "string",
"m_label": "Max Length:",
"m_value": "0"
}, {
"type": "bool",
"m_label": "Enable Spell Checking",
"m_value": false
}, {
"type": "bool",
"m_label": "Auto Complete Directories:",
Expand All @@ -334,7 +342,6 @@
"m_events": [{
"m_eventName": "wxEVT_COMMAND_TEXT_ENTER",
"m_eventClass": "wxCommandEvent",
"m_eventHandler": "wxCommandEventHandler",
"m_functionNameAndSignature": "OnSendCommand(wxCommandEvent& event)",
"m_description": "Respond to a wxEVT_COMMAND_TEXT_ENTER event, generated when enter is pressed in a text control\n(which must have wxTE_PROCESS_ENTER style for this event to be generated).",
"m_noBody": false
Expand Down Expand Up @@ -478,6 +485,10 @@
"type": "string",
"m_label": "Style:",
"m_value": ""
}, {
"type": "bool",
"m_label": "Keep as a class member",
"m_value": false
}, {
"type": "choice",
"m_label": "Orientation:",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,31 @@
//////////////////////////////////////////////////////////////////////

#include "TerminalEmulatorUIBase.h"

#include "codelite_exports.h"

// Declare the bitmap loading function
extern void wxCB1DAInitBitmapResources();

static bool bBitmapLoaded = false;
namespace
{
// return the wxBORDER_SIMPLE that matches the current application theme
wxBorder get_border_simple_theme_aware_bit()
{
#if wxVERSION_NUMBER >= 3300 && defined(__WXMSW__)
return wxSystemSettings::GetAppearance().IsDark() ? wxBORDER_SIMPLE : wxBORDER_STATIC;
#else
return wxBORDER_DEFAULT;
#endif
} // DoGetBorderSimpleBit
bool bBitmapLoaded = false;
} // namespace

TerminalEmulatorUIBase::TerminalEmulatorUIBase(wxWindow* parent, wxWindowID id, const wxPoint& pos, const wxSize& size,
long style)
: wxPanel(parent, id, pos, size, style)
{
if(!bBitmapLoaded) {
if (!bBitmapLoaded) {
// We need to initialise the default bitmap handler
wxXmlResource::Get()->AddHandler(new wxBitmapXmlHandler);
wxCB1DAInitBitmapResources();
Expand Down Expand Up @@ -75,25 +88,23 @@ TerminalEmulatorUIBase::TerminalEmulatorUIBase(wxWindow* parent, wxWindowID id,

SetName(wxT("TerminalEmulatorUIBase"));
SetSize(wxDLG_UNIT(this, wxSize(500, 300)));
if(GetSizer()) {
if (GetSizer()) {
GetSizer()->Fit(this);
}
// Connect events
m_textCtrl->Connect(wxEVT_COMMAND_TEXT_ENTER, wxCommandEventHandler(TerminalEmulatorUIBase::OnSendCommand), NULL,
this);
m_textCtrl->Bind(wxEVT_COMMAND_TEXT_ENTER, &TerminalEmulatorUIBase::OnSendCommand, this);
}

TerminalEmulatorUIBase::~TerminalEmulatorUIBase()
{
m_textCtrl->Disconnect(wxEVT_COMMAND_TEXT_ENTER, wxCommandEventHandler(TerminalEmulatorUIBase::OnSendCommand), NULL,
this);
m_textCtrl->Unbind(wxEVT_COMMAND_TEXT_ENTER, &TerminalEmulatorUIBase::OnSendCommand, this);
}

TerminalEmulatorFrameBase::TerminalEmulatorFrameBase(wxWindow* parent, wxWindowID id, const wxString& title,
const wxPoint& pos, const wxSize& size, long style)
: wxFrame(parent, id, title, pos, size, style)
{
if(!bBitmapLoaded) {
if (!bBitmapLoaded) {
// We need to initialise the default bitmap handler
wxXmlResource::Get()->AddHandler(new wxBitmapXmlHandler);
wxCB1DAInitBitmapResources();
Expand All @@ -105,21 +116,19 @@ TerminalEmulatorFrameBase::TerminalEmulatorFrameBase(wxWindow* parent, wxWindowI

SetName(wxT("TerminalEmulatorFrameBase"));
SetSize(wxDLG_UNIT(this, wxSize(500, 300)));
if(GetSizer()) {
if (GetSizer()) {
GetSizer()->Fit(this);
}
if(GetParent()) {
if (GetParent()) {
CentreOnParent(wxBOTH);
} else {
CentreOnScreen(wxBOTH);
}
#if wxVERSION_NUMBER >= 2900
if(!wxPersistenceManager::Get().Find(this)) {
if (!wxPersistenceManager::Get().Find(this)) {
wxPersistenceManager::Get().RegisterAndRestore(this);
} else {
wxPersistenceManager::Get().Restore(this);
}
#endif
}

TerminalEmulatorFrameBase::~TerminalEmulatorFrameBase() {}
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
// Do not modify this file by hand!
//////////////////////////////////////////////////////////////////////

#ifndef _CODELITE_CODELITE_TERMINALEMULATORUI_BASE_CLASSES_H
#define _CODELITE_CODELITE_TERMINALEMULATORUI_BASE_CLASSES_H
#ifndef _CODELITE_ASYNCPROCESS_TERMINALEMULATORUI_BASE_CLASSES_H
#define _CODELITE_ASYNCPROCESS_TERMINALEMULATORUI_BASE_CLASSES_H

// clang-format off
#include <wx/settings.h>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,6 @@ void wxCB1DAInitBitmapResources()
else wxFileSystem::AddHandler(new wxMemoryFSHandlerBase);
}

XRC_ADD_FILE(wxT("XRC_resource/TerminalEmulatorUI_codelite_bitmaps.cpp$C__src_codelite_CodeLite_TerminalEmulatorUI_codelite_bitmaps.xrc"), xml_res_file_0, xml_res_size_0, wxT("text/xml"));
wxXmlResource::Get()->Load(wxT("memory:XRC_resource/TerminalEmulatorUI_codelite_bitmaps.cpp$C__src_codelite_CodeLite_TerminalEmulatorUI_codelite_bitmaps.xrc"));
XRC_ADD_FILE(wxT("XRC_resource/TerminalEmulatorUI_codelite_bitmaps.cpp$C__src_codelite_CodeLite_AsyncProcess_TerminalEmulatorUI_codelite_bitmaps.xrc"), xml_res_file_0, xml_res_size_0, wxT("text/xml"));
wxXmlResource::Get()->Load(wxT("memory:XRC_resource/TerminalEmulatorUI_codelite_bitmaps.cpp$C__src_codelite_CodeLite_AsyncProcess_TerminalEmulatorUI_codelite_bitmaps.xrc"));
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
#if defined(__WXGTK__) || defined(__WXOSX__)
#include "file_logger.h"

#include <cl_command_event.h>
#include <fileutils.h>
#include <processreaderthread.h>
#include "cl_command_event.h"
#include "fileutils.h"
#include "processreaderthread.h"
#include <signal.h>
#include <string.h>
#include <sys/select.h>
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@
class wxEvtHandler;
class IProcess;

// #include "asyncprocess.h"
#include "asyncprocess.h"

#include "StringUtils.h"
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#include "clCommandProcessor.h"
#include "cl_command_event.h"

#include "processreaderthread.h"
#include "cl_command_event.h"

wxDEFINE_EVENT(wxEVT_COMMAND_PROCESSOR_ENDED, clCommandEvent);
wxDEFINE_EVENT(wxEVT_COMMAND_PROCESSOR_OUTPUT, clCommandEvent);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,12 @@
#ifndef CLCOMMANDPROCESSOR_H
#define CLCOMMANDPROCESSOR_H

#include <wx/event.h>
#include "asyncprocess.h"
#include <wx/string.h>
#include "codelite_exports.h"
#include "cl_command_event.h"
#include "codelite_exports.h"

#include <wx/event.h>
#include <wx/string.h>

wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CL, wxEVT_COMMAND_PROCESSOR_ENDED, clCommandEvent);

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
10 changes: 6 additions & 4 deletions CodeLite/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,14 @@ FLEX_TARGET(IncludeFinderFlex "${CMAKE_SOURCE_DIR}/CodeLite/Cxx/include_finder.l
COMPILE_FLAGS "-Pinclf_ --noline --yylineno --batch")
FLEX_TARGET(PhpFlex "${CMAKE_SOURCE_DIR}/CodeLite/PHP/PhpLexer.l" "${CMAKE_CURRENT_BINARY_DIR}/PhpLexer.cpp"
COMPILE_FLAGS "-Pphp --noline --yylineno --batch")
FLEX_TARGET(XmlFlex "${CMAKE_SOURCE_DIR}/CodeLite/XMLLexer.l" "${CMAKE_CURRENT_BINARY_DIR}/XmlLexer.cpp"
FLEX_TARGET(XmlFlex "${CMAKE_SOURCE_DIR}/CodeLite/XML/XMLLexer.l" "${CMAKE_CURRENT_BINARY_DIR}/XmlLexer.cpp"
COMPILE_FLAGS "-Pxml --noline --yylineno --batch")

set(FlexSrcs "${FLEX_CxxFlex_OUTPUTS}" "${FLEX_IncludeFinderFlex_OUTPUTS}" "${FLEX_PhpFlex_OUTPUTS}" "${FLEX_XmlFlex_OUTPUTS}")

# Include paths
include_directories(
"${CL_SRC_ROOT}/sdk/wxsqlite3/include"
"${CL_SRC_ROOT}/sdk/codelite_indexer/network"
"${CL_SRC_ROOT}/sdk/websocketpp"
"${CL_SRC_ROOT}/sdk/asio-1.12.1"
"${CL_SRC_ROOT}/CodeLite"
Expand Down Expand Up @@ -82,12 +81,15 @@ file(
GLOB
SRCS
"*.cpp"
"../sdk/codelite_indexer/network/*.cpp"
"AsyncProcess/*.cpp"
"Console/*.cpp"
"Cxx/*.cpp"
"LSP/*.cpp"
"PHP/*.cpp"
"Platform/*.cpp"
"SocketAPI/*.cpp"
"LSP/*.cpp"
"XML/*.cpp"
"database/*.cpp"
"ssh/*.cpp")

# Define GTK libraries
Expand Down
2 changes: 1 addition & 1 deletion CodeLite/CTags.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#include "CTags.hpp"

#include "asyncprocess.h"
#include "AsyncProcess/asyncprocess.h"
#include "clTempFile.hpp"
#include "cl_standard_paths.h"
#include "ctags_manager.h"
Expand Down
2 changes: 1 addition & 1 deletion CodeLite/CTags.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
#define CTAGSGENERATOR_HPP

#include "codelite_exports.h"
#include "entry.h"
#include "database/entry.h"
#include "tag_tree.h"

#include <vector>
Expand Down
4 changes: 2 additions & 2 deletions CodeLite/CompletionHelper.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
#define COMPLETIONHELPER_HPP

#include "codelite_exports.h"
#include "entry.h"
#include "istorage.h"
#include "database/entry.h"
#include "database/istorage.h"

#include <functional>
#include <vector>
Expand Down
2 changes: 1 addition & 1 deletion CodeLite/Console/clConsoleAlacritty.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#include "clConsoleAlacritty.hpp"

#include "Platform.hpp"
#include "Platform/Platform.hpp"

clConsoleAlacritty::clConsoleAlacritty()
{
Expand Down
Loading

0 comments on commit 679b9d8

Please sign in to comment.