| Summary: | [quick fix] multi quick fix does not work when proposal list has focus | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [Eclipse Project] JDT | Reporter: | Frederic Fusier <frederic_fusier> | ||||
| Component: | UI | Assignee: | JDT-UI-Inbox <jdt-ui-inbox> | ||||
| Status: | CLOSED WONTFIX | QA Contact: | |||||
| Severity: | normal | ||||||
| Priority: | P3 | CC: | daniel_megert, markus.kell.r | ||||
| Version: | 3.5 | ||||||
| Target Milestone: | --- | ||||||
| Hardware: | PC | ||||||
| OS: | Windows XP | ||||||
| Whiteboard: | stalebug | ||||||
| Bug Depends on: | 272284 | ||||||
| Bug Blocks: | |||||||
| Attachments: |
|
||||||
Ooops, a little typo in my sample, you should read instead:
class X {
String test = ""; //$NON-NLS-1$
}
Wouldn't it be easier if you just disabled the NLS warning in test projects? I don't think multi-line strings are that common in NLS'd projects. Multi-fixes are a bit dangerous because you don't have a preview and may accidentally "fix" places that should not be touched. Created attachment 131272 [details]
Screenshot - works for me
Oh, Dani told me that we already have this as multi-fix. And when I tried your example in HEAD, it even worked. How do you invoke quick fix? Can you reproduce in a new Java project?
I guess I found it: The Ctrl+Enter trick for multi quick fixes only works as long as the proposal table does not have focus. As soon as you press Tab or click into the list, it doesn't work any more: - message line at bottom of popup is not updated - Ctrl+Enter does nothing Adjusted summary and turned this into a bug. (In reply to comment #4) > I guess I found it: > > The Ctrl+Enter trick for multi quick fixes only works as long as the proposal > table does not have focus. As soon as you press Tab or click into the list, it > doesn't work any more: > - message line at bottom of popup is not updated > - Ctrl+Enter does nothing > > Adjusted summary and turned this into a bug. > I never get the Ctrl+End message, whatever the selection is... hence cannot apply the multi-fix functionality... :-( Do I miss a preference somewhere? (In reply to comment #5) > I never get the Ctrl+End message, whatever the selection is... hence cannot > apply the multi-fix functionality... :-( > > Do I miss a preference somewhere? > OK, I found it. I need to click first to Ctrl key, then on the down arrow to select the "Add missing '$NON-NLS$' tag" item and then the Ctrl+End message appears... :-) Not so intuitive though... >- message line at bottom of popup is not updated This happens because ICompletionListener.selectionChanged(...) is not fired when the proposal has focus (see bug 272284). >- Ctrl+Enter does nothing This is because - widgetDefaultSelected is not triggered when 'Ctrl' is down (as opposed to other modifiers being down) ==> we need to use a different listener here - SelectionEvent.stateMask is not set (bug 65679) ==> will automatically be solved when we use a different listener This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet. As such, we're closing this bug. If you have further information on the current state of the bug, please add it and reopen this bug. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant. -- The automated Eclipse Genie. |
Using I20090401-1325 build. I would expected that the quick-fix for Non-externalized strings could be applied on several lines. It's possible to get lot of warning on non-externalized string when inserting a multi lines text using the 'Escape text when pasting into a string literal' Typing preferences... E.g. I have this simple code: class X { String test = ""; } and I want to insert following text inside the empty string literal: This is a good example illustrating that the quick-fix for non-externalized stings should be multi-fixable After the insert, you get: class X { String test = "This is a good example\r\n" + "illustrating\r\n" + "that the quick-fix\r\n" + "for non-externalized stings\r\n" + "should be\r\n" + "multi-fixable\r\n" + ""; //$NON-NLS-1$ } but unfortunately, I get a warning on each new inserted line. Then it will be very cool to have a way to fix all these warnings in one shot instead of applying it for each inserted line...