I have created my custom dom file editor and i want to show popup menu, where i would have also Undo and Redo JMenuItems. I want in this items to perform Undo - firstly get UndoManager, where i need project instance argument and then call undo on the manager, where i need my editor instance. Is there some easy way to get my editor instance from my dom components, or do i have to pass editor instance to all my dom components? I want to have different JMenuItems in different dom components, that is why i need active editor in all components. Thanks.