Community
Participate
Working Groups
Problem described in bug #58098 is not fixed for Linux/GTK - regardless of the setting of 'Preferences > Java > Editor > Navigation > [x] Smart caret positioning in Java names (...)" cursor is always positioned before of each part of JAVA_CONSTANT_NAMES. Bug #58098 was marked as fixed because I'm told that problem mentioned there is solved on other platforms and I was asked to file separate bug for GTK only. So, what I (as a user) think is wrong is that it's impossible to TURN OFF smart cursor positioning in JAVA_CONSTANT_NAMES on Linux/GTK. Desired behavior is that when moving with Ctrl+Left/Right cursor is positioned at the begin and the end of JAVA_CONSTANT_NAME - nowhere inside it.
OK - I now understand what you mean. We currently offer the following: - option off: you get platform behavior (stops at non-word chars like _) - option on: you get smarter behavior where it stops at every word char start and at word beginnigs inside composed identifiers What you are asking for / expecting is to have another option which does not stop at non-word chars inside Java identifiers.
We should also improve the preference naming to better state that this affects the word navigation commands.
+1. The option could be called "Smart word breaks (overrides platform behavior)" with a sub-option "Word breaks inside identifiers".
*** Bug 68454 has been marked as a duplicate of this bug. ***
*** Bug 67945 has been marked as a duplicate of this bug. ***
*** Bug 107246 has been marked as a duplicate of this bug. ***
*** Bug 107500 has been marked as a duplicate of this bug. ***
*** Bug 367077 has been marked as a duplicate of this bug. ***
Max (reporter of this bug) mentions Linux/GTK specific issues in the beginning ("it's impossible to TURN OFF smart cursor positioning in JAVA_CONSTANT_NAMES on Linux/GTK"). Dani then mentions the issue that I'm after: Eclipse should support proper navigation with both CamelCase and underscore_naming in Java identifiers. Currently (in Indigo and Helios) you have to choose either: * Platform which works OK with underscore_naming. * Java specific, which works perfect with camelCase but not at all with underscore_naming, except for CONSTANT_NAME_IDENTIFIERS. I would prefer support for both camelCaseForProductionCode and test_method_names_that_describe_quite_a_lot_using_underscores_to_help_reading. Is this what this bug report is about?
> I would prefer support for both camelCaseForProductionCode and > test_method_names_that_describe_quite_a_lot_using_underscores_to_help_reading. > Is this what this bug report is about? Yes.
Is there any update to this? I would definitely appreciate this feature as it is common in most editors.
Any update here? Would be very appreciated to have underscore navigation combined with camel case navigation.
I have a patch for this: https://git.eclipse.org/r/#/c/80170/ Could someone review it?
This would be a very nice enhancements. Noopur can you review this for M2?
(In reply to Nanda Firdausi from comment #13) > I have a patch for this: https://git.eclipse.org/r/#/c/80170/ > > Could someone review it? This patch does not implement the behavior and the new option as mentioned in comment #1 and comment#3. It just provides the fix for comment #9. But the original problem from comment#0 is not fixed. Also, note that this is a common bug for improving Java word navigation and should fix all the problems reported in duplicate bugs as well like bug 67945, bug 107246 etc.
(In reply to Noopur Gupta from comment #15) > (In reply to Nanda Firdausi from comment #13) > > I have a patch for this: https://git.eclipse.org/r/#/c/80170/ > > > > Could someone review it? > > This patch does not implement the behavior and the new option as mentioned > in comment #1 and comment#3. > > It just provides the fix for comment #9. But the original problem from > comment#0 is not fixed. Sure, I won't mark the bug fixed if I manage to submit the patch. But I think the patch is good as is, right? > > Also, note that this is a common bug for improving Java word navigation and > should fix all the problems reported in duplicate bugs as well like bug > 67945, bug 107246 etc.
(In reply to Nanda Firdausi from comment #16) > > This patch does not implement the behavior and the new option as mentioned > > in comment #1 and comment#3. > > > > It just provides the fix for comment #9. But the original problem from > > comment#0 is not fixed. > > Sure, I won't mark the bug fixed if I manage to submit the patch. But I > think the patch is good as is, right? > > > > Also, note that this is a common bug for improving Java word navigation and > > should fix all the problems reported in duplicate bugs as well like bug > > 67945, bug 107246 etc. I just used the patch to have a look at the functionality currently without looking into the code. It should add the new option and work correctly for all the reported problems first.
(In reply to Noopur Gupta from comment #17) > I just used the patch to have a look at the functionality currently without > looking into the code. It should add the new option and work correctly for > all the reported problems first. It is hard for new contributors to fix "aggregator" bugs. Maybe https://bugs.eclipse.org/bugs/show_bug.cgi?id=67381#c9 could be split out into a bug on which this bugs depend. I think it is a pretty isolated requirement and I do not see why this cannot not be fixed in isolation.
> It is hard for new contributors to fix "aggregator" bugs. Maybe > https://bugs.eclipse.org/bugs/show_bug.cgi?id=67381#c9 could be split out > into a bug on which this bugs depend. I think it is a pretty isolated > requirement and I do not see why this cannot not be fixed in isolation. Yes, I don't know if there is any policy for contributor to always reference a bug for a patch and to always fix a bug as a whole in one patch. If yes, then I'll create a new bug for my patch.
At least all the underscore related issues should be fixed at the same time. This would also require the new option from comment #3. Other duplicate bugs like bug 67945 can be reopened to be fixed separately after this one is fixed for the underscore issues.