| 318 | }; |
| 319 | |
| 320 | struct CodeCompletionOption { |
| 321 | CodeCompletionKind kind = CODE_COMPLETION_KIND_PLAIN_TEXT; |
| 322 | String display; |
| 323 | String insert_text; |
| 324 | Color font_color; |
| 325 | Ref<Resource> icon; |
| 326 | Variant default_value; |
| 327 | Vector<Pair<int, int>> matches; |
| 328 | Vector<Pair<int, int>> last_matches = { { -1, -1 } }; ///< This value correspond to an impossible match |
| 329 | int location = LOCATION_OTHER; |
| 330 | String theme_color_name; |
| 331 | |
| 332 | CodeCompletionOption() {} |
| 333 | |
| 334 | CodeCompletionOption(const String &p_text, CodeCompletionKind p_kind, int p_location = LOCATION_OTHER, const String &p_theme_color_name = "") { |
| 335 | display = p_text; |
| 336 | insert_text = p_text; |
| 337 | kind = p_kind; |
| 338 | location = p_location; |
| 339 | theme_color_name = p_theme_color_name; |
| 340 | } |
| 341 | |
| 342 | /// @return Characteristics of the match found by order of importance. |
| 343 | /// Matches will be ranked by a lexicographical order on the vector returned by this function. |
| 344 | /// The lower values indicate better matches and that they should go before in the order of appearance. |
| 345 | TypedArray<int> get_option_characteristics(const String &p_base); |
| 346 | void clear_characteristics(); |
| 347 | /// @return Only the cached value and warns if it was not updated since the last change of matches. |
| 348 | TypedArray<int> get_option_cached_characteristics() const; |
| 349 | |
| 350 | private: |
| 351 | TypedArray<int> charac; |
| 352 | }; |
| 353 | |
| 354 | virtual Error complete_code(const String &p_code, const String &p_path, Object *p_owner, List<CodeCompletionOption> *r_options, bool &r_force, String &r_call_hint) { return ERR_UNAVAILABLE; } |
| 355 |
no outgoing calls
no test coverage detected