| 610 | } |
| 611 | |
| 612 | void JavascriptProcessor::showPopupForCallback(const Identifier& callback, int /*charNumberToDisplay*/, int /*lineNumberToDisplay*/) |
| 613 | { |
| 614 | #if USE_BACKEND |
| 615 | |
| 616 | auto mc = dynamic_cast<Processor*>(this)->getMainController(); |
| 617 | mc->getCommandManager()->invoke(BackendCommandTarget::MenuViewAddFloatingWindow, false); |
| 618 | |
| 619 | auto rw = GET_BACKEND_ROOT_WINDOW(mc->getConsoleHandler().getMainConsole()); |
| 620 | auto root = rw->getLastPopup()->getRootFloatingTile(); |
| 621 | |
| 622 | root->setNewContent(GET_PANEL_NAME(CodeEditorPanel)); |
| 623 | |
| 624 | auto editor = dynamic_cast<CodeEditorPanel*>(root->getCurrentFloatingPanel()); |
| 625 | |
| 626 | auto jp = dynamic_cast<JavascriptProcessor*>(this); |
| 627 | |
| 628 | for (int i = 0; i < jp->getNumSnippets(); i++) |
| 629 | { |
| 630 | if (jp->getSnippet(i)->getCallbackName() == callback) |
| 631 | { |
| 632 | editor->setContentWithUndo(dynamic_cast<Processor*>(this), i); |
| 633 | break; |
| 634 | } |
| 635 | } |
| 636 | |
| 637 | #else |
| 638 | ignoreUnused(callback); |
| 639 | |
| 640 | #endif |
| 641 | } |
| 642 | |
| 643 | |
| 644 | void JavascriptProcessor::cleanupEngine() |
nothing calls this directly
no test coverage detected