Class TargetPlatform
- java.lang.Object
-
- org.eclipse.pde.core.plugin.TargetPlatform
-
public class TargetPlatform extends java.lang.ObjectThe central class for the plug-in development target platform. This class cannot be instantiated or subclassed by clients; all functionality is provided by static methods. Features include:- the target platform's OS/WS/ARCH
- the default application and product
- the available applications and products
- Since:
- 3.3
- Restriction:
- This class is not intended to be subclassed by clients.
- Restriction:
- This class is not intended to be instantiated by clients.
-
-
Constructor Summary
Constructors Constructor Description TargetPlatform()
-
Method Summary
All Methods Static Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static voidcreatePlatformConfiguration(java.io.File location, IPluginModelBase[] plugins, IPluginModelBase brandingPlugin)Deprecated.Old Update Manager is planned for removal and so it this API.static java.lang.String[]getApplications()Returns a list of identifiers for all available applications (i.e.static java.lang.StringgetBundleList()The comma-separated list of bundles which are automatically installed and optionally started.static java.lang.StringgetDefaultApplication()Returns the ID for the default application (org.eclipse.core.runtime.applicationsextension) for the current target platform.static java.lang.StringgetDefaultLocation()Returns the location of the default target platform, namely the location of the host (running) instance of Eclipse.static java.lang.StringgetDefaultProduct()Returns the ID for the default product (org.eclipse.core.runtime.productsextension) for the current target platform, ornullif none can be determined.static java.lang.StringgetLocation()Returns the target platform's main location.static java.lang.StringgetNL()Returns the target locale as specified on the Environment tab of the Plug-in Development > Target Platform preference page.static java.lang.StringgetOS()Returns the target operating system as specified on the Environment tab of the Plug-in Development > Target Platform preference page.static java.lang.StringgetOSArch()Returns the target system architecture as specified on the Environment tab of the Plug-in Development > Target Platform preference page.static java.lang.String[]getProducts()Returns a list of identifiers for all available products (i.e.static java.lang.StringgetWS()Returns the target windowing system as specified on the Environment tab of the Plug-in Development > Target Platform preference page.
-
-
-
Method Detail
-
getLocation
public static java.lang.String getLocation()
Returns the target platform's main location. As target platforms may contain multiple locations it is recommended that you use ITargetPlatformService instead.- Returns:
- the target platform's main location
-
getDefaultLocation
public static java.lang.String getDefaultLocation()
Returns the location of the default target platform, namely the location of the host (running) instance of Eclipse.- Returns:
- the location of the default target platform
-
getOS
public static java.lang.String getOS()
Returns the target operating system as specified on the Environment tab of the Plug-in Development > Target Platform preference page.- Returns:
- the target operating system
-
getWS
public static java.lang.String getWS()
Returns the target windowing system as specified on the Environment tab of the Plug-in Development > Target Platform preference page.- Returns:
- the target windowing system
-
getNL
public static java.lang.String getNL()
Returns the target locale as specified on the Environment tab of the Plug-in Development > Target Platform preference page.- Returns:
- the target locale
-
getOSArch
public static java.lang.String getOSArch()
Returns the target system architecture as specified on the Environment tab of the Plug-in Development > Target Platform preference page.- Returns:
- the target system architecture
-
getApplications
public static java.lang.String[] getApplications()
Returns a list of identifiers for all available applications (i.e.org.eclipse.core.runtime.applicationsextensions) declared in the workspace and target platform plug-ins.If a workspace plug-in has the same ID as a plug-in in the target platform, the extensions declared in the target counterpart are ignored.
- Returns:
- a list of identifiers for all available applications
-
getProducts
public static java.lang.String[] getProducts()
Returns a list of identifiers for all available products (i.e.org.eclipse.core.runtime.productsextensions) declared in the workspace and target platform plug-ins.If a workspace plug-in has the same ID as a plug-in in the target platform, the extensions declared in the target counterpart are ignored.
- Returns:
- a list of identifiers for all available products
-
getDefaultProduct
public static java.lang.String getDefaultProduct()
Returns the ID for the default product (org.eclipse.core.runtime.productsextension) for the current target platform, ornullif none can be determined. If any of the- Returns:
- the ID for the default product or
nullif none could be determined
-
getDefaultApplication
public static java.lang.String getDefaultApplication()
Returns the ID for the default application (org.eclipse.core.runtime.applicationsextension) for the current target platform.If none could be determined, then
org.eclipse.ui.ide.workbenchapplication is returned.- Returns:
- the default application to run when launching an Eclipse application
-
createPlatformConfiguration
@Deprecated public static void createPlatformConfiguration(java.io.File location, IPluginModelBase[] plugins, IPluginModelBase brandingPlugin) throws CoreExceptionDeprecated.Old Update Manager is planned for removal and so it this API.Creates a platform configuration to be used when launching an Eclipse application that uses Update Manager as a configurator- Parameters:
location- the location where the configuration should be persistedplugins- the list of plug-ins that make up the configurationbrandingPlugin- if specified, a entry for the feature containing the branding plug-in will be created in the platform configuration- Throws:
CoreException- an exception is thrown if there was a problem writing the platform configuration file- Restriction:
- Old Update Manager is planned for removal and so it this API. See bug 527378 for details.
-
getBundleList
public static java.lang.String getBundleList()
The comma-separated list of bundles which are automatically installed and optionally started.Each entry if of the form <bundleID>[@ [<startlevel>] [":start"]] If the startlevel is omitted then the framework will use the default start level for the bundle. If the "start" tag is added then the bundle will be marked as started after being installed.
The list computed is based on the osgi.bundles key found in the config.ini file of the target platform. If no such key is found, then a suitable list is computed based on the target platform version.
- Returns:
- a comma-separated list of bundles that are automatically installed and optionally started when a runtime Eclipse application is launched.
-
-