How to recieve a message or intercept the message when user open a file in frontend

Hello, through previous explorations I know that when user cilck a file in the File Explorer, the frontend will call the “open” method in the class EditorManager, if want to do something(for example, re-download the file) between the click opration and open operation, which means I need to receive a message in code write by myself from Theia at the same time Theia call the open method when user open a file.
Since the EditorManger class is a part of the @theia/core, it seems it’s impossible to modify the source code to implement such function, what should I do?
Is it possible to copy the EditorManager class by myself and rename it , then modify the open fucntion in the class. After that unbind the default EditorManager, replace it to the modified EditorManager?

Is it possible to copy the EditorManager class by myself and rename it , then modify the open function in the class. After that unbind the default EditorManager, replace it to the modified EditorManager?

The framework allows for such customizations already, a downstream extension can modify the behavior or extend the behavior of any component, and change the default implementation. The framework uses dependency injection (DI) to achieve this goal (https://github.com/inversify/InversifyJS).

For example, you can extend the EditorManager in a custom extension, and rebind the default implementation to your new implementation. I have an example here:

OK, Thank you for your help~