TPTP 4.4.0 Testing Tools Project
Internal API Specification

org.eclipse.tptp.test.tools.junit.plugin.internal.util
Class WorkbenchLocationUtil

java.lang.Object
  extended byorg.eclipse.tptp.test.tools.junit.plugin.internal.util.WorkbenchLocationUtil

public class WorkbenchLocationUtil
extends java.lang.Object

This class provides static methods for manipulating locations with a "workbench" property group. Note that "remote" properties are transient properties used by the execution framework and are not meant to be persisted in user-created models. The constants in this class provide the properties names, however their use should be avoided as most as possible, and the use of getters/setters should be preferred.

Since:
4.1

Field Summary
static java.lang.String ALLOW_REUSE_PROPERTY
           
static java.lang.String APPLICATION_NAME_PROPERTY
           
static java.lang.String CLEAR_CONFIGURATION_DIRECTORY_PROPERTY
           
static java.lang.String CLEAR_WORKSPACE_DIRECTORY_PROPERTY
           
static java.lang.String CONFIG_INI_TEMPLATE_LOCATION_PROPERTY
           
static java.lang.String CONFIGURATION_DIRECTORY_PROPERTY
           
static java.lang.String ECLIPSE_LOCATION_PROPERTY
           
static java.lang.String EXTERNAL_PLUGINS_PROPERTY
           
static java.lang.String GENERATE_DEFAULT_CONFIG_INI_PROPERTY
           
static java.lang.String HEADLESS_PROPERTY
           
static java.lang.String PRODUCT_NAME_PROPERTY
           
static java.lang.String PROGRAM_ARGUMENTS_PROPERTY
           
static java.lang.String PROPERTY_GROUP_ID
           
static java.lang.String RUN_IN_UI_THREAD_PROPERTY
           
static java.lang.String USE_DEFAULT_PLUGINS_PROPERTY
           
static java.lang.String VM_ARGUMENTS_PROPERTY
           
static java.lang.String WORKSPACE_DIRECTORY_PROPERTY
           
 
Constructor Summary
WorkbenchLocationUtil()
           
 
Method Summary
static org.eclipse.hyades.models.common.configuration.CFGPropertyGroup createWorkbenchPropertyGroup()
          Creates a Workbench property group.
static org.eclipse.hyades.models.common.configuration.CFGLocation findWorkbenchLocation(org.eclipse.hyades.models.common.configuration.CFGClass rootResource, org.eclipse.hyades.models.common.testprofile.TPFDeployment deployment)
          Finds the location that describes the workbench where a test should run, in the specified deployment.
static boolean getAllowReuse(org.eclipse.hyades.models.common.configuration.CFGPropertyGroup group)
           
static java.lang.String getApplicationName(org.eclipse.hyades.models.common.configuration.CFGPropertyGroup group)
           
static java.lang.String[] getAvailableApplicationNames()
          Returns the application names available on the target eclipse instance.
static java.lang.Object[] getAvailableExternalPlugins()
           
static java.lang.String[] getAvailableProductNames()
          Returns the product names available on the target eclipse instance.
static boolean getClearConfigurationDirectory(org.eclipse.hyades.models.common.configuration.CFGPropertyGroup group)
           
static boolean getClearWorkspaceDirectory(org.eclipse.hyades.models.common.configuration.CFGPropertyGroup group)
           
static java.lang.String getConfigIniTemplateLocation(org.eclipse.hyades.models.common.configuration.CFGPropertyGroup group)
           
static java.lang.String getConfigurationDirectory(org.eclipse.hyades.models.common.configuration.CFGPropertyGroup group)
           
static java.lang.String getDefaultApplicationName()
           
static java.lang.String getDefaultProductname()
           
static java.lang.String getEclipseLocation(org.eclipse.hyades.models.common.configuration.CFGPropertyGroup group)
           
static java.util.Collection getExternalPlugins(org.eclipse.hyades.models.common.configuration.CFGPropertyGroup group)
           
static boolean getGenerateDefaultConfigIni(org.eclipse.hyades.models.common.configuration.CFGPropertyGroup group)
           
static boolean getHeadless(org.eclipse.hyades.models.common.configuration.CFGPropertyGroup group)
           
static java.lang.String getLocationName(org.eclipse.hyades.models.common.configuration.CFGLocation location)
           
static java.lang.String getProductName(org.eclipse.hyades.models.common.configuration.CFGPropertyGroup group)
           
static java.lang.String getProgramArguments(org.eclipse.hyades.models.common.configuration.CFGPropertyGroup group)
           
static java.util.Collection getRemoteBundleLocations(org.eclipse.hyades.models.common.configuration.CFGPropertyGroup group)
           
static java.lang.String getRemoteConfigurationDirectory(org.eclipse.hyades.models.common.configuration.CFGPropertyGroup group)
           
static boolean getRemoteEclipseIsRuning(org.eclipse.hyades.models.common.configuration.CFGPropertyGroup group)
           
static java.lang.String getRemoteTestBundleSymbolicName(org.eclipse.hyades.models.common.configuration.CFGPropertyGroup group)
           
static java.lang.String getRemoteWorkspaceDirectory(org.eclipse.hyades.models.common.configuration.CFGPropertyGroup group)
           
static boolean getRunInUIThread(org.eclipse.hyades.models.common.configuration.CFGPropertyGroup group)
           
static boolean getUseDefaultPlugins(org.eclipse.hyades.models.common.configuration.CFGPropertyGroup group)
           
static java.lang.String getVMArguments(org.eclipse.hyades.models.common.configuration.CFGPropertyGroup group)
           
static org.eclipse.hyades.models.common.configuration.CFGPropertyGroup getWorbenchPropertyGroup(org.eclipse.hyades.models.common.configuration.CFGLocation location)
          Returns the workbench property group, if any, of a location.
static java.lang.String getWorkspaceDirectory(org.eclipse.hyades.models.common.configuration.CFGPropertyGroup group)
           
static void setAllowReuse(org.eclipse.hyades.models.common.configuration.CFGPropertyGroup group, boolean value)
           
static void setApplicationName(org.eclipse.hyades.models.common.configuration.CFGPropertyGroup group, java.lang.String value)
           
static void setClearConfigurationDirectory(org.eclipse.hyades.models.common.configuration.CFGPropertyGroup group, boolean value)
           
static void setClearWorkspaceDirectory(org.eclipse.hyades.models.common.configuration.CFGPropertyGroup group, boolean value)
           
static void setConfigIniTemplateLocation(org.eclipse.hyades.models.common.configuration.CFGPropertyGroup group, java.lang.String value)
           
static void setConfigurationDirectory(org.eclipse.hyades.models.common.configuration.CFGPropertyGroup group, java.lang.String value)
           
static void setEclipseLocation(org.eclipse.hyades.models.common.configuration.CFGPropertyGroup group, java.lang.String value)
           
static void setExternalPlugins(org.eclipse.hyades.models.common.configuration.CFGPropertyGroup group, java.util.Collection value)
           
static void setGenerateDefaultConfigIni(org.eclipse.hyades.models.common.configuration.CFGPropertyGroup group, boolean value)
           
static void setHeadless(org.eclipse.hyades.models.common.configuration.CFGPropertyGroup group, boolean value)
           
static void setProductName(org.eclipse.hyades.models.common.configuration.CFGPropertyGroup group, java.lang.String value)
           
static void setProgramArguments(org.eclipse.hyades.models.common.configuration.CFGPropertyGroup group, java.lang.String directory)
           
static void setRemoteBundleLocations(org.eclipse.hyades.models.common.configuration.CFGPropertyGroup group, java.util.Collection locations)
           
static void setRemoteConfigurationDirectory(org.eclipse.hyades.models.common.configuration.CFGPropertyGroup group, java.lang.String directory)
           
static void setRemoteEclipseIsRuning(org.eclipse.hyades.models.common.configuration.CFGPropertyGroup group, boolean value)
           
static void setRemoteTestBundleSymbolicName(org.eclipse.hyades.models.common.configuration.CFGPropertyGroup group, java.lang.String value)
           
static void setRemoteWorkspaceDirectory(org.eclipse.hyades.models.common.configuration.CFGPropertyGroup group, java.lang.String directory)
           
static void setRunInUIThread(org.eclipse.hyades.models.common.configuration.CFGPropertyGroup group, boolean value)
           
static void setUseDefaultPlugins(org.eclipse.hyades.models.common.configuration.CFGPropertyGroup group, boolean value)
           
static void setVMArguments(org.eclipse.hyades.models.common.configuration.CFGPropertyGroup group, java.lang.String directory)
           
static void setWorkspaceDirectory(org.eclipse.hyades.models.common.configuration.CFGPropertyGroup group, java.lang.String value)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PROPERTY_GROUP_ID

public static final java.lang.String PROPERTY_GROUP_ID
See Also:
Constant Field Values

ECLIPSE_LOCATION_PROPERTY

public static final java.lang.String ECLIPSE_LOCATION_PROPERTY
See Also:
Constant Field Values

ALLOW_REUSE_PROPERTY

public static final java.lang.String ALLOW_REUSE_PROPERTY
See Also:
Constant Field Values

WORKSPACE_DIRECTORY_PROPERTY

public static final java.lang.String WORKSPACE_DIRECTORY_PROPERTY
See Also:
Constant Field Values

CLEAR_WORKSPACE_DIRECTORY_PROPERTY

public static final java.lang.String CLEAR_WORKSPACE_DIRECTORY_PROPERTY
See Also:
Constant Field Values

HEADLESS_PROPERTY

public static final java.lang.String HEADLESS_PROPERTY
See Also:
Constant Field Values

APPLICATION_NAME_PROPERTY

public static final java.lang.String APPLICATION_NAME_PROPERTY
See Also:
Constant Field Values

PRODUCT_NAME_PROPERTY

public static final java.lang.String PRODUCT_NAME_PROPERTY
See Also:
Constant Field Values

RUN_IN_UI_THREAD_PROPERTY

public static final java.lang.String RUN_IN_UI_THREAD_PROPERTY
See Also:
Constant Field Values

PROGRAM_ARGUMENTS_PROPERTY

public static final java.lang.String PROGRAM_ARGUMENTS_PROPERTY
See Also:
Constant Field Values

VM_ARGUMENTS_PROPERTY

public static final java.lang.String VM_ARGUMENTS_PROPERTY
See Also:
Constant Field Values

CONFIGURATION_DIRECTORY_PROPERTY

public static final java.lang.String CONFIGURATION_DIRECTORY_PROPERTY
See Also:
Constant Field Values

CLEAR_CONFIGURATION_DIRECTORY_PROPERTY

public static final java.lang.String CLEAR_CONFIGURATION_DIRECTORY_PROPERTY
See Also:
Constant Field Values

GENERATE_DEFAULT_CONFIG_INI_PROPERTY

public static final java.lang.String GENERATE_DEFAULT_CONFIG_INI_PROPERTY
See Also:
Constant Field Values

CONFIG_INI_TEMPLATE_LOCATION_PROPERTY

public static final java.lang.String CONFIG_INI_TEMPLATE_LOCATION_PROPERTY
See Also:
Constant Field Values

USE_DEFAULT_PLUGINS_PROPERTY

public static final java.lang.String USE_DEFAULT_PLUGINS_PROPERTY
See Also:
Constant Field Values

EXTERNAL_PLUGINS_PROPERTY

public static final java.lang.String EXTERNAL_PLUGINS_PROPERTY
See Also:
Constant Field Values
Constructor Detail

WorkbenchLocationUtil

public WorkbenchLocationUtil()
Method Detail

createWorkbenchPropertyGroup

public static org.eclipse.hyades.models.common.configuration.CFGPropertyGroup createWorkbenchPropertyGroup()
Creates a Workbench property group. The property group is created with default values.


getWorbenchPropertyGroup

public static org.eclipse.hyades.models.common.configuration.CFGPropertyGroup getWorbenchPropertyGroup(org.eclipse.hyades.models.common.configuration.CFGLocation location)
Returns the workbench property group, if any, of a location.

Parameters:
location - A location.
Returns:
The workbench property group, or null if the location does not contain one.

getLocationName

public static java.lang.String getLocationName(org.eclipse.hyades.models.common.configuration.CFGLocation location)

findWorkbenchLocation

public static org.eclipse.hyades.models.common.configuration.CFGLocation findWorkbenchLocation(org.eclipse.hyades.models.common.configuration.CFGClass rootResource,
                                                                                               org.eclipse.hyades.models.common.testprofile.TPFDeployment deployment)
Finds the location that describes the workbench where a test should run, in the specified deployment.

Parameters:
deployment -
Returns:
A location containing a workbench property group, or null if it could not be found.

setEclipseLocation

public static void setEclipseLocation(org.eclipse.hyades.models.common.configuration.CFGPropertyGroup group,
                                      java.lang.String value)

getEclipseLocation

public static java.lang.String getEclipseLocation(org.eclipse.hyades.models.common.configuration.CFGPropertyGroup group)

setWorkspaceDirectory

public static void setWorkspaceDirectory(org.eclipse.hyades.models.common.configuration.CFGPropertyGroup group,
                                         java.lang.String value)

getWorkspaceDirectory

public static java.lang.String getWorkspaceDirectory(org.eclipse.hyades.models.common.configuration.CFGPropertyGroup group)

setApplicationName

public static void setApplicationName(org.eclipse.hyades.models.common.configuration.CFGPropertyGroup group,
                                      java.lang.String value)

getApplicationName

public static java.lang.String getApplicationName(org.eclipse.hyades.models.common.configuration.CFGPropertyGroup group)

setRemoteBundleLocations

public static void setRemoteBundleLocations(org.eclipse.hyades.models.common.configuration.CFGPropertyGroup group,
                                            java.util.Collection locations)

getRemoteBundleLocations

public static java.util.Collection getRemoteBundleLocations(org.eclipse.hyades.models.common.configuration.CFGPropertyGroup group)

setRemoteTestBundleSymbolicName

public static void setRemoteTestBundleSymbolicName(org.eclipse.hyades.models.common.configuration.CFGPropertyGroup group,
                                                   java.lang.String value)

getRemoteTestBundleSymbolicName

public static java.lang.String getRemoteTestBundleSymbolicName(org.eclipse.hyades.models.common.configuration.CFGPropertyGroup group)

setRemoteEclipseIsRuning

public static void setRemoteEclipseIsRuning(org.eclipse.hyades.models.common.configuration.CFGPropertyGroup group,
                                            boolean value)

getRemoteEclipseIsRuning

public static boolean getRemoteEclipseIsRuning(org.eclipse.hyades.models.common.configuration.CFGPropertyGroup group)

setClearWorkspaceDirectory

public static void setClearWorkspaceDirectory(org.eclipse.hyades.models.common.configuration.CFGPropertyGroup group,
                                              boolean value)

getClearWorkspaceDirectory

public static boolean getClearWorkspaceDirectory(org.eclipse.hyades.models.common.configuration.CFGPropertyGroup group)

setConfigurationDirectory

public static void setConfigurationDirectory(org.eclipse.hyades.models.common.configuration.CFGPropertyGroup group,
                                             java.lang.String value)

getConfigurationDirectory

public static java.lang.String getConfigurationDirectory(org.eclipse.hyades.models.common.configuration.CFGPropertyGroup group)

setClearConfigurationDirectory

public static void setClearConfigurationDirectory(org.eclipse.hyades.models.common.configuration.CFGPropertyGroup group,
                                                  boolean value)

getClearConfigurationDirectory

public static boolean getClearConfigurationDirectory(org.eclipse.hyades.models.common.configuration.CFGPropertyGroup group)

setExternalPlugins

public static void setExternalPlugins(org.eclipse.hyades.models.common.configuration.CFGPropertyGroup group,
                                      java.util.Collection value)

getExternalPlugins

public static java.util.Collection getExternalPlugins(org.eclipse.hyades.models.common.configuration.CFGPropertyGroup group)

setUseDefaultPlugins

public static void setUseDefaultPlugins(org.eclipse.hyades.models.common.configuration.CFGPropertyGroup group,
                                        boolean value)

getUseDefaultPlugins

public static boolean getUseDefaultPlugins(org.eclipse.hyades.models.common.configuration.CFGPropertyGroup group)

setProductName

public static void setProductName(org.eclipse.hyades.models.common.configuration.CFGPropertyGroup group,
                                  java.lang.String value)

getProductName

public static java.lang.String getProductName(org.eclipse.hyades.models.common.configuration.CFGPropertyGroup group)

setGenerateDefaultConfigIni

public static void setGenerateDefaultConfigIni(org.eclipse.hyades.models.common.configuration.CFGPropertyGroup group,
                                               boolean value)

getGenerateDefaultConfigIni

public static boolean getGenerateDefaultConfigIni(org.eclipse.hyades.models.common.configuration.CFGPropertyGroup group)

setConfigIniTemplateLocation

public static void setConfigIniTemplateLocation(org.eclipse.hyades.models.common.configuration.CFGPropertyGroup group,
                                                java.lang.String value)

getConfigIniTemplateLocation

public static java.lang.String getConfigIniTemplateLocation(org.eclipse.hyades.models.common.configuration.CFGPropertyGroup group)

setRemoteConfigurationDirectory

public static void setRemoteConfigurationDirectory(org.eclipse.hyades.models.common.configuration.CFGPropertyGroup group,
                                                   java.lang.String directory)

getRemoteConfigurationDirectory

public static java.lang.String getRemoteConfigurationDirectory(org.eclipse.hyades.models.common.configuration.CFGPropertyGroup group)

setRemoteWorkspaceDirectory

public static void setRemoteWorkspaceDirectory(org.eclipse.hyades.models.common.configuration.CFGPropertyGroup group,
                                               java.lang.String directory)

getRemoteWorkspaceDirectory

public static java.lang.String getRemoteWorkspaceDirectory(org.eclipse.hyades.models.common.configuration.CFGPropertyGroup group)

setVMArguments

public static void setVMArguments(org.eclipse.hyades.models.common.configuration.CFGPropertyGroup group,
                                  java.lang.String directory)

getVMArguments

public static java.lang.String getVMArguments(org.eclipse.hyades.models.common.configuration.CFGPropertyGroup group)

setProgramArguments

public static void setProgramArguments(org.eclipse.hyades.models.common.configuration.CFGPropertyGroup group,
                                       java.lang.String directory)

getProgramArguments

public static java.lang.String getProgramArguments(org.eclipse.hyades.models.common.configuration.CFGPropertyGroup group)

setAllowReuse

public static void setAllowReuse(org.eclipse.hyades.models.common.configuration.CFGPropertyGroup group,
                                 boolean value)

getAllowReuse

public static boolean getAllowReuse(org.eclipse.hyades.models.common.configuration.CFGPropertyGroup group)

setHeadless

public static void setHeadless(org.eclipse.hyades.models.common.configuration.CFGPropertyGroup group,
                               boolean value)

getHeadless

public static boolean getHeadless(org.eclipse.hyades.models.common.configuration.CFGPropertyGroup group)

setRunInUIThread

public static void setRunInUIThread(org.eclipse.hyades.models.common.configuration.CFGPropertyGroup group,
                                    boolean value)

getRunInUIThread

public static boolean getRunInUIThread(org.eclipse.hyades.models.common.configuration.CFGPropertyGroup group)

getAvailableApplicationNames

public static java.lang.String[] getAvailableApplicationNames()
Returns the application names available on the target eclipse instance. Important: the current implementation works only if the location matches exactly the current eclipse target platform as defined in PDE preferences.

Returns:

getDefaultApplicationName

public static java.lang.String getDefaultApplicationName()

getAvailableProductNames

public static java.lang.String[] getAvailableProductNames()
Returns the product names available on the target eclipse instance. Important: the current implementation works only if the location matches exactly the current eclipse target platform as defined in PDE preferences.

Returns:

getDefaultProductname

public static java.lang.String getDefaultProductname()

getAvailableExternalPlugins

public static java.lang.Object[] getAvailableExternalPlugins()

TPTP 4.4.0 Testing Tools Project
Internal API Specification