tanqidong1992 / protobuf-dt

Automatically exported from code.google.com/p/protobuf-dt
0 stars 0 forks source link

Ctrl+Left and Ctrl+Right keys should stop at underscore #100

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
When using the Ctrl+Left and Ctrl+Right key combinations to move left and right 
by words, identifiers with underscores should be treated as multiple words as 
they are elsewhere in Eclipse.

For example, if the cursor is at the beginning of the identifier:

  optional string my_long_identifier_name = 2;
                  ^
Pressing Ctrl+Right, should move here:

  optional string my_long_identifier_name = 2;
                     ^
Not here:

  optional string my_long_identifier_name = 2;
                                          ^

Currently, this works if the letter after the underscore is upper case. It also 
currently works for camel case identifiers. Just not for lower case.

Original issue reported on code.google.com by b...@eater.net on 22 Aug 2011 at 2:38

GoogleCodeExporter commented 9 years ago

Original comment by alr...@google.com on 23 Aug 2011 at 5:58

GoogleCodeExporter commented 9 years ago
Investigation Information:

The navigation controls are created (not Injected) by the XTextEditor - which 
is not sub-typed for protobuf-dt by the XText API.

The relevant location of the word navigation creation is at
org.eclipse.xtext.ui.editor.XtextEditor.createWordIterator()

    protected CommonWordIterator createWordIterator() {
        return new CommonWordIterator(true);
    }

Where "CommonWordIterator(true)" creates a Camel-case style word iterator for 
navigation.

I reiterate, there are no dependency injection points available to override 
this behavior at any level that I can find.

In order to override this behavior, the XTextEditor class would need to be 
overridden or modified by reflection at an appropriate time.

The amount of work required for this fix is prohibitive and will be difficult 
to maintain.  The best place to address this issue is with the TMF/XText team 
and issue tracker rather than the protobuf-dt tracker.

If this issue is important to you I recommend submitting it to TMF/XText - link 
to bug tracker available from http://www.eclipse.org/Xtext/#support

I recommend that we close / reject this issue here.

Original comment by compuwar...@gmail.com on 30 Sep 2011 at 6:34

GoogleCodeExporter commented 9 years ago

Original comment by alr...@google.com on 12 Oct 2011 at 6:06

GoogleCodeExporter commented 9 years ago

Original comment by alr...@google.com on 18 Oct 2011 at 7:57

GoogleCodeExporter commented 9 years ago

Original comment by alr...@google.com on 3 Nov 2011 at 1:06

GoogleCodeExporter commented 9 years ago
Eclipse' navigation/caret positioning: 
https://bugs.eclipse.org/bugs/show_bug.cgi?id=67381

Original comment by cfl.we...@gmail.com on 23 Dec 2011 at 1:52

GoogleCodeExporter commented 9 years ago

Original comment by alr...@google.com on 13 Jan 2012 at 3:23

GoogleCodeExporter commented 9 years ago

Original comment by alr...@google.com on 21 Oct 2012 at 9:12