Sv: [PATCH] JMC-6484 "Recent Files" sub-menu not populated on startup

Marcus Hirt marcus at
Sat May 25 00:02:33 UTC 2019

Hi there!

There seem to be other users of that class that use the 
default constructor presumably because they do not want 
to persist their opening of files, such as trigger
actions. One could argue that maybe they should end up 
in the recently opened list too, but I believe this is 
at least the reason for the current behavior.

A slightly more defensive solution could be to instead:

diff -r 4c9efa5eb5b8 application/org.openjdk.jmc.rcp.application/src/main/java/org/openjdk/jmc/rcp/application/actions/
--- a/application/org.openjdk.jmc.rcp.application/src/main/java/org/openjdk/jmc/rcp/application/actions/     Fri May 24 13:05:05 2019 +0200
+++ b/application/org.openjdk.jmc.rcp.application/src/main/java/org/openjdk/jmc/rcp/application/actions/     Sat May 25 01:59:12 2019 +0200
@@ -161,7 +161,7 @@
                        for (String name : names) {
                                final File file = new File(filterPath + File.separator + name);
                                if (file.exists()) {
-                                       WorkbenchToolkit.openEditor(inWindow, new MCPathEditorInput(file));
+                                       WorkbenchToolkit.openEditor(inWindow, new MCPathEditorInput(file, true));
                                } else {
                                        if (++numberOfFilesNotFound > 1) {

Kind regards,

-----Ursprungligt meddelande-----
Från: jmc-dev <jmc-dev-bounces at> För Kangcheng Xu
Skickat: den 22 maj 2019 17:09
Till: jmc-dev at
Ämne: [PATCH] JMC-6484 "Recent Files" sub-menu not populated on startup


This patch fixes JMC-6484 "Recent Files" sub-menu not populated on startup [0]. It is a simple fix and only one line is changed to mark MCPathEditorInput persistable, and therefore, is written to persistent storage by a memento.

Please see the attached patch. Thank you very much!


More information about the jmc-dev mailing list