Bug 417543 - [KeyBindings] preference page:Implement Keys Scheme "Export CSV..." in the sorted way. implement Keys Scheme "Import CSV..."
Summary: [KeyBindings] preference page:Implement Keys Scheme "Export CSV..." in the s...
Status: RESOLVED WONTFIX
Alias: None
Product: Platform
Classification: Eclipse Project
Component: IDE (show other bugs)
Version: 4.3   Edit
Hardware: All All
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: Platform UI Triaged CLA
QA Contact:
URL:
Whiteboard:
Keywords: bugday, helpwanted
Depends on:
Blocks:
 
Reported: 2013-09-18 16:20 EDT by Yonggang Luo CLA
Modified: 2017-07-17 14:36 EDT (History)
2 users (show)

See Also:


Attachments
I create a patch for the Export part. (2.67 KB, text/plain)
2013-09-24 06:03 EDT, Yonggang Luo CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Yonggang Luo CLA 2013-09-18 16:20:39 EDT
Because Eclipse preferences import and export is too much things imported,
and keys are hidden inside, so we creating a proper keys settings import/export
for easily customize keys for different users and companies.
Comment 1 Paul Webster CLA 2013-09-18 16:46:15 EDT
The Export CSV is for reporting, not for exporting/importing.

The correct way to do this is to provide an org.eclipse.ui.preferenceTransfer extension so you can use File>Export...>Preferences and select Keys only (just like there are currently transfers for "Installed JREs" only)

PW
Comment 2 Yonggang Luo CLA 2013-09-18 22:10:40 EDT
Yes, I know how to export the keys by  File>Export...>Preferences,
but use that way, the export keys are magic things. I want the export keys
can be human readable and exchanged between people.
And besides, we can use this functional to define custom Keys Scheme.
For example, we can define custom keys for our company, and clearly readable.
Comment 3 Paul Webster CLA 2013-09-19 14:03:09 EDT
(In reply to Yonggang Luo from comment #2)
> Yes, I know how to export the keys by  File>Export...>Preferences,
> but use that way, the export keys are magic things. I want the export keys
> can be human readable and exchanged between people.
> And besides, we can use this functional to define custom Keys Scheme.
> For example, we can define custom keys for our company, and clearly readable.

To define whole key schemes, you need to use plugin.xml and the org.eclipse.ui.bindings extension point. That can't be done with Import/Export at all.  The CSV export doesn't contain enough information to re-import, and it doesn't make sense to me to support a second way to import/export keybindings when preferences with an optional preferenceTransfer are the import/export mechanism

In Juno and Kepler, the keybindings are stored in the application model.  You can create a fragments e4xmi file (looks like XML) to add MKeyBinding elements to an MBindingTable, but without an existing model to work against it can be hard to do it by hand.

It sounds like you need to write a tool that can read your tables of keys however you want to specify it and generate a plugin with plugin.xml that you can use with eclipse.

PW
Comment 4 Yonggang Luo CLA 2013-09-24 06:03:13 EDT
Created attachment 235744 [details]
I create a patch for the Export part.

No test attached.
how to test it?
Comment 5 Paul Webster CLA 2013-09-30 09:37:14 EDT
As mentioned, import/export of CVS is not an option.  If you want to do that you can create your own plugin and share it within your company.

If you want to contribute a preferenceTransfer that would certainly help with keybinding only preferences.

PW
Comment 6 Luoh Ren-Shan CLA 2014-07-30 21:17:53 EDT
Could there be a message to warn the user that the exported CSV is not importable?
Comment 7 Paul Webster CLA 2014-07-31 15:58:27 EDT
Sure, we just need a patch to implement it.

PW
Comment 8 Karsten Thoms CLA 2017-07-17 14:36:11 EDT
We had a discussion at Eclipse Hackathon about the usability of a warning message. As a result we think that it is just disturbing and instead the function should be documented. There it will be mentioned that the exported data is not meant to be imported.

Opened bug#519781