Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [ptp-dev] About storing constants and default values

Yes, that sounds like what Preferences is for.

...Beth

Beth Tibbitts (859) 243-4981 (TL 545-4981)
High Productivity Tools / Parallel Tools http://eclipse.org/ptp
IBM T.J.Watson Research Center
Mailing Address: IBM Corp., 745 West New Circle Road, Lexington, KY 40511

Inactive hide details for Greg Watson ---10/24/2008 07:48:42 PM---Seems like IMemento might be what you need. Or why not just uGreg Watson ---10/24/2008 07:48:42 PM---Seems like IMemento might be what you need. Or why not just use

          Greg Watson <g.watson@xxxxxxxxxxxx>
          Sent by: ptp-dev-bounces@xxxxxxxxxxx

          10/24/2008 06:01 PM

          Please respond to
          Parallel Tools Platform general developers <ptp-dev@xxxxxxxxxxx>

To

Parallel Tools Platform general developers <ptp-dev@xxxxxxxxxxx>

cc


Subject

Re: [ptp-dev] About storing constants and default values

Seems like IMemento might be what you need. Or why not just use  
Preferences?

Greg

On Sep 26, 2008, at 5:59 PM, Daniel Felix Ferber wrote:

> Hi,
>
> I would like to share some experience for a requirement I describe:
>
> I am wondering the best approach to store and read:
> - Default values for preferences/launches/etc.
> - Other configuration values/constants that that should no stay hard  
> coded in plugin.
>
> One approach is leaving them in a property file inside the plugin,  
> together with the source code or in a directory dedicated for this  
> purpose.
> I would then get the inputstream for this file and create a  
> Properties object.
>
> Another solution would be getBundle()/getString() or even extending  
> NLS. But I feel I should not use this approach because it is  
> designed for UI messages and allows overriding the files on  
> different locals, what is not my intention.
>
> Another alternative would be saving the value inside the .options  
> file. Would this confuse the tracing launch tab when launching  
> eclipse? And will be options be easily readable? I have found only  
> methods to get debug options.
>
> Best regards,
> Daniel Felix Ferber
> _______________________________________________
> ptp-dev mailing list
> ptp-dev@xxxxxxxxxxx
>
https://dev.eclipse.org/mailman/listinfo/ptp-dev
>

_______________________________________________
ptp-dev mailing list
ptp-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/ptp-dev


GIF image

GIF image

GIF image


Back to the top