Hi,

I think trying to figure out if the user is typing a protocol name could be
easier since protocol name can only comes either at the beginning of the
display filter or after logical Operation.

Display Filter syntax:
[Protocol].[String1].[String2] [Comparison operator] [Value] [Logical
Operations] [Other expression]

So you could check whether the string you are trying to auto-complete is a
protocol name or not by checking if the protocol name is preceded by logical
operation or located at the beginning of the display filter.
and of course, parentheses should be taken into account.


- Bahaa


On Fri, Oct 24, 2008 at 10:37 PM, Stig Bjørlykke <[EMAIL PROTECTED]> wrote:

> Hi.
>
> I have just committed a patch which enables autocomplete and
> autocompletion list of protocol names in the filter entry.  But this
> has some side effects, because it currently also autocompletes
> operators (when typing "and" or "or") and values (typing something
> like "ip.tos.precedence > 3" will popup "3comxns").
>
> I don't know how to fix this yet, but I leave the code in so more
> people can try the feature and maybe fix this issue?  I guess we could
> try figure out if the user is typing an operator or a value.
>
> Or maybe just add a preference value (turn on/off) and document this
> behavior?
>
> --
> Stig Bjørlykke
> _______________________________________________
> Wireshark-dev mailing list
> [email protected]
> https://wireshark.org/mailman/listinfo/wireshark-dev
>
_______________________________________________
Wireshark-dev mailing list
[email protected]
https://wireshark.org/mailman/listinfo/wireshark-dev

Reply via email to