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

problem's description and research #2

Open
giubacc opened this issue Apr 10, 2024 · 0 comments
Open

problem's description and research #2

giubacc opened this issue Apr 10, 2024 · 0 comments

Comments

@giubacc
Copy link
Contributor

giubacc commented Apr 10, 2024

The need is to have encode consistency between Eclipse and vscode at document's level granularity.
In other words: if a document within a project in Eclipse is marked to be edited and saved using a certain encoding: x, then when opened and edited with vscode, it should be saved respecting the same x encode scheme.

To achieve this, vscode could use an extension: vscode-eclipse-sync-encode (the one should be developed here), taking care of reading the Eclipse's settings file: .settings/org.eclipse.core.resources.prefs and replicate the behavior when a certain document is opened according to the rules defined there.

As example, the content of the Eclipse settings file could look as:

eclipse.preferences.version=1
encoding//src/java-tests/ch/logobject/mlogistics/mot/signature.svg=UTF-8
encoding//src/sql=UTF-8
encoding//target/sql=UTF-8
encoding/<project>=ISO-8859-1

In this snippet there is hierarchy of rules to be applied, starting from the more precise to the setting defined at global level.

An approach for the vscode plugin implementing this behavior, should be the following:

  • every time a document is loaded into a vscode editor, the encoding property of the document or the editor (depending on where this information can be set via vscode API) should be set according to the information read from the Eclipse settings.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant