FileChange
Object Hierarchy:
Description:
public class FileChange : Object
Represents a single edit operation with range and replacement.
Line numbers are 1-based (inclusive start, exclusive end).
Content:
Properties:
- public string ast_path { get; set; }
AST path for this change (empty string when using line numbers).
- public bool completed { get; }
Indicates whether AST path resolution and application result have been
determined for this change.
- public int end { get; set; }
Ending line number (1-based, exclusive).
- public File? file { get; construct; }
The file this change applies to.
- public bool has_error { get; }
Indicates whether this change represents a parse/format error.
- public bool include_comments { get; set; }
Whether to include preceding comments when resolving AST path.
- public OperationType operation_type { get; set; }
Operation type for this change.
- public string replacement { get; set; }
Replacement text to insert at the specified range.
- public string result { get; set; }
Result message for this change.
- public int start { get; set; }
Starting line number (1-based, inclusive).
Creation methods:
Methods:
- public void add_linebreak (bool is_closing)
Add a linebreak to the replacement text.
- public async void apply_change (bool write_complete_file)
Apply this change to the file buffer.
- public string get_description ()
Returns a human-readable description of this change.
- public string get_ui_label ()
Returns the UI label for this change.
- public void normalize_indentation (string base_indent)
Normalize indentation of replacement text based on base indentation.
- public async void resolve_ast_path ()
Resolve AST path to line range.
Inherited Members:
All known members inherited from class GLib.Object
- @get
- @new
- @ref
- @set
- add_toggle_ref
- add_weak_pointer
- bind_property
- connect
- constructed
- disconnect
- dispose
- dup_data
- dup_qdata
- force_floating
- freeze_notify
- get_class
- get_data
- get_property
- get_qdata
- get_type
- getv
- interface_find_property
- interface_install_property
- interface_list_properties
- is_floating
- new_valist
- new_with_properties
- newv
- notify
- notify_property
- ref_count
- ref_sink
- remove_toggle_ref
- remove_weak_pointer
- replace_data
- replace_qdata
- set_data
- set_data_full
- set_property
- set_qdata
- set_qdata_full
- set_valist
- setv
- steal_data
- steal_qdata
- thaw_notify
- unref
- watch_closure
- weak_ref
- weak_unref