From: Tom Tromey <tromey@redhat.com>
To: gdb-patches@sourceware.org
Subject: Re: [RFA] Patch to limit field name completion candidates
Date: Fri, 06 Jun 2008 00:49:00 -0000 [thread overview]
Message-ID: <m3mylzbd6o.fsf@fleche.redhat.com> (raw)
In-Reply-To: <20080605200807.GJ25085@caradoc.them.org> (Daniel Jacobowitz's message of "Thu\, 5 Jun 2008 16\:08\:07 -0400")
>>>>> "Daniel" == Daniel Jacobowitz <drow@false.org> writes:
>> In that case, nothing will call mark_struct_expression, and so the
>> completion machinery will not attempt field name completion.
Daniel> Right. But this would appear to be a bug from the user's point of
Daniel> view. We'll just call it a hypothetical limitation of the
Daniel> implementation :-)
Ah, yeah, I see what you mean: there can definitely be losing cases.
For instance if you try to complete "nonexistingThing->", you'll just
get all the symbols again.
I'm not sure what to do here... I guess we could try to get completion
to print an error to the user. This could affect only the situation
where we thought we could complete a field name based on the syntax,
but then failed during "semantic analysis". (I don't know offhand if
readline can do this for us or not.)
Another thing not accounted for in this implementation is that for
some languages you may want to complete more things. For instance,
this would have to be expanded to work properly for Java, because in
Java you can have a type name, a field name, or method name after ".".
I think this isn't a big problem; the current code is, IMO, a decent
step in that direction.
Tom
next prev parent reply other threads:[~2008-06-06 0:49 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-05-13 17:01 Tom Tromey
2008-05-13 18:11 ` Eli Zaretskii
2008-05-13 18:20 ` Tom Tromey
2008-05-13 18:32 ` Daniel Jacobowitz
2008-05-13 18:36 ` Tom Tromey
2008-05-13 21:00 ` Eli Zaretskii
2008-05-13 20:52 ` Eli Zaretskii
2008-06-05 17:10 ` Daniel Jacobowitz
2008-06-05 19:21 ` Tom Tromey
2008-06-05 19:30 ` Eli Zaretskii
2008-06-05 20:02 ` Tom Tromey
2008-06-06 9:47 ` Eli Zaretskii
2008-06-05 19:46 ` Daniel Jacobowitz
2008-06-05 20:03 ` Tom Tromey
2008-06-05 20:08 ` Daniel Jacobowitz
2008-06-06 0:49 ` Tom Tromey [this message]
2008-06-06 2:32 ` Daniel Jacobowitz
2008-06-06 2:41 ` Tom Tromey
2008-06-06 10:28 ` Eli Zaretskii
2008-06-06 17:50 ` Tom Tromey
2008-06-06 19:46 ` Eli Zaretskii
2008-06-06 19:54 ` Daniel Jacobowitz
2008-06-05 20:50 ` Tom Tromey
2008-06-06 10:13 ` Eli Zaretskii
2008-06-06 10:53 ` Eli Zaretskii
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=m3mylzbd6o.fsf@fleche.redhat.com \
--to=tromey@redhat.com \
--cc=gdb-patches@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox