Re: How to configure plugin properties

Oliver Rettig <[email protected]> Wed, 19 Apr 2017 18:49:18 +0200
Newsgroups gmane.comp.java.netbeans.modules.openide.devel
Organization ORAT
Message-ID <6141168.koR2cjts81@l560>
Hi,

I am not sure what exactly you want to do, but maybe this helps:

Inside your netbeans module - in a subfolder with the name "release" of the 
folder where is your netbeans module you can save files.

This files are automatically copied with the build process of the module. 

In your code you can access thes files by

org.openide.modules.InstalledFileLocator

e.g. 

  File glaRightSideLabelSetFile = InstalledFileLocator.
                getDefault().locate("gla-right-labelset.xml", 
                        "de.orat.gaitlabhd.hdascii.fileType", false);

best regards
Oliver



> 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