Skip to content

feat: access resources in the BytecodePatch #333

@Tahgolov

Description

@Tahgolov

Feature description

At the moment, there is no way to access resources in BytecodePatch directly, which can be limiting when creating patches. To access them, you need to create a separate ResourcePatch and cache the necessary data, in other words, this's workaround. I propose two ideas: create a new type of "combined" patches with their own context that can access resources and edit bytecode, or add the corresponding functionality to BytecodeContext.

Motivation

When I made the BytecodePatch, I encountered a problem that I could only find the required method by the id of resource, which had a constant name. I had to write a separate patch to cache resource information and get the id. It was very inconvenient. Also, in theory, you can add a new function search - search by id, similar to searching by numbers in MT Manager. In addition, you can change the ids in the code to your own for resources such as layouts, strings, etc.

Acknowledgements

  • I have checked all open and closed feature requests and this is not a duplicate.
  • I have chosen an appropriate title.
  • All requested information has been provided properly.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Feature requestRequesting a new feature that's not implemented yet

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions