| 849 | // transformation text |
| 850 | |
| 851 | bool EditorScriptInfo::GetEditorScriptPlugin(std::vector<std::tuple<PluginInfo*, uint8_t, std::vector<String>, int>>& plugins, |
| 852 | String& errorMessage) const |
| 853 | { |
| 854 | auto result = ExpandAliases(this->m_PluginPipeline, _T(""), L"ALIAS_EDITOR_SCRIPT", errorMessage); |
| 855 | if (!errorMessage.empty()) |
| 856 | return false; |
| 857 | for (auto& [pluginName, targetFlags, args, quoteChar] : result) |
| 858 | { |
| 859 | bool found = false; |
| 860 | PluginArray *pluginInfoArray = CAllThreadsScripts::GetActiveSet()->GetAvailableScripts(L"EDITOR_SCRIPT"); |
| 861 | for (const auto& plugin : *pluginInfoArray) |
| 862 | { |
| 863 | std::vector<String> namesArray; |
| 864 | std::vector<int> idArray; |
| 865 | int nFunc = plugin::GetMethodsFromScript(plugin->m_lpDispatch, namesArray, idArray); |
| 866 | for (int i = 0; i < nFunc; ++i) |
| 867 | { |
| 868 | if (namesArray[i] == pluginName) |
| 869 | { |
| 870 | plugins.push_back({ plugin.get(), targetFlags, args, idArray[i]}); |
| 871 | found = true; |
| 872 | break; |
| 873 | } |
| 874 | } |
| 875 | if (found) |
| 876 | break; |
| 877 | } |
| 878 | if (!found) |
| 879 | { |
| 880 | errorMessage = strutils::format_string1(_("Plugin not found or invalid: %1"), pluginName); |
| 881 | return false; |
| 882 | } |
| 883 | } |
| 884 | return true; |
| 885 | } |
| 886 | |
| 887 | bool EditorScriptInfo::TransformText(int target, String& text, const std::vector<StringView>& variables, bool& changed) |
| 888 | { |
nothing calls this directly
no test coverage detected