Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [platform-ui-dev] new jface field editors (IntegerWithBooleanFieldEditor)

What about StringWithBooleanFieldEditor, ColorWithBooleanFieldEditor, 
etc.?

The combination of a BooleanFieldEditor and another FieldEditor should be 
implemented by composition, not by subclassing.

Some help with simple dependency management could be useful, but it would 
need further investigation to tell whether this is best implemented in 
BooleanFieldEditor, in FieldEditorPreferencePage, or in a new class.

Markus

Andrew Eidsness <eclipse@xxxxxxxxxx> wrote on 2014-02-19 21:03:17:

> I like jface's IntegerFieldEditor and it works well for my needs.
> 
> However now I would like to have a control that combines an integer 
value with a boolean enablement flag.  It would be
> used for a preference where the user is able to enable/disable the 
functionality, and when it is enabled they are able
> to specify a numeric limit.
> 
> This class already exists in another plugin (internal to CDT), I'm 
wondering if people agree that it would make sense to
> add it to jface.
> 
> This is the particular class I'm talking about:
> 
> 
http://git.eclipse.org/c/cdt/org.eclipse.cdt.git/tree/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/internal/ui/preferences/IntegerWithBooleanFieldEditor.java

> 
> There are also a few related classes in the same package.
> 
> If people think that this makes sense as a generic addition to jface, 
then I can create a bug and submit a gerrit change
> request.
> 
> -Andrew
> 
> _______________________________________________
> platform-ui-dev mailing list
> platform-ui-dev@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/platform-ui-dev
> 



Back to the top