public abstract class GeneralPlatformInstall extends Object
CustomPlatformInstall
or PlatformInstall
The PlatformInstall
or CustomPlatformInstall
instances should be
registered in the org-netbeans-api-java/platform/installers folder on the system filesystem.
Registration example:
@ServiceProvider(
service=GeneralPlatformInstall.class,
path="org-netbeans-api-java/platform/installers"
)
public final class MyPlatformInstall extends PlatformInstall
{
...
}
After the createIterator
is finished,
a platform definition file shall be created at "Services/Platforms/org-netbeans-api-java-Platform" folder:
public java.util.Set instantiate() throws IOException { MyPlatform p = new MyPlatform(); p.setDisplayName(theName); p.setVendor(theVendor); InstanceDataObject.create( DataFolder.findFolder(FileUtil.getConfigFile("Services/Platforms/org-netbeans-api-java-Platform")), theName, p, null, true); return Collections.singleton(p); }
The platform definition file has to represent the JavaPlatform
instance.
This can be done in many ways. For example using the
ConvertAsJavaBean annotation:
@ConvertAsJavaBean public static class MyPlatform extends JavaPlatform { ... }
Modifier and Type | Method and Description |
---|---|
abstract String |
getDisplayName()
Gets the display name of the platform installer.
|
public abstract String getDisplayName()