[PATCH] JMC-6484 "Recent Files" sub-menu not populated on startup
Alex Macdonald
almacdon at redhat.com
Thu Jun 27 18:25:59 UTC 2019
On Thu, Jun 27, 2019 at 10:08 AM Kangcheng Xu <kxu at redhat.com> wrote:
> Sorry for the typo. The attachment is updated with correct spelling.
>
Great, thanks for the updated patch! This looks good to me.
I can sponsor this change and will push shortly.
Cheers,
Alex
> Thanks!
> Arvin
>
> On Wed, 26 Jun 2019 at 12:47, Marcus Hirt <marcus at hirt.se> wrote:
> >
> > Looks good!
> >
> > (The summary has a small spelling error:
> > Summary: Marked MCPathEditorInput(File) constructor -->depreacated<--.)
> >
> > Kind regards,
> > Marcus
> >
> > -----Ursprungligt meddelande-----
> > Från: jmc-dev <jmc-dev-bounces at openjdk.java.net> För Kangcheng Xu
> > Skickat: den 26 juni 2019 16:04
> > Till: Alex Macdonald <almacdon at redhat.com>
> > Kopia: jmc-dev at openjdk.java.net
> > Ämne: Re: [PATCH] JMC-6484 "Recent Files" sub-menu not populated on
> startup
> >
> > 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
> >
>
More information about the jmc-dev
mailing list