-
Notifications
You must be signed in to change notification settings - Fork 13
Add spelling support #244
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add spelling support #244
Conversation
- add reconciler strategy fixes eclipse-cdt#222
- rename reconciler strategy fixes eclipse-cdt#222
- cleanup CSpellingReconcileStrategy fixes eclipse-cdt#222
- add enabler fixes eclipse-cdt#222
bundles/org.eclipse.cdt.lsp/src/org/eclipse/cdt/lsp/editor/CSpellingReconcileStrategy.java
Outdated
Show resolved
Hide resolved
- use Reconciler extension to get the ISourceViewer needed to instantiate SpellingReconcileStrategy. fixes eclipse-cdt#222
- check for document == null to prevent NPE fixes eclipse-cdt#222
- fix non working spell check in a open document after set 'Enable spell checking' in the Text Editors preference page. fixes eclipse-cdt#222
import org.eclipse.jface.text.reconciler.Reconciler; | ||
import org.eclipse.jface.text.source.ISourceViewer; | ||
|
||
public class CSpellingReconciler extends Reconciler { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
make it final and in internal package
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
if (editorInput instanceof IFileEditorInput fileEditorInput) { | ||
return fileEditorInput.getFile(); | ||
} | ||
return null; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
avoid null
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great progress with implementation!
bundles/org.eclipse.cdt.lsp/src/org/eclipse/cdt/lsp/editor/CSpellingReconciler.java
Outdated
Show resolved
Hide resolved
bundles/org.eclipse.cdt.lsp/src/org/eclipse/cdt/lsp/editor/CSpellingReconciler.java
Outdated
Show resolved
Hide resolved
bundles/org.eclipse.cdt.lsp/src/org/eclipse/cdt/lsp/editor/CSpellingReconciler.java
Outdated
Show resolved
Hide resolved
bundles/org.eclipse.cdt.lsp/src/org/eclipse/cdt/lsp/editor/SpellingEnabled.java
Outdated
Show resolved
Hide resolved
bundles/org.eclipse.cdt.lsp/src/org/eclipse/cdt/lsp/editor/SpellingEnabled.java
Outdated
Show resolved
Hide resolved
bundles/org.eclipse.cdt.lsp/src/org/eclipse/cdt/lsp/editor/SpellingEnabled.java
Outdated
Show resolved
Hide resolved
bundles/org.eclipse.cdt.lsp/src/org/eclipse/cdt/lsp/editor/SpellingEnabled.java
Outdated
Show resolved
Hide resolved
bundles/org.eclipse.cdt.lsp/src/org/eclipse/cdt/lsp/editor/SpellingEnabled.java
Outdated
Show resolved
Hide resolved
bundles/org.eclipse.cdt.lsp/src/org/eclipse/cdt/lsp/editor/SpellingEnabled.java
Outdated
Show resolved
Hide resolved
- cleanup code after review fixes eclipse-cdt#222
- add link to spelling preferences page in Editor (LSP) page. fixes eclipse-cdt#222
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for your work @ghentschke !
I have only minor comment regarding newly added UI part, but it may be considered later
bundles/org.eclipse.cdt.lsp/src/org/eclipse/cdt/lsp/editor/EditorConfigurationPage.java
Outdated
Show resolved
Hide resolved
- remove obsolete bracket fixes eclipse-cdt#222
@ruspl-afed Thank you! |
Basic spelling support in new LSP based C/C++ Editor.
fixes #222