logic: vs plugin upgrade

Updated documentation and removed obsolete plugin ui
This commit is contained in:
Manuel Dobusch
2016-11-29 14:06:02 +01:00
parent e1968eaaac
commit d24e5b5bbd
13 changed files with 279 additions and 11 deletions
@@ -12,6 +12,7 @@
#include "utility/messaging/type/MessageProjectNew.h"
#include "utility/messaging/type/MessageStatus.h"
#include "utility/messaging/type/MessageActivateFile.h"
#include "utility/messaging/type/MessagePingReceived.h"
IDECommunicationController::IDECommunicationController(StorageAccess* storageAccess)
: m_storageAccess(storageAccess)
@@ -48,6 +49,10 @@ void IDECommunicationController::handleIncomingMessage(const std::string& messag
{
handleCreateCDBProjectMessage(NetworkProtocolHelper::parseCreateCDBProjectMessage(message));
}
else if (type == NetworkProtocolHelper::MESSAGE_TYPE::PING)
{
handlePing(NetworkProtocolHelper::parsePingMessage(message));
}
else
{
handleCreateProjectMessage(NetworkProtocolHelper::parseCreateProjectMessage(message));
@@ -152,8 +157,6 @@ void IDECommunicationController::handleCreateCDBProjectMessage(const NetworkProt
msg->setHeaderPaths(message.headerPaths);
msg->ideId = message.ideId;
bool foo = msg->fromCDB();
MessageDispatchWhenLicenseValid(msg).dispatch();
}
else
@@ -162,6 +165,32 @@ void IDECommunicationController::handleCreateCDBProjectMessage(const NetworkProt
}
}
void IDECommunicationController::handlePing(const NetworkProtocolHelper::PingMessage& message)
{
if (message.valid)
{
std::shared_ptr<MessagePingReceived> msg = std::make_shared<MessagePingReceived>();
msg->ideId = message.ideId;
std::string ideName = "unknown";
if (msg->ideId == "vs")
{
ideName = "Visual Studio";
}
// TODO: add the other ides
std::string message = ideName + " instance detected";
MessageStatus(message, false, false).dispatch();
MessageDispatchWhenLicenseValid(msg).dispatch();
}
else
{
LOG_ERROR_STREAM(<< "Can't handle ping, message is invalid");
}
}
void IDECommunicationController::handleMessage(MessageIDECreateCDB* message)
{
std::string networkMessage = NetworkProtocolHelper::buildCreateCDBMessage();