Re: How to configure plugin properties

Boris Heithecker <[email protected]> Wed, 19 Apr 2017 19:10:48 +0200
Newsgroups gmane.comp.java.netbeans.modules.openide.devel
Message-ID <CAL465RH38KfmYjFgph0_PT3SRoMb+7rurKDwwVdFDKiv-So79g@mail.gmail.com>
If it's only a few string-like properties, you could use
NbPreferences.forModule(YourClass.class).... to store and retrieve your
properties.
It's easy, because you don't have to bother about files, persistences,
places and so on. Preferences are persisted by the platform.
Boris

2017-04-18 15:37 GMT+02:00 Andrea Patricelli <[email protected]>:

> Hi all,
>
> I'm developing a custom plugin to connect to a web application.
> The plugin needs host, protocol, port and credentials of the web
> application to connect to it and then run.
> At first startup the plugin asks to the user to insert these values.
>
> Is there a best practice or a kind of "classpath" under which I can put
> these properties? I mean a way to package a default file and then read it
> without knowing the full path of the file.
> Is there a kind of properties directory?
>
> Best regards,
> Andrea
>
> --
> Dott. Andrea Patricelli
> Tel. +39 3204524292
>
> Developer @ Tirasa S.r.l.
> Viale D'Annunzio 267 - 65127 Pescara
> Tel +39 0859116307 / FAX +39 0859111173
> http://www.tirasa.net
>
> Apache Syncope PMC Member
>
>


-- 
Boris Heithecker


Dr. Boris Heithecker
Lüneburger Str. 30
28870 Ottersberg
Tel.: 0 42 05/ 31 58 34