Skip to content

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

Merged
merged 11 commits into from
Feb 19, 2024
Merged

Conversation

ghentschke
Copy link
Contributor

@ghentschke ghentschke commented Feb 4, 2024

Basic spelling support in new LSP based C/C++ Editor.

fixes #222

@ghentschke ghentschke requested a review from ruspl-afed February 4, 2024 21:30
- 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 {
Copy link
Contributor Author

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

Copy link
Contributor Author

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;
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

avoid null

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

Copy link
Member

@ruspl-afed ruspl-afed left a 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!

- cleanup code after review

fixes eclipse-cdt#222
- add link to spelling preferences page in Editor (LSP) page.

fixes eclipse-cdt#222
Copy link
Member

@ruspl-afed ruspl-afed left a 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

- remove obsolete bracket

fixes eclipse-cdt#222
@ghentschke ghentschke merged commit d5941b9 into eclipse-cdt:master Feb 19, 2024
@ghentschke
Copy link
Contributor Author

@ruspl-afed Thank you!

@ghentschke ghentschke added this to the 1.1.0 milestone Feb 19, 2024
@ghentschke ghentschke deleted the add-spelling-support branch February 21, 2024 18:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Spell checking support
2 participants