mirror of
https://github.com/SpartanJ/eepp.git
synced 2026-07-15 23:42:52 +03:00
Register global keybindings.
This commit is contained in:
@@ -2,8 +2,10 @@
|
||||
#include "../../notificationcenter.hpp"
|
||||
#include "../../projectbuild.hpp"
|
||||
#include "../../uistatusbar.hpp"
|
||||
#include "../../widgetcommandexecuter.hpp"
|
||||
#include "busprocess.hpp"
|
||||
#include "dap/debuggerclientdap.hpp"
|
||||
#include "debuggerclientlistener.hpp"
|
||||
#include "statusdebuggercontroller.hpp"
|
||||
#include <eepp/graphics/primitives.hpp>
|
||||
#include <eepp/system/filesystem.hpp>
|
||||
@@ -111,6 +113,11 @@ DebuggerPlugin::~DebuggerPlugin() {
|
||||
|
||||
mDebugger.reset();
|
||||
mListener.reset();
|
||||
|
||||
if ( !isShuttingDown() && getPluginContext()->getMainLayout() ) {
|
||||
for ( const auto& kb : mKeyBindings )
|
||||
getPluginContext()->getMainLayout()->getKeyBindings().removeCommandKeybind( kb.first );
|
||||
}
|
||||
}
|
||||
|
||||
void DebuggerPlugin::load( PluginManager* pluginManager ) {
|
||||
@@ -294,8 +301,14 @@ PluginRequestHandle DebuggerPlugin::processMessage( const PluginMessage& msg ) {
|
||||
break;
|
||||
}
|
||||
case ecode::PluginMessageType::UIReady: {
|
||||
for ( const auto& kb : mKeyBindings ) {
|
||||
getPluginContext()->getMainLayout()->getKeyBindings().addKeybindString( kb.second,
|
||||
kb.first );
|
||||
}
|
||||
|
||||
if ( !mInitialized )
|
||||
updateUI();
|
||||
|
||||
break;
|
||||
}
|
||||
default:
|
||||
|
||||
@@ -2,13 +2,19 @@
|
||||
|
||||
#include "../plugin.hpp"
|
||||
#include "../pluginmanager.hpp"
|
||||
#include "debuggerclientlistener.hpp"
|
||||
#include "statusdebuggercontroller.hpp"
|
||||
|
||||
using namespace EE::UI::Models;
|
||||
using namespace EE::UI;
|
||||
|
||||
namespace ecode {
|
||||
|
||||
class DebuggerClient;
|
||||
class DebuggerClientListener;
|
||||
namespace dap {
|
||||
class SourceBreakpointStateful;
|
||||
}
|
||||
|
||||
struct DapRunConfig {
|
||||
std::string command;
|
||||
std::vector<std::string> args;
|
||||
@@ -66,7 +72,7 @@ class DebuggerPlugin : public PluginBase {
|
||||
UIDropDownList* mUIDebuggerList{ nullptr };
|
||||
UIDropDownList* mUIDebuggerConfList{ nullptr };
|
||||
UIPushButton* mRunButton{ nullptr };
|
||||
UnorderedMap<std::string, UnorderedSet<SourceBreakpointStateful>> mBreakpoints;
|
||||
UnorderedMap<std::string, UnorderedSet<dap::SourceBreakpointStateful>> mBreakpoints;
|
||||
UnorderedSet<std::string> mPendingBreakpoints;
|
||||
Mutex mBreakpointsMutex;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user