[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: [TSVN] Autocompletion list in the commit dialog

From: SteveKing <steveking_at_gmx.ch>
Date: 2005-02-16 22:10:08 CET

Eric J. Smith wrote:
>>There's a function 'split()' which does:
>>"Use the split() method when you have a string that you want to split
>>into substrings, using a regular expression as a delimiter."
>>
>>I guess that's what you mean?
>
>
> No, that will take the entire regex pattern and use that to split the
> contents of the entire file. When you look at this content and regex
> pattern:
>
> Content: "public class MyClass() {"
> Pattern: "class\s+(\w+)"
>
> What the regex engine will do is find "class" and begin matching. It will
> then find the rest of the match and return "class MyClass" as a single
> match.
>
> Now, in our regex we use parens to cause the regex to create groups inside
> of that single match. So in our sample case, our entire match is "class
> MyClass" which is normally referred to as group 0, but then there will also
> be additional groups from that single match because we used parens for
> grouping. So in this case, there should be a group 1 that contains only
> "MyClass". This is what we are trying to get to so that we can add that to
> the auto-completion list.
>
> In GRETA, it looks like what you are looking for is the cgroups and
> cbackrefs members. Take a look at this post:
>
> http://www.php-resource.de/forum/showthread/t-14567.html
>
> This seems to be exactly what you need. They appear to be taking a match
> and outputting the match and then also outputting the groups within that
> match.

So how should we decide which one(s) to use then? I mean the group 0
always returns the entire match, not the groups within (and that's
sometimes what people want with the regex string). Is there any
indication in the string itself what should be used?

Maybe we should still add another option to the autolist.txt file. One
that tells TSVN to use either the whole match or the individual groups.

Stefan

-- 
        ___
   oo  // \\      "De Chelonian Mobile"
  (_,\/ \_/ \     TortoiseSVN
    \ \_/_\_/>    The coolest Interface to (Sub)Version Control
    /_/   \_\     http://tortoisesvn.tigris.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tortoisesvn.tigris.org
For additional commands, e-mail: dev-help@tortoisesvn.tigris.org
Received on Wed Feb 16 22:11:08 2005

This is an archived mail posted to the TortoiseSVN Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.