MCPcopy Create free account
hub / github.com/codereader/DarkRadiant / executeCommand

Method executeCommand

radiantcore/commandsystem/CommandSystem.cpp:369–400  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

367}
368
369void CommandSystem::executeCommand(const std::string& name, const ArgumentList& args)
370{
371 // Find the named command
372 auto i = _commands.find(name);
373
374 if (i == _commands.end())
375 {
376 rError() << "Cannot execute command " << name << ": Command not found." << std::endl;
377 return;
378 }
379
380 try
381 {
382 i->second->execute(args);
383 }
384 catch (const ExecutionNotPossible& ex)
385 {
386 rError() << "Command '" << name << "' cannot be executed: " << ex.what() << std::endl;
387
388 // Dispatch this exception to the messagebus to potential listeners
389 radiant::CommandExecutionFailedMessage message(ex);
390 GlobalRadiantCore().getMessageBus().sendMessage(message);
391 }
392 catch (const ExecutionFailure& ex)
393 {
394 rError() << "Command '" << name << "' failed: " << ex.what() << std::endl;
395
396 // Dispatch this exception to the messagebus to potential listeners
397 radiant::CommandExecutionFailedMessage message(ex);
398 GlobalRadiantCore().getMessageBus().sendMessage(message);
399 }
400}
401
402AutoCompletionInfo CommandSystem::getAutoCompletionInfo(const std::string& prefix) {
403 AutoCompletionInfo returnValue;

Callers 15

TexToolModeTogglesMethod · 0.45
handleGridSnapRequestMethod · 0.45
onShiftSelectedMethod · 0.45
onScaleSelectedMethod · 0.45
onRotateSelectedMethod · 0.45
onFarClipPlaneInClickMethod · 0.45
onMouseMoveMethod · 0.45
loadMapSafeMethod · 0.45
ManipulatorToggleMethod · 0.45
SelectionModeToggleMethod · 0.45

Calls 6

rErrorFunction · 0.85
whatMethod · 0.80
sendMessageMethod · 0.80
findMethod · 0.45
endMethod · 0.45
executeMethod · 0.45

Tested by 3

onScaleMethod · 0.36
fitTextureMethod · 0.36