mirror of
https://github.com/godotengine/godot-docs-l10n.git
synced 2025-12-31 09:49:22 +03:00
581 lines
46 KiB
ReStructuredText
581 lines
46 KiB
ReStructuredText
:github_url: hide
|
|
|
|
.. _class_EditorVCSInterface:
|
|
|
|
EditorVCSInterface
|
|
==================
|
|
|
|
**Eredita:** :ref:`Object<class_Object>`
|
|
|
|
Interfaccia del sistema di controllo versione (VCS), che legge e scrive sul VCS locale in uso.
|
|
|
|
.. rst-class:: classref-introduction-group
|
|
|
|
Descrizione
|
|
----------------------
|
|
|
|
Definisce l'API che l'editor utilizza per estrarre informazioni dal VCS sottostante. L'implementazione di questa API è inclusa nei plugin VCS, che sono plugin in GDExtension che ereditano **EditorVCSInterface** e sono collegati (su richiesta) all'istanza singleton di **EditorVCSInterface**. Invece di eseguire l'attività da sole, tutte le funzioni virtuali elencate di seguito chiamano le funzioni sovrascritte internamente nelle estensioni VCS per fornire un'esperienza plug-n-play. Un'estensione VCS personalizzata dovrebbe ereditare da **EditorVCSInterface** e sovrascrivere ciascuna di queste funzioni virtuali.
|
|
|
|
.. rst-class:: classref-introduction-group
|
|
|
|
Tutorial
|
|
----------------
|
|
|
|
- :doc:`Sistemi di controllo versione <../tutorials/best_practices/version_control_systems>`
|
|
|
|
.. rst-class:: classref-reftable-group
|
|
|
|
Metodi
|
|
------------
|
|
|
|
.. table::
|
|
:widths: auto
|
|
|
|
+------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| :ref:`bool<class_bool>` | :ref:`_checkout_branch<class_EditorVCSInterface_private_method__checkout_branch>`\ (\ branch_name\: :ref:`String<class_String>`\ ) |virtual| |required| |
|
|
+------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| |void| | :ref:`_commit<class_EditorVCSInterface_private_method__commit>`\ (\ msg\: :ref:`String<class_String>`\ ) |virtual| |required| |
|
|
+------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| |void| | :ref:`_create_branch<class_EditorVCSInterface_private_method__create_branch>`\ (\ branch_name\: :ref:`String<class_String>`\ ) |virtual| |required| |
|
|
+------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| |void| | :ref:`_create_remote<class_EditorVCSInterface_private_method__create_remote>`\ (\ remote_name\: :ref:`String<class_String>`, remote_url\: :ref:`String<class_String>`\ ) |virtual| |required| |
|
|
+------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| |void| | :ref:`_discard_file<class_EditorVCSInterface_private_method__discard_file>`\ (\ file_path\: :ref:`String<class_String>`\ ) |virtual| |required| |
|
|
+------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| |void| | :ref:`_fetch<class_EditorVCSInterface_private_method__fetch>`\ (\ remote\: :ref:`String<class_String>`\ ) |virtual| |required| |
|
|
+------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| :ref:`Array<class_Array>`\[:ref:`String<class_String>`\] | :ref:`_get_branch_list<class_EditorVCSInterface_private_method__get_branch_list>`\ (\ ) |virtual| |required| |
|
|
+------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| :ref:`String<class_String>` | :ref:`_get_current_branch_name<class_EditorVCSInterface_private_method__get_current_branch_name>`\ (\ ) |virtual| |required| |
|
|
+------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| :ref:`Array<class_Array>`\[:ref:`Dictionary<class_Dictionary>`\] | :ref:`_get_diff<class_EditorVCSInterface_private_method__get_diff>`\ (\ identifier\: :ref:`String<class_String>`, area\: :ref:`int<class_int>`\ ) |virtual| |required| |
|
|
+------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| :ref:`Array<class_Array>`\[:ref:`Dictionary<class_Dictionary>`\] | :ref:`_get_line_diff<class_EditorVCSInterface_private_method__get_line_diff>`\ (\ file_path\: :ref:`String<class_String>`, text\: :ref:`String<class_String>`\ ) |virtual| |required| |
|
|
+------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| :ref:`Array<class_Array>`\[:ref:`Dictionary<class_Dictionary>`\] | :ref:`_get_modified_files_data<class_EditorVCSInterface_private_method__get_modified_files_data>`\ (\ ) |virtual| |required| |
|
|
+------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| :ref:`Array<class_Array>`\[:ref:`Dictionary<class_Dictionary>`\] | :ref:`_get_previous_commits<class_EditorVCSInterface_private_method__get_previous_commits>`\ (\ max_commits\: :ref:`int<class_int>`\ ) |virtual| |required| |
|
|
+------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| :ref:`Array<class_Array>`\[:ref:`String<class_String>`\] | :ref:`_get_remotes<class_EditorVCSInterface_private_method__get_remotes>`\ (\ ) |virtual| |required| |
|
|
+------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| :ref:`String<class_String>` | :ref:`_get_vcs_name<class_EditorVCSInterface_private_method__get_vcs_name>`\ (\ ) |virtual| |required| |
|
|
+------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| :ref:`bool<class_bool>` | :ref:`_initialize<class_EditorVCSInterface_private_method__initialize>`\ (\ project_path\: :ref:`String<class_String>`\ ) |virtual| |required| |
|
|
+------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| |void| | :ref:`_pull<class_EditorVCSInterface_private_method__pull>`\ (\ remote\: :ref:`String<class_String>`\ ) |virtual| |required| |
|
|
+------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| |void| | :ref:`_push<class_EditorVCSInterface_private_method__push>`\ (\ remote\: :ref:`String<class_String>`, force\: :ref:`bool<class_bool>`\ ) |virtual| |required| |
|
|
+------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| |void| | :ref:`_remove_branch<class_EditorVCSInterface_private_method__remove_branch>`\ (\ branch_name\: :ref:`String<class_String>`\ ) |virtual| |required| |
|
|
+------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| |void| | :ref:`_remove_remote<class_EditorVCSInterface_private_method__remove_remote>`\ (\ remote_name\: :ref:`String<class_String>`\ ) |virtual| |required| |
|
|
+------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| |void| | :ref:`_set_credentials<class_EditorVCSInterface_private_method__set_credentials>`\ (\ username\: :ref:`String<class_String>`, password\: :ref:`String<class_String>`, ssh_public_key_path\: :ref:`String<class_String>`, ssh_private_key_path\: :ref:`String<class_String>`, ssh_passphrase\: :ref:`String<class_String>`\ ) |virtual| |required| |
|
|
+------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| :ref:`bool<class_bool>` | :ref:`_shut_down<class_EditorVCSInterface_private_method__shut_down>`\ (\ ) |virtual| |required| |
|
|
+------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| |void| | :ref:`_stage_file<class_EditorVCSInterface_private_method__stage_file>`\ (\ file_path\: :ref:`String<class_String>`\ ) |virtual| |required| |
|
|
+------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| |void| | :ref:`_unstage_file<class_EditorVCSInterface_private_method__unstage_file>`\ (\ file_path\: :ref:`String<class_String>`\ ) |virtual| |required| |
|
|
+------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| :ref:`Dictionary<class_Dictionary>` | :ref:`add_diff_hunks_into_diff_file<class_EditorVCSInterface_method_add_diff_hunks_into_diff_file>`\ (\ diff_file\: :ref:`Dictionary<class_Dictionary>`, diff_hunks\: :ref:`Array<class_Array>`\[:ref:`Dictionary<class_Dictionary>`\]\ ) |
|
|
+------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| :ref:`Dictionary<class_Dictionary>` | :ref:`add_line_diffs_into_diff_hunk<class_EditorVCSInterface_method_add_line_diffs_into_diff_hunk>`\ (\ diff_hunk\: :ref:`Dictionary<class_Dictionary>`, line_diffs\: :ref:`Array<class_Array>`\[:ref:`Dictionary<class_Dictionary>`\]\ ) |
|
|
+------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| :ref:`Dictionary<class_Dictionary>` | :ref:`create_commit<class_EditorVCSInterface_method_create_commit>`\ (\ msg\: :ref:`String<class_String>`, author\: :ref:`String<class_String>`, id\: :ref:`String<class_String>`, unix_timestamp\: :ref:`int<class_int>`, offset_minutes\: :ref:`int<class_int>`\ ) |
|
|
+------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| :ref:`Dictionary<class_Dictionary>` | :ref:`create_diff_file<class_EditorVCSInterface_method_create_diff_file>`\ (\ new_file\: :ref:`String<class_String>`, old_file\: :ref:`String<class_String>`\ ) |
|
|
+------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| :ref:`Dictionary<class_Dictionary>` | :ref:`create_diff_hunk<class_EditorVCSInterface_method_create_diff_hunk>`\ (\ old_start\: :ref:`int<class_int>`, new_start\: :ref:`int<class_int>`, old_lines\: :ref:`int<class_int>`, new_lines\: :ref:`int<class_int>`\ ) |
|
|
+------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| :ref:`Dictionary<class_Dictionary>` | :ref:`create_diff_line<class_EditorVCSInterface_method_create_diff_line>`\ (\ new_line_no\: :ref:`int<class_int>`, old_line_no\: :ref:`int<class_int>`, content\: :ref:`String<class_String>`, status\: :ref:`String<class_String>`\ ) |
|
|
+------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| :ref:`Dictionary<class_Dictionary>` | :ref:`create_status_file<class_EditorVCSInterface_method_create_status_file>`\ (\ file_path\: :ref:`String<class_String>`, change_type\: :ref:`ChangeType<enum_EditorVCSInterface_ChangeType>`, area\: :ref:`TreeArea<enum_EditorVCSInterface_TreeArea>`\ ) |
|
|
+------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| |void| | :ref:`popup_error<class_EditorVCSInterface_method_popup_error>`\ (\ msg\: :ref:`String<class_String>`\ ) |
|
|
+------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
|
.. rst-class:: classref-section-separator
|
|
|
|
----
|
|
|
|
.. rst-class:: classref-descriptions-group
|
|
|
|
Enumerazioni
|
|
------------------------
|
|
|
|
.. _enum_EditorVCSInterface_ChangeType:
|
|
|
|
.. rst-class:: classref-enumeration
|
|
|
|
enum **ChangeType**: :ref:`🔗<enum_EditorVCSInterface_ChangeType>`
|
|
|
|
.. _class_EditorVCSInterface_constant_CHANGE_TYPE_NEW:
|
|
|
|
.. rst-class:: classref-enumeration-constant
|
|
|
|
:ref:`ChangeType<enum_EditorVCSInterface_ChangeType>` **CHANGE_TYPE_NEW** = ``0``
|
|
|
|
Un nuovo file è stato aggiunto.
|
|
|
|
.. _class_EditorVCSInterface_constant_CHANGE_TYPE_MODIFIED:
|
|
|
|
.. rst-class:: classref-enumeration-constant
|
|
|
|
:ref:`ChangeType<enum_EditorVCSInterface_ChangeType>` **CHANGE_TYPE_MODIFIED** = ``1``
|
|
|
|
Un file aggiunto in precedenza è stato modificato.
|
|
|
|
.. _class_EditorVCSInterface_constant_CHANGE_TYPE_RENAMED:
|
|
|
|
.. rst-class:: classref-enumeration-constant
|
|
|
|
:ref:`ChangeType<enum_EditorVCSInterface_ChangeType>` **CHANGE_TYPE_RENAMED** = ``2``
|
|
|
|
Un file aggiunto in precedenza è stato rinominato.
|
|
|
|
.. _class_EditorVCSInterface_constant_CHANGE_TYPE_DELETED:
|
|
|
|
.. rst-class:: classref-enumeration-constant
|
|
|
|
:ref:`ChangeType<enum_EditorVCSInterface_ChangeType>` **CHANGE_TYPE_DELETED** = ``3``
|
|
|
|
Un file aggiunto in precedenza è stato eliminato.
|
|
|
|
.. _class_EditorVCSInterface_constant_CHANGE_TYPE_TYPECHANGE:
|
|
|
|
.. rst-class:: classref-enumeration-constant
|
|
|
|
:ref:`ChangeType<enum_EditorVCSInterface_ChangeType>` **CHANGE_TYPE_TYPECHANGE** = ``4``
|
|
|
|
Un file aggiunto in precedenza è stato cambiato di tipo.
|
|
|
|
.. _class_EditorVCSInterface_constant_CHANGE_TYPE_UNMERGED:
|
|
|
|
.. rst-class:: classref-enumeration-constant
|
|
|
|
:ref:`ChangeType<enum_EditorVCSInterface_ChangeType>` **CHANGE_TYPE_UNMERGED** = ``5``
|
|
|
|
Un file è stato rimasto senza fusione.
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _enum_EditorVCSInterface_TreeArea:
|
|
|
|
.. rst-class:: classref-enumeration
|
|
|
|
enum **TreeArea**: :ref:`🔗<enum_EditorVCSInterface_TreeArea>`
|
|
|
|
.. _class_EditorVCSInterface_constant_TREE_AREA_COMMIT:
|
|
|
|
.. rst-class:: classref-enumeration-constant
|
|
|
|
:ref:`TreeArea<enum_EditorVCSInterface_TreeArea>` **TREE_AREA_COMMIT** = ``0``
|
|
|
|
Un commit è stato rilevato dall'area commit.
|
|
|
|
.. _class_EditorVCSInterface_constant_TREE_AREA_STAGED:
|
|
|
|
.. rst-class:: classref-enumeration-constant
|
|
|
|
:ref:`TreeArea<enum_EditorVCSInterface_TreeArea>` **TREE_AREA_STAGED** = ``1``
|
|
|
|
Un file è stato rilevato dall'area di staging.
|
|
|
|
.. _class_EditorVCSInterface_constant_TREE_AREA_UNSTAGED:
|
|
|
|
.. rst-class:: classref-enumeration-constant
|
|
|
|
:ref:`TreeArea<enum_EditorVCSInterface_TreeArea>` **TREE_AREA_UNSTAGED** = ``2``
|
|
|
|
Un file è stato rilevato dall'area di non-staging.
|
|
|
|
.. rst-class:: classref-section-separator
|
|
|
|
----
|
|
|
|
.. rst-class:: classref-descriptions-group
|
|
|
|
Descrizioni dei metodi
|
|
--------------------------------------------
|
|
|
|
.. _class_EditorVCSInterface_private_method__checkout_branch:
|
|
|
|
.. rst-class:: classref-method
|
|
|
|
:ref:`bool<class_bool>` **_checkout_branch**\ (\ branch_name\: :ref:`String<class_String>`\ ) |virtual| |required| :ref:`🔗<class_EditorVCSInterface_private_method__checkout_branch>`
|
|
|
|
Esegue il check-out di un ramo denominato ``branch_name`` nel VCS.
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_EditorVCSInterface_private_method__commit:
|
|
|
|
.. rst-class:: classref-method
|
|
|
|
|void| **_commit**\ (\ msg\: :ref:`String<class_String>`\ ) |virtual| |required| :ref:`🔗<class_EditorVCSInterface_private_method__commit>`
|
|
|
|
Esegue il commit delle modifiche attualmente in fase di preparazione e applica il messaggio ``msg`` al commit risultante.
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_EditorVCSInterface_private_method__create_branch:
|
|
|
|
.. rst-class:: classref-method
|
|
|
|
|void| **_create_branch**\ (\ branch_name\: :ref:`String<class_String>`\ ) |virtual| |required| :ref:`🔗<class_EditorVCSInterface_private_method__create_branch>`
|
|
|
|
Crea un nuovo ramo denominato ``branch_name`` nel VCS.
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_EditorVCSInterface_private_method__create_remote:
|
|
|
|
.. rst-class:: classref-method
|
|
|
|
|void| **_create_remote**\ (\ remote_name\: :ref:`String<class_String>`, remote_url\: :ref:`String<class_String>`\ ) |virtual| |required| :ref:`🔗<class_EditorVCSInterface_private_method__create_remote>`
|
|
|
|
Crea una nuova destinazione remota con nome ``remote_name`` e la indirizza a ``remote_url``. Può essere un remoto HTTPS o SSH.
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_EditorVCSInterface_private_method__discard_file:
|
|
|
|
.. rst-class:: classref-method
|
|
|
|
|void| **_discard_file**\ (\ file_path\: :ref:`String<class_String>`\ ) |virtual| |required| :ref:`🔗<class_EditorVCSInterface_private_method__discard_file>`
|
|
|
|
Ignora le modifiche apportate a un file presente nel percorso ``file_path``.
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_EditorVCSInterface_private_method__fetch:
|
|
|
|
.. rst-class:: classref-method
|
|
|
|
|void| **_fetch**\ (\ remote\: :ref:`String<class_String>`\ ) |virtual| |required| :ref:`🔗<class_EditorVCSInterface_private_method__fetch>`
|
|
|
|
Recupera le nuove modifiche dal repository remoto denominato ``remote``, ma non scrive le modifiche nella cartella di lavoro attuale. Equivale a ``git fetch``.
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_EditorVCSInterface_private_method__get_branch_list:
|
|
|
|
.. rst-class:: classref-method
|
|
|
|
:ref:`Array<class_Array>`\[:ref:`String<class_String>`\] **_get_branch_list**\ (\ ) |virtual| |required| :ref:`🔗<class_EditorVCSInterface_private_method__get_branch_list>`
|
|
|
|
Ottiene un'istanza di un :ref:`Array<class_Array>` di :ref:`String<class_String>` contenente i nomi dei rami disponibili nel VCS.
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_EditorVCSInterface_private_method__get_current_branch_name:
|
|
|
|
.. rst-class:: classref-method
|
|
|
|
:ref:`String<class_String>` **_get_current_branch_name**\ (\ ) |virtual| |required| :ref:`🔗<class_EditorVCSInterface_private_method__get_current_branch_name>`
|
|
|
|
Ottiene il nome del ramo attuale definito nel VCS.
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_EditorVCSInterface_private_method__get_diff:
|
|
|
|
.. rst-class:: classref-method
|
|
|
|
:ref:`Array<class_Array>`\[:ref:`Dictionary<class_Dictionary>`\] **_get_diff**\ (\ identifier\: :ref:`String<class_String>`, area\: :ref:`int<class_int>`\ ) |virtual| |required| :ref:`🔗<class_EditorVCSInterface_private_method__get_diff>`
|
|
|
|
Restituisce un array di elementi :ref:`Dictionary<class_Dictionary>` (vedi :ref:`create_diff_file()<class_EditorVCSInterface_method_create_diff_file>`, :ref:`create_diff_hunk()<class_EditorVCSInterface_method_create_diff_hunk>`, :ref:`create_diff_line()<class_EditorVCSInterface_method_create_diff_line>`, :ref:`add_line_diffs_into_diff_hunk()<class_EditorVCSInterface_method_add_line_diffs_into_diff_hunk>` e :ref:`add_diff_hunks_into_diff_file()<class_EditorVCSInterface_method_add_diff_hunks_into_diff_file>`), ognuno contenente informazioni su un diff. Se ``identifier`` è un percorso file, restituisce un diff file, e se è un identificatore commit, restituisce un diff commit.
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_EditorVCSInterface_private_method__get_line_diff:
|
|
|
|
.. rst-class:: classref-method
|
|
|
|
:ref:`Array<class_Array>`\[:ref:`Dictionary<class_Dictionary>`\] **_get_line_diff**\ (\ file_path\: :ref:`String<class_String>`, text\: :ref:`String<class_String>`\ ) |virtual| |required| :ref:`🔗<class_EditorVCSInterface_private_method__get_line_diff>`
|
|
|
|
Restituisce un :ref:`Array<class_Array>` di elementi :ref:`Dictionary<class_Dictionary>` (vedi :ref:`create_diff_hunk()<class_EditorVCSInterface_method_create_diff_hunk>`), ognuno contenente una differenza di riga tra un file nel percorso ``file_path`` e il testo ``text`` che viene passato.
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_EditorVCSInterface_private_method__get_modified_files_data:
|
|
|
|
.. rst-class:: classref-method
|
|
|
|
:ref:`Array<class_Array>`\[:ref:`Dictionary<class_Dictionary>`\] **_get_modified_files_data**\ (\ ) |virtual| |required| :ref:`🔗<class_EditorVCSInterface_private_method__get_modified_files_data>`
|
|
|
|
Restituisce un :ref:`Array<class_Array>` di :ref:`Dictionary<class_Dictionary>` (vedi :ref:`create_status_file()<class_EditorVCSInterface_method_create_status_file>`), ciascuno contenente i dati di stato di ogni file modificato nella cartella del progetto.
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_EditorVCSInterface_private_method__get_previous_commits:
|
|
|
|
.. rst-class:: classref-method
|
|
|
|
:ref:`Array<class_Array>`\[:ref:`Dictionary<class_Dictionary>`\] **_get_previous_commits**\ (\ max_commits\: :ref:`int<class_int>`\ ) |virtual| |required| :ref:`🔗<class_EditorVCSInterface_private_method__get_previous_commits>`
|
|
|
|
Restituisce un :ref:`Array<class_Array>` di :ref:`Dictionary<class_Dictionary>` (vedi :ref:`create_commit()<class_EditorVCSInterface_method_create_commit>`), ciascuno contenente i dati per un commit precedente.
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_EditorVCSInterface_private_method__get_remotes:
|
|
|
|
.. rst-class:: classref-method
|
|
|
|
:ref:`Array<class_Array>`\[:ref:`String<class_String>`\] **_get_remotes**\ (\ ) |virtual| |required| :ref:`🔗<class_EditorVCSInterface_private_method__get_remotes>`
|
|
|
|
Restituisce un :ref:`Array<class_Array>` di :ref:`String<class_String>`, ciascuna contenente il nome di un repository remoto configurato nel VCS.
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_EditorVCSInterface_private_method__get_vcs_name:
|
|
|
|
.. rst-class:: classref-method
|
|
|
|
:ref:`String<class_String>` **_get_vcs_name**\ (\ ) |virtual| |required| :ref:`🔗<class_EditorVCSInterface_private_method__get_vcs_name>`
|
|
|
|
Restituisce il nome del fornitore VCS utilizzato.
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_EditorVCSInterface_private_method__initialize:
|
|
|
|
.. rst-class:: classref-method
|
|
|
|
:ref:`bool<class_bool>` **_initialize**\ (\ project_path\: :ref:`String<class_String>`\ ) |virtual| |required| :ref:`🔗<class_EditorVCSInterface_private_method__initialize>`
|
|
|
|
Inizializza l'estensione VCS quando viene chiamato dall'editor. Restituisce se l'estensione è stata inizializzata correttamente o meno. Un progetto VCS è inizializzato nel percorso ``project_path``.
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_EditorVCSInterface_private_method__pull:
|
|
|
|
.. rst-class:: classref-method
|
|
|
|
|void| **_pull**\ (\ remote\: :ref:`String<class_String>`\ ) |virtual| |required| :ref:`🔗<class_EditorVCSInterface_private_method__pull>`
|
|
|
|
Estrae le modifiche dal repository remoto. Ciò può provocare conflitti di fusione.
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_EditorVCSInterface_private_method__push:
|
|
|
|
.. rst-class:: classref-method
|
|
|
|
|void| **_push**\ (\ remote\: :ref:`String<class_String>`, force\: :ref:`bool<class_bool>`\ ) |virtual| |required| :ref:`🔗<class_EditorVCSInterface_private_method__push>`
|
|
|
|
Invia le modifiche al repository remoto denominato ``remote``. Se ``force`` è ``true``, un push force sovrascriverà la cronologia delle modifiche già presente sul repository remoto.
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_EditorVCSInterface_private_method__remove_branch:
|
|
|
|
.. rst-class:: classref-method
|
|
|
|
|void| **_remove_branch**\ (\ branch_name\: :ref:`String<class_String>`\ ) |virtual| |required| :ref:`🔗<class_EditorVCSInterface_private_method__remove_branch>`
|
|
|
|
Rimuove un ramo dal VCS locale.
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_EditorVCSInterface_private_method__remove_remote:
|
|
|
|
.. rst-class:: classref-method
|
|
|
|
|void| **_remove_remote**\ (\ remote_name\: :ref:`String<class_String>`\ ) |virtual| |required| :ref:`🔗<class_EditorVCSInterface_private_method__remove_remote>`
|
|
|
|
Rimuove un repository remoto dal VCS locale.
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_EditorVCSInterface_private_method__set_credentials:
|
|
|
|
.. rst-class:: classref-method
|
|
|
|
|void| **_set_credentials**\ (\ username\: :ref:`String<class_String>`, password\: :ref:`String<class_String>`, ssh_public_key_path\: :ref:`String<class_String>`, ssh_private_key_path\: :ref:`String<class_String>`, ssh_passphrase\: :ref:`String<class_String>`\ ) |virtual| |required| :ref:`🔗<class_EditorVCSInterface_private_method__set_credentials>`
|
|
|
|
Imposta le credenziali utente nel VCS sottostante. ``username`` e ``password`` sono utilizzati solo durante l'autenticazione HTTPS, a meno che non siano già menzionati nell'URL remoto. ``ssh_public_key_path``, ``ssh_private_key_path`` e ``ssh_passphrase`` sono utilizzati solo durante l'autenticazione SSH.
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_EditorVCSInterface_private_method__shut_down:
|
|
|
|
.. rst-class:: classref-method
|
|
|
|
:ref:`bool<class_bool>` **_shut_down**\ (\ ) |virtual| |required| :ref:`🔗<class_EditorVCSInterface_private_method__shut_down>`
|
|
|
|
Arresta l'istanza dell'estensione VCS. Chiamato quando l'utente chiude l'editor o arresta l'estensione VCS tramite l'interfaccia utente dell'editor.
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_EditorVCSInterface_private_method__stage_file:
|
|
|
|
.. rst-class:: classref-method
|
|
|
|
|void| **_stage_file**\ (\ file_path\: :ref:`String<class_String>`\ ) |virtual| |required| :ref:`🔗<class_EditorVCSInterface_private_method__stage_file>`
|
|
|
|
Esegue lo staging del file presente nel percorso ``file_path`` nell'area di staging.
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_EditorVCSInterface_private_method__unstage_file:
|
|
|
|
.. rst-class:: classref-method
|
|
|
|
|void| **_unstage_file**\ (\ file_path\: :ref:`String<class_String>`\ ) |virtual| |required| :ref:`🔗<class_EditorVCSInterface_private_method__unstage_file>`
|
|
|
|
Sposta il file presente nel percorso ``file_path`` dall'area di staging all'area di non staging.
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_EditorVCSInterface_method_add_diff_hunks_into_diff_file:
|
|
|
|
.. rst-class:: classref-method
|
|
|
|
:ref:`Dictionary<class_Dictionary>` **add_diff_hunks_into_diff_file**\ (\ diff_file\: :ref:`Dictionary<class_Dictionary>`, diff_hunks\: :ref:`Array<class_Array>`\[:ref:`Dictionary<class_Dictionary>`\]\ ) :ref:`🔗<class_EditorVCSInterface_method_add_diff_hunks_into_diff_file>`
|
|
|
|
Funzione di supporto per aggiungere un array di ``diff_hunks`` in un ``diff_file``.
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_EditorVCSInterface_method_add_line_diffs_into_diff_hunk:
|
|
|
|
.. rst-class:: classref-method
|
|
|
|
:ref:`Dictionary<class_Dictionary>` **add_line_diffs_into_diff_hunk**\ (\ diff_hunk\: :ref:`Dictionary<class_Dictionary>`, line_diffs\: :ref:`Array<class_Array>`\[:ref:`Dictionary<class_Dictionary>`\]\ ) :ref:`🔗<class_EditorVCSInterface_method_add_line_diffs_into_diff_hunk>`
|
|
|
|
Funzione di supporto per aggiungere un array di ``line_diffs`` in un ``diff_hunk``.
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_EditorVCSInterface_method_create_commit:
|
|
|
|
.. rst-class:: classref-method
|
|
|
|
:ref:`Dictionary<class_Dictionary>` **create_commit**\ (\ msg\: :ref:`String<class_String>`, author\: :ref:`String<class_String>`, id\: :ref:`String<class_String>`, unix_timestamp\: :ref:`int<class_int>`, offset_minutes\: :ref:`int<class_int>`\ ) :ref:`🔗<class_EditorVCSInterface_method_create_commit>`
|
|
|
|
Funzione di supporto per creare un elemento :ref:`Dictionary<class_Dictionary>` di commit. ``msg`` è il messaggio del commit. ``author`` è una singola stringa leggibile in chiaro contenente tutti i dettagli dell'autore, ad esempio l'email e il nome configurati nel VCS. ``id`` è l'identificativo del commit, in qualsiasi formato il tuo VCS possa fornire un identificatore ai commit. ``unix_timestamp`` è il timestamp Unix UTC di quando è stato creato il commit. ``offset_minutes`` è la compensazione del fuso orario in minuti, registrato dal fuso orario del sistema in cui è stato creato il commit.
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_EditorVCSInterface_method_create_diff_file:
|
|
|
|
.. rst-class:: classref-method
|
|
|
|
:ref:`Dictionary<class_Dictionary>` **create_diff_file**\ (\ new_file\: :ref:`String<class_String>`, old_file\: :ref:`String<class_String>`\ ) :ref:`🔗<class_EditorVCSInterface_method_create_diff_file>`
|
|
|
|
Funzione di supporto per creare un :ref:`Dictionary<class_Dictionary>` in cui memorizzare i percorsi dei file diff vecchi e nuovi.
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_EditorVCSInterface_method_create_diff_hunk:
|
|
|
|
.. rst-class:: classref-method
|
|
|
|
:ref:`Dictionary<class_Dictionary>` **create_diff_hunk**\ (\ old_start\: :ref:`int<class_int>`, new_start\: :ref:`int<class_int>`, old_lines\: :ref:`int<class_int>`, new_lines\: :ref:`int<class_int>`\ ) :ref:`🔗<class_EditorVCSInterface_method_create_diff_hunk>`
|
|
|
|
Funzione di supporto per creare un :ref:`Dictionary<class_Dictionary>` per memorizzare i dati diff hunk. ``old_start`` è il numero di riga iniziale nel vecchio file. ``new_start`` è il numero di riga iniziale nel nuovo file. ``old_lines`` è il numero di righe nel vecchio file. ``new_lines`` è il numero di righe nel nuovo file.
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_EditorVCSInterface_method_create_diff_line:
|
|
|
|
.. rst-class:: classref-method
|
|
|
|
:ref:`Dictionary<class_Dictionary>` **create_diff_line**\ (\ new_line_no\: :ref:`int<class_int>`, old_line_no\: :ref:`int<class_int>`, content\: :ref:`String<class_String>`, status\: :ref:`String<class_String>`\ ) :ref:`🔗<class_EditorVCSInterface_method_create_diff_line>`
|
|
|
|
Funzione di supporto per creare un :ref:`Dictionary<class_Dictionary>` per memorizzare una differenza di riga. ``new_line_no`` è il numero di riga nel nuovo file (può essere ``-1`` se la riga è eliminata). ``old_line_no`` è il numero di riga nel vecchio file (può essere ``-1`` se la riga è aggiunta). ``content`` è il testo della differenza. ``status`` è una stringa di caratteri singoli che memorizza l'origine della riga.
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_EditorVCSInterface_method_create_status_file:
|
|
|
|
.. rst-class:: classref-method
|
|
|
|
:ref:`Dictionary<class_Dictionary>` **create_status_file**\ (\ file_path\: :ref:`String<class_String>`, change_type\: :ref:`ChangeType<enum_EditorVCSInterface_ChangeType>`, area\: :ref:`TreeArea<enum_EditorVCSInterface_TreeArea>`\ ) :ref:`🔗<class_EditorVCSInterface_method_create_status_file>`
|
|
|
|
Funzione di supporto per creare un :ref:`Dictionary<class_Dictionary>` utilizzato dall'editor per leggere lo stato di un file.
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_EditorVCSInterface_method_popup_error:
|
|
|
|
.. rst-class:: classref-method
|
|
|
|
|void| **popup_error**\ (\ msg\: :ref:`String<class_String>`\ ) :ref:`🔗<class_EditorVCSInterface_method_popup_error>`
|
|
|
|
Fa apparire un messaggio di errore nell'editor che viene mostrato come proveniente dal VCS sottostante. Usalo per mostrare messaggi di errore specifici del VCS.
|
|
|
|
.. |virtual| replace:: :abbr:`virtual (Questo metodo dovrebbe solitamente essere sovrascritto dall'utente per aver un effetto.)`
|
|
.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)`
|
|
.. |const| replace:: :abbr:`const (Questo metodo non ha effetti collaterali. Non modifica alcuna variabile appartenente all'istanza.)`
|
|
.. |vararg| replace:: :abbr:`vararg (Questo metodo accetta qualsiasi numero di argomenti oltre a quelli descritti qui.)`
|
|
.. |constructor| replace:: :abbr:`constructor (Questo metodo è utilizzato per creare un tipo.)`
|
|
.. |static| replace:: :abbr:`static (Questo metodo non necessita di alcun'istanza per essere chiamato, quindi può essere chiamato direttamente usando il nome della classe.)`
|
|
.. |operator| replace:: :abbr:`operator (Questo metodo descrive un operatore valido da usare con questo tipo come operando di sinistra.)`
|
|
.. |bitfield| replace:: :abbr:`BitField (Questo valore è un intero composto da una maschera di bit dei seguenti flag.)`
|
|
.. |void| replace:: :abbr:`void (Nessun valore restituito.)`
|