Home » Archived » IMP » Is there some kind of Guide to Prefspec field definitions? 
| Is there some kind of Guide to Prefspec field definitions? [message #23543] | 
Thu, 07 August 2008 16:04   | 
 
Eclipse User  | 
 | 
 | 
   | 
 
Originally posted by: mcriley.CohesionForce.com 
 
The IMP-generated prefspecs file (pfsp) contains sample field definitions  
for boolean, file, dirlist, int, and string.  It appears there's also  
support for radio buttons and combo boxes, but it's unclear how to specify  
the definition of such a control. 
 
I looked at the grammar for the prefspecs DSL and while I might be able to  
build something that matches the grammar, how the components are to be  
associated with one another is not obvious. 
 
Any guidance (or example) would be appreciated! 
 
Marc A. Criley 
CohesionForce, Inc.
 |  
 |  
  |  
| Re: Is there some kind of Guide to Prefspec field definitions? [message #24069 is a reply to message #23543] | 
Mon, 25 August 2008 16:10   | 
 
Eclipse User  | 
 | 
 | 
   | 
 
Marc, 
 
The PrefSpecs language (and compiler and generator) are incomplete with  
respect to the specification (and compilation and generation) of fields  
for combo boxes and radio buttons. 
 
There are, however, methods in 
   org.eclipse.imp.preferences.PreferencesUtilities 
that allow one to manually create fields of these types, i.e., 
   makeNewComboField(..) 
and 
   makeNewRadioGroupField(..) 
 
My suggestion (if you haven't already figured this out) is to specify  
your preference pages to the extent that you can using the fields  
supported in PrefSpecs (int, string, boolean, etc.) and to generate your  
pages on that basis.  Then check out the generated code for calls to  
makeNewIntegerField(..), makeNewBooleanField(..), etc.  Then manually  
insert the calls to makeNewComboField(..) and makeNewRadioGroupField(..)  
into the appropriate points in your tabs where you'd like fields of  
those types.  The signatures of all of these "make...Field(..)" methods  
are all generally analogous, differing mainly in the details of  
available and default values and things like that.  Knowing the kind of  
field you'll be creating should make it fairly straightforward to  
interpret the signature.  If you have any questions about that, please  
let me know. 
 
Obviously the lack of support for these fields is something we should  
address.  Initially we got through the other field types and then kind  
of ground to a halt as other concerns became more pressing.  But we  
should probably finish off at least this part of the PrefSpecs langauge  
and support.  If you don't mind, it would be great if you could enter a  
bug report or enhancement request into Bugzilla on Eclipse.  (Requests  
like that will carry more weight if they come from an outside user.) 
 
Apologies for the inconvenience! 
 
Stan 
 
 
Marc A. Criley wrote: 
> The IMP-generated prefspecs file (pfsp) contains sample field  
> definitions for boolean, file, dirlist, int, and string.  It appears  
> there's also support for radio buttons and combo boxes, but it's unclear  
> how to specify the definition of such a control. 
>  
> I looked at the grammar for the prefspecs DSL and while I might be able  
> to build something that matches the grammar, how the components are to  
> be associated with one another is not obvious. 
>  
> Any guidance (or example) would be appreciated! 
>  
> Marc A. Criley 
> CohesionForce, Inc. 
>  
>
 |  
 |  
  |  
| Re: Is there some kind of Guide to Prefspec field definitions? [message #573168 is a reply to message #23543] | 
Mon, 25 August 2008 16:10   | 
 
Eclipse User  | 
 | 
 | 
   | 
 
Marc, 
 
The PrefSpecs language (and compiler and generator) are incomplete with  
respect to the specification (and compilation and generation) of fields  
for combo boxes and radio buttons. 
 
There are, however, methods in 
   org.eclipse.imp.preferences.PreferencesUtilities 
that allow one to manually create fields of these types, i.e., 
   makeNewComboField(..) 
and 
   makeNewRadioGroupField(..) 
 
My suggestion (if you haven't already figured this out) is to specify  
your preference pages to the extent that you can using the fields  
supported in PrefSpecs (int, string, boolean, etc.) and to generate your  
pages on that basis.  Then check out the generated code for calls to  
makeNewIntegerField(..), makeNewBooleanField(..), etc.  Then manually  
insert the calls to makeNewComboField(..) and makeNewRadioGroupField(..)  
into the appropriate points in your tabs where you'd like fields of  
those types.  The signatures of all of these "make...Field(..)" methods  
are all generally analogous, differing mainly in the details of  
available and default values and things like that.  Knowing the kind of  
field you'll be creating should make it fairly straightforward to  
interpret the signature.  If you have any questions about that, please  
let me know. 
 
Obviously the lack of support for these fields is something we should  
address.  Initially we got through the other field types and then kind  
of ground to a halt as other concerns became more pressing.  But we  
should probably finish off at least this part of the PrefSpecs langauge  
and support.  If you don't mind, it would be great if you could enter a  
bug report or enhancement request into Bugzilla on Eclipse.  (Requests  
like that will carry more weight if they come from an outside user.) 
 
Apologies for the inconvenience! 
 
Stan 
 
 
Marc A. Criley wrote: 
> The IMP-generated prefspecs file (pfsp) contains sample field  
> definitions for boolean, file, dirlist, int, and string.  It appears  
> there's also support for radio buttons and combo boxes, but it's unclear  
> how to specify the definition of such a control. 
>  
> I looked at the grammar for the prefspecs DSL and while I might be able  
> to build something that matches the grammar, how the components are to  
> be associated with one another is not obvious. 
>  
> Any guidance (or example) would be appreciated! 
>  
> Marc A. Criley 
> CohesionForce, Inc. 
>  
>
 |  
 |  
  |   
Goto Forum:
 
 Current Time: Mon Nov 03 18:43:56 EST 2025 
 Powered by  FUDForum. Page generated in 0.04302 seconds  
 |