| Summary: | spell checking of bugzilla comments | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| Product: | z_Archived | Reporter: | Mik Kersten <mik.kersten> | ||||||||
| Component: | Mylyn | Assignee: | Jeff Pound <jeff.bagu> | ||||||||
| Status: | RESOLVED FIXED | QA Contact: | |||||||||
| Severity: | enhancement | ||||||||||
| Priority: | P4 | CC: | ekuleshov, gunnar, jeff.bagu, mlists, robert.elves | ||||||||
| Version: | 0.3 | Keywords: | helpwanted | ||||||||
| Target Milestone: | --- | ||||||||||
| Hardware: | PC | ||||||||||
| OS: | Windows XP | ||||||||||
| Whiteboard: | |||||||||||
| Bug Depends on: | 51444 | ||||||||||
| Bug Blocks: | |||||||||||
| Attachments: |
|
||||||||||
|
Description
Mik Kersten
If this is easy enough it might be a fun thing to add next week. Whenever I tell people about this possibility they like the idea. It turns out that this isn't as easy as originally thought. First of all, we need to make out own dialog for displaying potential matches, etc. This really isn't a huge problem though. The big problem is that the suggestions that are given in the java editor via quick fix are actually hacked in. There is a note in the source code for JavaSpellingProblem.getProposals() that they have not properly implemented the class. This is the only kind of problem that we get, so we will either need to do a major hack like they did, or leave this for now. I agree that hacking it in is a lame solution. I think that we can expect the workbench/text stuff to offer spell-checking functionality at some point, and then we can use that. This certainly isn't worth doing if it takes any substantial work (so lowering to P4). However, let's revisit this sometime in the 0.4 cycle to see if we want to raise an enhancement request for them to generalize the spell-checking support. The truth is is that this is generalized with interfaces in org.eclipse.ui.texteditor.spelling as well as some managers, but only jdt does any implementing. Also, Eclipse does not ship with a "dictionary" and the users must add it themselves to get the spelling to work properly. Jeff, this could be another task of interest. I would love to stop making typos in my bug posts ;) Sure, I'll add it to my "todo" list. Since you should be using Mylar as your "todo" list for the project, I'll do that for you :) Do you have a query set up in your Task List for all reports assigned to you? Yeah, i have mylar set up with query tasks for everything Im working on. My todo list is my mental copy of my active tasks ;) I just enabled spell checking for the Java editor, mostly following the instructions here: http://www.javalobby.org/java/forums/t17453.html Can't we at least get the squiggly highlighting in like the Java editor did? The spelling preference apparently makes the functionality available to all text editors, and Rob's latest editor improvements brought us more in line with those. I figured that the JDT folks would have wanted spell checking to work for the UI stuff... just tried it and even though it does not work for plain text files, it does work for Strings in .properties files. So this behavior is indeed available to other text editors. Update: I have a spelling reconciler in place for tasks and it currently gets called as the user finishes a typing run. However there are 2 main issues for completeing spell checking. 1. Annotation Model (Form Editor vs. Text Editor): The JDT (and .properties) spell checking is based on accessing a TextEditor (primarily to retrieve the annotation model). Since the task editor is a FormEditor, we don't have that attribute. This is necessary to mark spelling errors. 2. Task Comment Configuration The reconciler I've put in for tasks is a modified version of the one used for .properties configurations. We'll need to create a configuration for task comments. I'll look into creating one but it would be a whole lot easier to do if we had the annotation support :) *Note on the .properties editor: This editor is actually part of the JDT and essentially just uses the JDT's internal spell checking capabilities with the JDT's .properties configuration. ok, scratch number 2 off the list. Treating our editors document as a regular text type works. Now we just need annotations to mark the errors and we'll have spell checking! (I can currently test it by printing the spelling errors to std err) Awesome. It looks like our RepositoryTextViewer (which extends SourceViewer) can have annotations. No? It seems that it is capable of having them, however the annotation model will not get created unless the SourceViewer has a "VerticalRuler" or an "OverviewRuler" (see SourceViewer#setDocument(IDocument, IAnnotationModel, int, int)). Otherwise the model is always null. I tried creating a vertical ruler and an annotation model to be set in the viewer and passed along to the reconciler, but the annotations don't show up. A debug session shows that they are being created from the misspelled words, but the UI bit isn't working. I'll post a patch of what I have, maybe someone with some annotation experience can see the problem. Created attachment 47718 [details]
Broken spell check, annotations don't show up.
Adding the vertical ruler also messes up the text boxes in the editor, beware!
Created attachment 47719 [details]
mylar/context/zip
Thanks for posting this Jeff, I'll take a look at this today. Fixed. The overview and gutter rulers are disabled by default. Enabling spell checking in Eclipse: http://www.javalobby.org/java/forums/t17453.html Adding annotations to a source viewer: http://dev.eclipse.org/newslists/news.eclipse.platform.swt/msg19676.html Created attachment 48766 [details]
mylar/context/zip
Rob, you should put those instructions in the FAQ, probably as a last section under Setup called "Spell checking" Look really cool! However, spell checking should be alos enabled for the following elements: -- task notes on planning tab -- description on new task editor (bugzilla and others) -- summary in task editor (bugzilla and others) It would be also neat to have completion proposal for fixing those error... - Planning notes and (editable) description fields should have spell checking support already - Created new bug report to address summary field ( bug#155278 ) - Created new bug report to address presentation of spelling recommendations ( bug#155280 ) I see it now in the Notes and in Description for new bugzilla task , but not in the Description field for local task. Yes, description on local tasks is using standard text. Could you tack that on to bug#155278 ? |