godot/editor/find_in_files.cpp

/**************************************************************************/
/*  find_in_files.cpp                                                     */
/**************************************************************************/
/*                         This file is part of:                          */
/*                             GODOT ENGINE                               */
/*                        https://godotengine.org                         */
/**************************************************************************/
/* Copyright (c) 2014-present Godot Engine contributors (see AUTHORS.md). */
/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur.                  */
/*                                                                        */
/* Permission is hereby granted, free of charge, to any person obtaining  */
/* a copy of this software and associated documentation files (the        */
/* "Software"), to deal in the Software without restriction, including    */
/* without limitation the rights to use, copy, modify, merge, publish,    */
/* distribute, sublicense, and/or sell copies of the Software, and to     */
/* permit persons to whom the Software is furnished to do so, subject to  */
/* the following conditions:                                              */
/*                                                                        */
/* The above copyright notice and this permission notice shall be         */
/* included in all copies or substantial portions of the Software.        */
/*                                                                        */
/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,        */
/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF     */
/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. */
/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY   */
/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,   */
/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE      */
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.                 */
/**************************************************************************/

#include "find_in_files.h"

#include "core/config/project_settings.h"
#include "core/io/dir_access.h"
#include "core/os/os.h"
#include "editor/editor_node.h"
#include "editor/editor_string_names.h"
#include "editor/themes/editor_scale.h"
#include "scene/gui/box_container.h"
#include "scene/gui/button.h"
#include "scene/gui/check_box.h"
#include "scene/gui/file_dialog.h"
#include "scene/gui/grid_container.h"
#include "scene/gui/label.h"
#include "scene/gui/line_edit.h"
#include "scene/gui/progress_bar.h"
#include "scene/gui/tree.h"

const char *FindInFiles::SIGNAL_RESULT_FOUND =;

// TODO: Would be nice in Vector and Vectors.
template <typename T>
inline void pop_back(T &container) {}

static bool find_next(const String &line, const String &pattern, int from, bool match_case, bool whole_words, int &out_begin, int &out_end) {}

//--------------------------------------------------------------------------------

void FindInFiles::set_search_text(const String &p_pattern) {}

void FindInFiles::set_whole_words(bool p_whole_word) {}

void FindInFiles::set_match_case(bool p_match_case) {}

void FindInFiles::set_folder(const String &folder) {}

void FindInFiles::set_filter(const HashSet<String> &exts) {}

void FindInFiles::_notification(int p_what) {}

void FindInFiles::start() {}

void FindInFiles::stop() {}

void FindInFiles::_process() {}

void FindInFiles::_iterate() {}

float FindInFiles::get_progress() const {}

void FindInFiles::_scan_dir(const String &path, PackedStringArray &out_folders, PackedStringArray &out_files_to_scan) {}

void FindInFiles::_scan_file(const String &fpath) {}

void FindInFiles::_bind_methods() {}

//-----------------------------------------------------------------------------
const char *FindInFilesDialog::SIGNAL_FIND_REQUESTED =;
const char *FindInFilesDialog::SIGNAL_REPLACE_REQUESTED =;

FindInFilesDialog::FindInFilesDialog() {}

void FindInFilesDialog::set_search_text(const String &text) {}

void FindInFilesDialog::set_replace_text(const String &text) {}

void FindInFilesDialog::set_find_in_files_mode(FindInFilesMode p_mode) {}

String FindInFilesDialog::get_search_text() const {}

String FindInFilesDialog::get_replace_text() const {}

bool FindInFilesDialog::is_match_case() const {}

bool FindInFilesDialog::is_whole_words() const {}

String FindInFilesDialog::get_folder() const {}

HashSet<String> FindInFilesDialog::get_filter() const {}

void FindInFilesDialog::_notification(int p_what) {}

void FindInFilesDialog::_on_folder_button_pressed() {}

void FindInFilesDialog::custom_action(const String &p_action) {}

void FindInFilesDialog::_on_search_text_modified(const String &text) {}

void FindInFilesDialog::_on_search_text_submitted(const String &text) {}

void FindInFilesDialog::_on_replace_text_submitted(const String &text) {}

void FindInFilesDialog::_on_folder_selected(String path) {}

void FindInFilesDialog::_bind_methods() {}

//-----------------------------------------------------------------------------
const char *FindInFilesPanel::SIGNAL_RESULT_SELECTED =;
const char *FindInFilesPanel::SIGNAL_FILES_MODIFIED =;
const char *FindInFilesPanel::SIGNAL_CLOSE_BUTTON_CLICKED =;

FindInFilesPanel::FindInFilesPanel() {}

void FindInFilesPanel::set_with_replace(bool with_replace) {}

void FindInFilesPanel::set_replace_text(const String &text) {}

void FindInFilesPanel::clear() {}

void FindInFilesPanel::start_search() {}

void FindInFilesPanel::stop_search() {}

void FindInFilesPanel::_notification(int p_what) {}

void FindInFilesPanel::_on_result_found(const String &fpath, int line_number, int begin, int end, String text) {}

void FindInFilesPanel::draw_result_text(Object *item_obj, Rect2 rect) {}

void FindInFilesPanel::_on_item_edited() {}

void FindInFilesPanel::_on_finished() {}

void FindInFilesPanel::_on_refresh_button_clicked() {}

void FindInFilesPanel::_on_cancel_button_clicked() {}

void FindInFilesPanel::_on_close_button_clicked() {}

void FindInFilesPanel::_on_result_selected() {}

void FindInFilesPanel::_on_replace_text_changed(const String &text) {}

void FindInFilesPanel::_on_replace_all_clicked() {}

// Same as get_line, but preserves line ending characters.
class ConservativeGetLine {};

void FindInFilesPanel::apply_replaces_in_file(const String &fpath, const Vector<Result> &locations, const String &new_text) {}

String FindInFilesPanel::get_replace_text() {}

void FindInFilesPanel::update_replace_buttons() {}

void FindInFilesPanel::set_progress_visible(bool p_visible) {}

void FindInFilesPanel::_bind_methods() {}