Skip to content
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

Provide .editorconfig support (POC) #89

Closed

Conversation

angelozerr
Copy link
Contributor

Provide .editorconfig support (POC)

Fixes eclipse-platform/eclipse.platform.ui#877

Signed-off-by: azerr [email protected]

@angelozerr
Copy link
Contributor Author

angelozerr commented Sep 17, 2022

Here a POC with .editorconfig without TM4E (you have not syntax coloratuon and language configuration).

It is a POC so I know that there a are a lot of issues (bad comments, I use ec4j JAR, etc), but I would like to start some discussion.

With editorconfig context we need to:

  • get the IPreferenceStore from an ITextEditor (outside the editor himself)
  • add an EditorConfigPreferenceStore on the first chained preference store of an editor.

I did that with Java reflection at https://github.com/angelozerr/ec4e/blob/80db2809069f9f7dc74cf60d94148c4af7aec3dd/org.eclipse.ec4e/src/main/java/org/eclipse/ec4e/internal/PreferenceStoreHelper.java#L33

I try to avoid using Java Reflection

This extension point requires to expose a new API IPreferenceStorefactory in genereiceditor, @mickaelistria not sure you will like that.

In another words I would like to fix this 2 problems with IPreferenceStore in order to I can continue to work on this POC with clean mean.

Many thanks for your feedback!

@laeubi
Copy link
Contributor

laeubi commented Sep 18, 2022

@angelozerr can you extract the generic editor enhancement into a separate PR?

@angelozerr angelozerr force-pushed the editorconfig-poc branch 3 times, most recently from 860c147 to 5183521 Compare September 19, 2022 08:47
@angelozerr
Copy link
Contributor Author

Close for #90

@angelozerr angelozerr closed this Sep 20, 2022
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.

Provide .editorconfig support
2 participants