| Summary: | [nls tooling][quick assist] Suggestions to fine tune quick assists in Properties File editor | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Product: | [Eclipse Project] JDT | Reporter: | Raksha Vasisht <raksha.vasisht> | ||||||||||
| Component: | Text | Assignee: | Deepak Azad <deepakazad> | ||||||||||
| Status: | VERIFIED FIXED | QA Contact: | |||||||||||
| Severity: | normal | ||||||||||||
| Priority: | P2 | CC: | daniel_megert, deepakazad, markus.kell.r | ||||||||||
| Version: | 3.8 | Flags: | markus.kell.r:
review+
|
||||||||||
| Target Milestone: | 3.8 M4 | ||||||||||||
| Hardware: | All | ||||||||||||
| OS: | All | ||||||||||||
| Whiteboard: | |||||||||||||
| Attachments: |
|
||||||||||||
|
Description
Raksha Vasisht
> Remove Key(s) -> addl info is not very clear that it is modifying 2 different > files. I was hoping that it would be clear :-) > We use '...' to show modifications in different parts of the same file > for other proposals. I'm not sure if we also use it to show changes in 2 > different files already, but I think we probably should indicate it, I think this is the first time that the additional info shows changes from 2 files, at least I did not find any precedent. > ex: mention the file names, in that case. Yeah, we could show the file names (in bold?) > > ex: mention the file names, in that case.
> Yeah, we could show the file names (in bold?)
The question is how valuable it is at all to show the changes for both files. Maybe it's enough to just say which files we change?
*** Bug 362102 has been marked as a duplicate of this bug. *** From Bug 362102 " Improve the preview for 'Remove property' and 'Remove properties' proposals. The current preview doesn't show anything interesting. Check how it looks if you render the removed properties with strikeout style. Or put an explicit "<removed property>" there. Furthermore, this is the first quick assist that makes changes in multiple files. The preview has to show where the changes will be performed (e.g. with "Filename.ext:" in front of the section). " Created attachment 206614 [details]
screenshot with strikeout
I think strikeout looks good. Markus ?
Screenshot looks good. Please add the file names, and then I guess we're done. (In reply to comment #6) > Screenshot looks good. Please add the file names, and then I guess we're done. +1. Created attachment 206757 [details] patch for jdt ui Markus, as discussed - the patch uses strikeout style using 'del' tags - EditAnnotator is not touched, this change is limited to Remove properties quick assist. - File names are also displayed in the preview. (Can you please review the code for this part.) (In reply to comment #0) > 1)use the standard 'Rename in workspace' shorcut for the proposal in the > properties file Done Created attachment 206758 [details]
patch for platform text
Adds support for 'del' tag to HTML2TextReader.
Comment on attachment 206758 [details]
patch for platform text
You have to make sure that the HTML2TextReader also works if the bold and strike-through ranges overlap. The patch will throw IAEs in that case.
To reproduce the problem, hack BrowserInformationControl#isAvailable(Composite) to always return false. Then show this Javadoc hover:
/**
* Hello <del>deleted</del> world.<br>
* Hello <b>bold</b> world.<br>
* <b>Hello <del>deleted</del></b> world.<br>
*/
class TestClass { }
I guess the implementation also has to add a style range in the start*() method if the other style was already started before. And stop*() always has to set all enabled styles.
The JDT UI patch looks good, except that it misses to align the additional info text of the Rename quick assist with the one from the Java editor: (In reply to comment #0) > Also, the text in addl info box shows 'Start the Rename refactoring' not 'Start > Rename refactoring' Created attachment 206901 [details] patch for platform text (In reply to comment #10) > You have to make sure that the HTML2TextReader also works if the bold and > strike-through ranges overlap. The patch will throw IAEs in that case. Done. I also added tests to HTML2TextReaderTester to make sure that the StyleRanges do not overlap. The tests do not actually apply the StyleRanges to a StyledText widget, but only check for an overlap, which I thought was simpler to do :) (In reply to comment #11) > The JDT UI patch looks good, except that it misses to align the additional info > text of the Rename quick assist with the one from the Java editor: I have the change in my local repo. Will push it along with other changes when the platform text patch is good to go. (In reply to comment #12) > Created attachment 206901 [details] [diff] > patch for platform text Thanks, released as commit 9652ad7296f5ebc4cb54564e1a47def3a8f879c3. Thanks Markus! Pushed JDT UI change as well - c76aef0f470c9e1d28c5b46d2c807072a8e10192 Verified for Juno M4 with 4.2 I20111205-1810. |