Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 27341

Summary: [Preferences] ListEditor controls not selectable
Product: [Eclipse Project] Platform Reporter: Andy Brook <axb>
Component: UIAssignee: Tod Creasey <Tod_Creasey>
Status: RESOLVED WONTFIX QA Contact:
Severity: enhancement    
Priority: P5 CC: Mike_Wilson
Version: 2.0.1Keywords: helpwanted
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard:
Attachments:
Description Flags
Modified ListEditor.java class file from JFace preferences, allows buttons to be selectable none

Description Andy Brook CLA 2002-11-28 11:38:24 EST
The ListEditor does not allow subclasses to determine which buttons are 
present, for example, I only want users to be able to reorder a predefined 
sequence, so I want to hide NEW and REMOVE, but as they are all bunched 
inside 'createButtons(..)' I cannot.

One solution would be to allow a 'style' attribute to be specified in the 
constructor (as I am doing in my own branch of ListEditor).  I can provide the 
modified class if required.

Cheers.
Comment 1 Tod Creasey CLA 2002-11-29 10:32:30 EST
Your suggestions would be appreciated. If you would like to attach your 
modified class I would be happy to review your ideas.
Comment 2 Andy Brook CLA 2002-12-02 03:32:18 EST
Created attachment 2602 [details]
Modified ListEditor.java class file from JFace preferences, allows buttons to be selectable
Comment 3 Tod Creasey CLA 2002-12-04 17:04:29 EST
Why can you not such subclass ListEditor and modify createButtons and 
setEnabled? What you are asking for is a bit more configurability than this 
simple control was designed for.
Comment 4 Andy Brook CLA 2002-12-05 03:46:26 EST
Hmm, making components more flexible can only be a good thing yes?, especially
when the changes involved are minor, as these are.

Besides, to do as you suggest, a lot of methods would have to be exposed to
subclasses, - reimplementing Up/Down behaviour /listener code etc would be annoying.

Making the component more flexible might extend its applicability, reducing the
need for subclassing and reimplementation of already implemented code.

But Hey, at the end of the day Ive provided the mods Ive made to the class and
am using it in isolation from jFace, if you dont believe its worth integrating,
then fine :)

Cheers
Comment 5 Tod Creasey CLA 2002-12-05 09:47:34 EST
This was meant to be a simple little component - your changes are great and 
represent the spirit of why we supply simple JFace components - to give 
developers like yourself a good place to start if they need more.

I am going to mark this as WONTFIX as the change in behaviour is not worth the 
potential risk to other developers.

Thanks for your input and for using Eclipse.
Comment 6 Mike Wilson CLA 2008-04-13 15:24:39 EDT
Odd the WONTFIX fell off this bug, even though there was no evidence of when that happened in the bug activity. Re-marking for completeness.