Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [Dltk-dev] selection engine implementation


  ok - i'm confused again :)

  first, i don't understand the difference between inclusive and exclusive or does that explain why i can have an offset of 12 and i of 11 if i position the cursor at the end of the statement (well, before the semi-colon), such as in this contrived case:

    Test::Sample;

  where the statement starts at column position 0.

  i also don't understand why i get varying values depending on where i click in the the statement.

  using the same example above, if i position the cursor right after the 2nd colon and before the 'S', i get these values:

    offset = 5, i = 4
 
  if i position the cursor after the 'S', the values change to this:

    offset = 6, i = 11

  and if i put the cursor after the 't' and before the 1st colon, i get this:

    offset = 0, i = 3

  so, i'm guessing that some how the colons are acting as some sort of delimiter in the region selection process. but i still don't understand how it's arriving at those values. also - is that really the behavior i want or is it possible to tell whatever is calculating those values to include the delimiter in the calculation - ie: in the 2nd example above, if i position the cursor at the 'S', the offset would start a 0.

  also, is there a way to cache these results? the same code path gets executed twice for the documentation and source hovers (and potentially more if you have them).

On Wed, Apr 18, 2012 at 8:46 AM, Johan Compagner <jcompagner@xxxxxxxxx> wrote:
i find that inclusive/exclusive also annoying
Better i my eyes is start, length

that is never confusing..



On Wed, Apr 18, 2012 at 14:42, Alexey Panchenko <alex.panchenko@xxxxxxxxx> wrote:
Not sure if -1 makes sense or not, I prefer ending position to be
exclusive, but some parts of JDT have it inclusive.


_______________________________________________
dltk-dev mailing list
dltk-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/dltk-dev




--
-jae

Back to the top