[PATCH] JMC-6484 "Recent Files" sub-menu not populated on startup
Kangcheng Xu
kxu at redhat.com
Wed Jun 26 14:04:09 UTC 2019
Hello,
This is the updated patch, and I've verified it doesn't cause
conflicts with recent changes.
Please see the attachment below. Thanks!
Arvin Xu
On Fri, 21 Jun 2019 at 10:00, Kangcheng Xu <kxu at redhat.com> wrote:
>
> ---------- Forwarded message ---------
> From: Kangcheng Xu <kxu at redhat.com>
> Date: Tue, May 28, 2019 at 2:47 PM
> Subject: Re: [PATCH] JMC-6484 "Recent Files" sub-menu not populated on startup
> To: Marcus Hirt <marcus at hirt.se>
>
>
> Hi,
>
> This is updated to change all JMC callers of MCPathEditorInput(File)
> to use the alternative constructor as requested.
>
> Arvin Kangcheng Xu
>
> On Fri, May 24, 2019 at 9:18 PM Kangcheng Xu <kxu at redhat.com> wrote:
> >
> > Hello,
> >
> > On Fri, May 24, 2019 at 8:12 PM Marcus Hirt <marcus at hirt.se> wrote:
> > >
> > > 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.
> >
> > Yes, I agree with you. Sorry I didn't realize this earlier.
> >
> > > 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/OpenFileAction.java
> > > --- a/application/org.openjdk.jmc.rcp.application/src/main/java/org/openjdk/jmc/rcp/application/actions/OpenFileAction.java Fri May 24 13:05:05 2019 +0200
> > > +++ b/application/org.openjdk.jmc.rcp.application/src/main/java/org/openjdk/jmc/rcp/application/actions/OpenFileAction.java 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) {
> > > notFound.append('\n');
> >
> > A modified patch file is attached. Additionally,
> > `MCPathEditorInput(File)' constructor is now marked deprecated.
> >
> > > Kind regards,
> > > Marcus
> >
> > Thanks very much for the advice!
> >
> > Arvin Kangcheng Xu
-------------- next part --------------
A non-text attachment was scrubbed...
Name: jmc-6484.patch
Type: text/x-patch
Size: 11217 bytes
Desc: not available
URL: <https://mail.openjdk.java.net/pipermail/jmc-dev/attachments/20190626/1810e3bb/jmc-6484.patch>
More information about the jmc-dev
mailing list