MCPcopy Create free account
hub / github.com/christophhart/HISE / applyChangesFromActiveEditor

Method applyChangesFromActiveEditor

hi_scripting/scripting/ScriptProcessor.cpp:2856–2872  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2854}
2855
2856void JavascriptProcessor::EditorHelpers::applyChangesFromActiveEditor(JavascriptProcessor* p)
2857{
2858 auto activeEditor = getActiveEditor(p);
2859
2860 if (activeEditor == nullptr)
2861 return;
2862
2863#if USE_BACKEND
2864 if (auto pe = activeEditor->findParentComponentOfClass<PopupIncludeEditor>())
2865 {
2866 auto f = pe->getFile();
2867
2868 if (f.existsAsFile())
2869 f.replaceWithText(activeEditor->getDocument().getAllContent());
2870 }
2871#endif
2872}
2873
2874hise::JavascriptCodeEditor* JavascriptProcessor::EditorHelpers::getActiveEditor(Processor* p)
2875{

Callers

nothing calls this directly

Calls 5

replaceWithTextMethod · 0.80
getAllContentMethod · 0.80
getFileMethod · 0.45
existsAsFileMethod · 0.45
getDocumentMethod · 0.45

Tested by

no test coverage detected