[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Thanks exactly what I wanted. Thanks!
On Mon, Nov 29, 2010 at 12:50 PM, Alex Panchenko <alex@xxxxxxxxx> wrote:
> Hello,
>
> I think the question is about
> org.eclipse.dltk.javascript.internal.ui.text.JavascriptSourceViewerConfiguration.getDoubleClickStrategy(ISourceViewer, String)
>
> return new DefaultTextDoubleClickStrategy() {
> @Override
> protected IRegion findExtendedDoubleClickSelection(IDocument document, int offset) {
> ...
> // fall back on just words
> int i = offset;
> while (Character.isJavaIdentifierPart(text.charAt(i--))) {
> if (i == -1) {
> break;
> }
> }
> start = i + 2;
> i = offset;
> while (Character.isJavaIdentifierPart(text.charAt(i++))) {
> if (i == text.length()) {
> break;
> }
> }
> end = i - 1;
> return new Region(start, end - start);
> }
>
>
> Regards,
> Alex
>
> ----- Original Message -----
> From: "Johan Compagner" <jcompagner@xxxxxxxxx>
> To: "DLTK Developer Discussions" <dltk-dev@xxxxxxxxxxx>
> Sent: Monday, November 29, 2010 10:07:09 PM GMT +06:00 Almaty, Novosibirsk
> Subject: Re: [Dltk-dev] selection
>
> that is specific to the implementation and name/source range settings
> of the IModelElements where the outline view is build on.
>
> Javascript implementation of the dltk doesnt do what you describe for example.
> It really selects def.
>
>
> On Mon, Nov 29, 2010 at 16:18, Matthew Newhook <matthew@xxxxxxxxxxx> wrote:
>> I want editor selection to act more like the Java editor. That is if I
>> have "abc.def" and double click on "def" then I want def to be
>> selected not abc.def. I notice that the ruby plugin also selects
>> "abc.def" so perhaps this isn't a DLTK thing at all? Any hints?
>>
>> Best regards, Matthew
>> --
>> Matthew Newhook
>> Bit Trap Studios, Inc.
>>
>> Please note that the contents of this message are not for publication
>> or distribution in any manner, either full or partial, unless
>> specifically stated.
>> _______________________________________________
>> dltk-dev mailing list
>> dltk-dev@xxxxxxxxxxx
>> https://dev.eclipse.org/mailman/listinfo/dltk-dev
>>
> _______________________________________________
> dltk-dev mailing list
> dltk-dev@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/dltk-dev
> _______________________________________________
> dltk-dev mailing list
> dltk-dev@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/dltk-dev
>
--
Matthew Newhook
Bit Trap Studios, Inc.
Please note that the contents of this message are not for publication
or distribution in any manner, either full or partial, unless
specifically stated.