Foundry.RenameProvider

g Foundry.Contextual Foundry.Contextual Foundry.RenameProvider Foundry.RenameProvider Foundry.Contextual->Foundry.RenameProvider GObject.GInterface GObject.GInterface Json.Serializable Json.Serializable GObject.GInterface->Json.Serializable GObject.Object GObject.Object GObject.Object->Foundry.Contextual Json.Serializable->Foundry.Contextual

Subclasses:

None

Methods

Inherited:

Foundry.Contextual (4), GObject.Object (37), Json.Serializable (8)

Structs:

GObject.ObjectClass (5)

dup_buffer ()

dup_document ()

rename (iter, new_name)

Virtual Methods

Inherited:

GObject.Object (7), Json.Serializable (5)

do_rename (iter, new_name)

Properties

Inherited:

Foundry.Contextual (1)

Name

Type

Flags

Short Description

buffer

Foundry.TextBuffer

r/w/co

document

Foundry.TextDocument

r/w/co

Signals

Inherited:

GObject.Object (1)

Fields

Inherited:

GObject.Object (1)

Name

Type

Access

Description

parent_instance

Foundry.Contextual

r

Class Details

class Foundry.RenameProvider(**kwargs)
Bases:

Foundry.Contextual

Abstract:

Yes

Structure:

Foundry.RenameProviderClass

dup_buffer()
Return type:

Foundry.TextBuffer or None

dup_document()
Return type:

Foundry.TextDocument

rename(iter, new_name)
Parameters:
  • iter (Foundry.TextIter) – the location of the item to semantically rename

  • new_name (str) – the replacement name

Returns:

a [class`Dex`.Future] that resolves to a [iface`Gio`.ListModel] of [class`Foundry`.TextEdit].

Return type:

Dex.Future

Determines the list of changes that need to be made to the code-base to rename the word found at iter.

A consuming interface should display these edits to the user for validation and approval before applying them using [method`Foundry`.TextManager.apply_edits] to apply the approved edits.

do_rename(iter, new_name) virtual
Parameters:
  • iter (Foundry.TextIter) – the location of the item to semantically rename

  • new_name (str) – the replacement name

Returns:

a [class`Dex`.Future] that resolves to a [iface`Gio`.ListModel] of [class`Foundry`.TextEdit].

Return type:

Dex.Future

Determines the list of changes that need to be made to the code-base to rename the word found at iter.

A consuming interface should display these edits to the user for validation and approval before applying them using [method`Foundry`.TextManager.apply_edits] to apply the approved edits.

Property Details

Foundry.RenameProvider.props.buffer
Name:

buffer

Type:

Foundry.TextBuffer

Default Value:

None

Flags:

READABLE, WRITABLE, CONSTRUCT_ONLY

Foundry.RenameProvider.props.document
Name:

document

Type:

Foundry.TextDocument

Default Value:

None

Flags:

READABLE, WRITABLE, CONSTRUCT_ONLY