-
Notifications
You must be signed in to change notification settings - Fork 1
Description
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.