logic: ping related updates
* ping is now sent on window focus * remove ping result from status view
This commit is contained in:
@@ -177,21 +177,19 @@ void IDECommunicationController::handlePing(const NetworkProtocolHelper::PingMes
|
||||
|
||||
if (msg.ideName.empty())
|
||||
{
|
||||
msg.ideName = "unknown";
|
||||
msg.ideName = "unknown IDE";
|
||||
}
|
||||
|
||||
std::string statusMessage = msg.ideName + " instance detected via plugin port";
|
||||
|
||||
MessageStatus(statusMessage, false, false).dispatch();
|
||||
LOG_INFO(msg.ideName + " instance detected via plugin port");
|
||||
msg.dispatch();
|
||||
}
|
||||
else
|
||||
{
|
||||
LOG_ERROR_STREAM(<< "Can't handle ping, message is invalid");
|
||||
LOG_ERROR("Can't handle ping, message is invalid");
|
||||
}
|
||||
}
|
||||
|
||||
void IDECommunicationController::handleMessage(MessageActivateTokens* message)
|
||||
void IDECommunicationController::handleMessage(MessageWindowFocus* message)
|
||||
{
|
||||
sendUpdatePing();
|
||||
}
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
#include "component/controller/helper/NetworkProtocolHelper.h"
|
||||
|
||||
#include "utility/messaging/MessageListener.h"
|
||||
#include "utility/messaging/type/MessageActivateTokens.h"
|
||||
#include "utility/messaging/type/MessageWindowFocus.h"
|
||||
#include "utility/messaging/type/MessageIDECreateCDB.h"
|
||||
#include "utility/messaging/type/MessageMoveIDECursor.h"
|
||||
#include "utility/messaging/type/MessagePluginPortChange.h"
|
||||
@@ -16,7 +16,7 @@ class StorageAccess;
|
||||
|
||||
class IDECommunicationController
|
||||
: public Controller
|
||||
, public MessageListener<MessageActivateTokens>
|
||||
, public MessageListener<MessageWindowFocus>
|
||||
, public MessageListener<MessageIDECreateCDB>
|
||||
, public MessageListener<MessageMoveIDECursor>
|
||||
, public MessageListener<MessagePluginPortChange>
|
||||
@@ -45,7 +45,7 @@ private:
|
||||
void handleCreateCDBProjectMessage(const NetworkProtocolHelper::CreateCDBProjectMessage& message);
|
||||
void handlePing(const NetworkProtocolHelper::PingMessage& message);
|
||||
|
||||
virtual void handleMessage(MessageActivateTokens* message); // use this to send update pings
|
||||
virtual void handleMessage(MessageWindowFocus* message);
|
||||
virtual void handleMessage(MessageIDECreateCDB* message);
|
||||
virtual void handleMessage(MessageMoveIDECursor* message);
|
||||
virtual void handleMessage(MessagePluginPortChange* message);
|
||||
@@ -58,4 +58,4 @@ private:
|
||||
bool m_enabled;
|
||||
};
|
||||
|
||||
#endif // IDE_COMMUNICATION_CONTROLLER_H
|
||||
#endif // IDE_COMMUNICATION_CONTROLLER_H
|
||||
|
||||
Reference in New Issue
Block a user