0

I tried to search the internet for examples for doing that, but can not find a good one. Also I checking eclipse IDE source code, but it's a bit too big to filter out what I need for an example.

What I would need is something similar to Eclipse File Association page below.

My plan is later to replace File types list with a combo and add more values/controls per combo selection.

I would be very thankful for an example or a link to an example that does that or has a same concept with working preference store.

Thank you!

enter image description here

danizmax
  • 2,446
  • 2
  • 32
  • 41

2 Answers2

0

Well, I think that it is nothing more then simple preferences page with two Lists which just represents conformity between file types and editors. The example how to implement your own preferences page is here: Eclipse Preferences - Tutorial

If you want to have Combo - there is no problem - you just replace upper ListEditor woth your ComboFieldEditor and proceed with adding more conrols. The file associations are stored in Eclipse preferences and you can access them whenever you try to open some file to retrieve corresponding editor.

Alex Stybaev
  • 4,623
  • 3
  • 30
  • 44
0

You can take a look at the Google Eclipse plugin source code. I had to achieve something similar to your needs, and inspired myself from there. It is properly designed. You can take a look at the repository right here.

In my case, I needed checkboxes instead of combos, and used a CheckboxTableViewer from the JFace library, there are plenty of example onlines (e.g: JFace snippets). As Alex said, first, works on Eclipse preferences concept... when you got it, it will just stay some pure UI tasks.

dasilvj
  • 10,356
  • 2
  • 17
  • 16