Page 1 of 1

Periodic refresh / reload of DITA Maps during background downloads – validation errors remain until manual F5

Posted: Mon Feb 09, 2026 8:20 pm
by KevinGarcia99
Hello Oxygen team,

I’m working on an Oxygen plugin that downloads a large number of DITA resources (topics, maps, .met files) into the local project incrementally, while a root DITA map is already open in the editor.

Problem -
Even though:
  • all referenced files eventually exist locally,
  • .met files are created,
  • file actions become enabled (check-in / checkout),
  • references actually resolve correctly on disk,
the editor still shows red validation errors in the DITA map and referenced topics.

Those errors disappear only after the user manually presses
File → Reload (F5).

During downloads, I experimented with several refresh approaches:
  • PluginWorkspace.refreshInProject(...)
  • WSDITAMapEditorPage.refreshReferences()
  • Closing and reopening editors
  • Invoking the global File/Reload action programmatically
I want to know if Oxygen provides a lighter, supported API for refreshing validation and references incrementally for DITA Maps Manager.

Thank you

Re: Periodic refresh / reload of DITA Maps during background downloads – validation errors remain until manual F5

Posted: Tue Feb 10, 2026 9:04 am
by Radu
Hi,

We do not have a lightweight approach to go about this.
Did the "WSDITAMapEditorPage.refreshReferences()" work for you? If not then indeed you can try re-opening the file or use "ro.sync.exml.workspace.api.editor.WSEditor.reload()".

Regards,
Radu

Re: Periodic refresh / reload of DITA Maps during background downloads – validation errors remain until manual F5

Posted: Tue Feb 10, 2026 4:08 pm
by KevinGarcia99
Hey,

Thank you, Radu, for your response on this.
I did try using refreshReferences(), but it doesn't work. Same goes for editor.reload().
Please let me know if we have other options for reload.

Thanks

Re: Periodic refresh / reload of DITA Maps during background downloads – validation errors remain until manual F5

Posted: Wed Feb 11, 2026 5:31 pm
by Radu
Hi Kevin,

The editor.reload works for me, here's some code from the sample Oxygen plugin I implemented:

Code: Select all

 @Override
    public void applicationStarted(StandalonePluginWorkspace pluginWorkspaceAccess) {
      pluginWorkspaceAccess.addMenuBarCustomizer(new MenuBarCustomizer() {
        
        @Override
        public void customizeMainMenu(JMenuBar mainMenu) {
          JMenu test = new JMenu("Test");
          test.add(new AbstractAction("Refresh DMM") {
            @Override
            public void actionPerformed(ActionEvent e) {
             WSEditor currentDMMEditor = pluginWorkspaceAccess.getCurrentEditorAccess(PluginWorkspace.DITA_MAPS_EDITING_AREA);
             currentDMMEditor.reload();
            }
          });
          mainMenu.add(test);
        }
      });
    }
I tested and using instead of the "currentDMMEditor.reload();" API above the code:

Code: Select all

WSDITAMapEditorPage dmm = (WSDITAMapEditorPage) currentDMMEditor.getCurrentPage();
             dmm.refreshReferences();
also works for me.

Here's how I test:
1) I have in the DITA Maps Manager a sample DITA Map opened with some topic references.
2) In the Finder/Windows Explorer I rename one of the referenced topics.
3) Back in Oxygen I press F5 in the DITA Maps Manager and it starts reporting the error.
4) I rename in the Finder/Windows Explorer the topic back to its original name.
5) Back in Oxygen I call the menu item that I added an the reference refreshes and the error is no longer present.

Regards,
Radu