Interface IWorkspaceDescription
-
public interface IWorkspaceDescriptionA workspace description represents the workspace preferences. It can be used to query the current preferences and set new ones. The workspace preference values are stored in the preference store and are also accessible via the preference mechanism. Constants for the preference keys are found on theResourcesPluginclass.- See Also:
IWorkspace.getDescription(),IWorkspace.setDescription(IWorkspaceDescription),IWorkspace.newProjectDescription(String)- Restriction:
- This interface is not intended to be implemented by clients.
- Restriction:
- This interface is not intended to be extended by clients.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description String[]getBuildOrder()Returns the order in which projects in the workspace should be built.longgetFileStateLongevity()Returns the maximum length of time, in milliseconds, a file state should be kept in the local history.intgetMaxBuildIterations()Returns the maximum number of times that the workspace should rebuild when builders affect projects that have already been built.intgetMaxConcurrentBuilds()intgetMaxFileStates()Returns the maximum number of states per file that can be stored in the local history.longgetMaxFileStateSize()Returns the maximum permitted size of a file, in bytes, to be stored in the local history.longgetSnapshotInterval()Returns the interval between automatic workspace snapshots.booleanisApplyFileStatePolicy()Returns whether file states are discarded according to the policy specified bysetFileStateLongevity(long),setMaxFileStates(int)andsetMaxFileStateSize(long)methods.booleanisAutoBuilding()Returns whether this workspace performs autobuilds.voidsetApplyFileStatePolicy(boolean apply)Sets whether file states are discarded according to the policy specified bysetFileStateLongevity(long),setMaxFileStates(int)andsetMaxFileStateSize(long)methods.voidsetAutoBuilding(boolean value)Records whether this workspace performs autobuilds.voidsetBuildOrder(String[] value)Sets the order in which projects in the workspace should be built.voidsetFileStateLongevity(long time)Sets the maximum time, in milliseconds, a file state should be kept in the local history.voidsetMaxBuildIterations(int number)Sets the maximum number of times that the workspace should rebuild when builders affect projects that have already been built.voidsetMaxConcurrentBuilds(int n)Set the max number of builds that can happen concurrently during workspace build.voidsetMaxFileStates(int number)Sets the maximum number of states per file that can be stored in the local history.voidsetMaxFileStateSize(long size)Sets the maximum permitted size of a file, in bytes, to be stored in the local history.voidsetSnapshotInterval(long delay)Sets the interval between automatic workspace snapshots.
-
-
-
Method Detail
-
getBuildOrder
String[] getBuildOrder()
Returns the order in which projects in the workspace should be built. The returned value isnullif the workspace's default build order is being used.- Returns:
- the names of projects in the order they will be built,
or
nullif the default build order should be used - See Also:
setBuildOrder(String[]),ResourcesPlugin.PREF_BUILD_ORDER
-
getFileStateLongevity
long getFileStateLongevity()
Returns the maximum length of time, in milliseconds, a file state should be kept in the local history. This setting is ignored by the workspace whenisApplyFileStatePolicy()returnsfalse.- Returns:
- the maximum time a file state should be kept in the local history represented in milliseconds
- See Also:
setFileStateLongevity(long),isApplyFileStatePolicy(),ResourcesPlugin.PREF_FILE_STATE_LONGEVITY
-
getMaxBuildIterations
int getMaxBuildIterations()
Returns the maximum number of times that the workspace should rebuild when builders affect projects that have already been built.- Returns:
- the maximum number of times that the workspace should rebuild when builders affect projects that have already been built.
- Since:
- 2.1
- See Also:
setMaxBuildIterations(int),ResourcesPlugin.PREF_MAX_BUILD_ITERATIONS
-
getMaxFileStates
int getMaxFileStates()
Returns the maximum number of states per file that can be stored in the local history. This setting is ignored by the workspace whenisApplyFileStatePolicy()returnsfalse.- Returns:
- the maximum number of states per file that can be stored in the local history
- See Also:
setMaxFileStates(int),isApplyFileStatePolicy(),ResourcesPlugin.PREF_MAX_FILE_STATES
-
getMaxFileStateSize
long getMaxFileStateSize()
Returns the maximum permitted size of a file, in bytes, to be stored in the local history. This setting is ignored by the workspace whenisApplyFileStatePolicy()returnsfalse.- Returns:
- the maximum permitted size of a file to be stored in the local history
- See Also:
setMaxFileStateSize(long),isApplyFileStatePolicy(),ResourcesPlugin.PREF_MAX_FILE_STATE_SIZE
-
isApplyFileStatePolicy
boolean isApplyFileStatePolicy()
Returns whether file states are discarded according to the policy specified bysetFileStateLongevity(long),setMaxFileStates(int)andsetMaxFileStateSize(long)methods.- Returns:
trueif file states are removed due to the policy,falseotherwise- Since:
- 3.6
- See Also:
setApplyFileStatePolicy(boolean),setFileStateLongevity(long),setMaxFileStates(int),setMaxFileStateSize(long),ResourcesPlugin.PREF_APPLY_FILE_STATE_POLICY
-
getSnapshotInterval
long getSnapshotInterval()
Returns the interval between automatic workspace snapshots.- Returns:
- the amount of time in milliseconds between automatic workspace snapshots
- Since:
- 2.0
- See Also:
setSnapshotInterval(long),ResourcesPlugin.PREF_SNAPSHOT_INTERVAL
-
isAutoBuilding
boolean isAutoBuilding()
Returns whether this workspace performs autobuilds.- Returns:
trueif autobuilding is on, otherwisefalse- See Also:
setAutoBuilding(boolean),ResourcesPlugin.PREF_AUTO_BUILDING
-
setAutoBuilding
void setAutoBuilding(boolean value)
Records whether this workspace performs autobuilds.When autobuild is on, any changes made to a project and its resources automatically triggers an incremental build of the workspace.
Users must call
IWorkspace.setDescriptionbefore changes made to this description take effect.- Parameters:
value-trueto turn on autobuilding, andfalseto turn it off- See Also:
IWorkspace.setDescription(IWorkspaceDescription),isAutoBuilding(),ResourcesPlugin.PREF_AUTO_BUILDING
-
setBuildOrder
void setBuildOrder(String[] value)
Sets the order in which projects in the workspace should be built. Projects not named in this list are built in a default order defined by the workspace. Set this value tonullto use the default ordering for all projects. Projects not named in the list are built in unspecified order after all ordered projects.Users must call
IWorkspace.setDescriptionbefore changes made to this description take effect.- Parameters:
value- the names of projects in the order in which they are built, ornullto use the workspace's default order for all projects- See Also:
IWorkspace.setDescription(IWorkspaceDescription),getBuildOrder(),ResourcesPlugin.PREF_BUILD_ORDER
-
setFileStateLongevity
void setFileStateLongevity(long time)
Sets the maximum time, in milliseconds, a file state should be kept in the local history. This setting is ignored by the workspace whensetApplyFileStatePolicy(boolean)is set to false.Users must call
IWorkspace.setDescriptionbefore changes made to this description take effect.- Parameters:
time- the maximum number of milliseconds a file state should be kept in the local history- See Also:
IWorkspace.setDescription(IWorkspaceDescription),getFileStateLongevity(),setApplyFileStatePolicy(boolean),ResourcesPlugin.PREF_FILE_STATE_LONGEVITY
-
setMaxBuildIterations
void setMaxBuildIterations(int number)
Sets the maximum number of times that the workspace should rebuild when builders affect projects that have already been built.Users must call
IWorkspace.setDescriptionbefore changes made to this description take effect.- Parameters:
number- the maximum number of times that the workspace should rebuild when builders affect projects that have already been built.- Since:
- 2.1
- See Also:
IWorkspace.setDescription(IWorkspaceDescription),getMaxBuildIterations(),ResourcesPlugin.PREF_MAX_BUILD_ITERATIONS
-
setMaxFileStates
void setMaxFileStates(int number)
Sets the maximum number of states per file that can be stored in the local history. If the maximum number is reached, older states are removed in favor of new ones. This setting is ignored by the workspace whensetApplyFileStatePolicy(boolean)is set tofalse.Users must call
IWorkspace.setDescriptionbefore changes made to this description take effect.- Parameters:
number- the maximum number of states per file that can be stored in the local history- See Also:
IWorkspace.setDescription(IWorkspaceDescription),getMaxFileStates(),setApplyFileStatePolicy(boolean),ResourcesPlugin.PREF_MAX_FILE_STATES
-
setMaxFileStateSize
void setMaxFileStateSize(long size)
Sets the maximum permitted size of a file, in bytes, to be stored in the local history. This setting is ignored by the workspace whensetApplyFileStatePolicy(boolean)is set tofalse.Users must call
IWorkspace.setDescriptionbefore changes made to this description take effect.- Parameters:
size- the maximum permitted size of a file to be stored in the local history- See Also:
IWorkspace.setDescription(IWorkspaceDescription),getMaxFileStateSize(),setApplyFileStatePolicy(boolean),ResourcesPlugin.PREF_MAX_FILE_STATE_SIZE
-
setApplyFileStatePolicy
void setApplyFileStatePolicy(boolean apply)
Sets whether file states are discarded according to the policy specified bysetFileStateLongevity(long),setMaxFileStates(int)andsetMaxFileStateSize(long)methods.Users must call
IWorkspace.setDescriptionbefore changes made to this description take effect.- Parameters:
apply-trueif file states are removed due to the policy,falseotherwise- Since:
- 3.6
- See Also:
IWorkspace.setDescription(IWorkspaceDescription),setFileStateLongevity(long),setMaxFileStates(int),setMaxFileStateSize(long),isApplyFileStatePolicy(),ResourcesPlugin.PREF_APPLY_FILE_STATE_POLICY
-
setSnapshotInterval
void setSnapshotInterval(long delay)
Sets the interval between automatic workspace snapshots. The new interval will only take effect after the next snapshot.Users must call
IWorkspace.setDescriptionbefore changes made to this description take effect.- Parameters:
delay- the amount of time in milliseconds between automatic workspace snapshots- Since:
- 2.0
- See Also:
IWorkspace.setDescription(IWorkspaceDescription),getSnapshotInterval(),ResourcesPlugin.PREF_SNAPSHOT_INTERVAL
-
setMaxConcurrentBuilds
void setMaxConcurrentBuilds(int n)
Set the max number of builds that can happen concurrently during workspace build.- Parameters:
n- max number of jobs simultaneously allocated to workspace build. 1 means no job (current thread).- Since:
- 3.13
-
getMaxConcurrentBuilds
int getMaxConcurrentBuilds()
- Returns:
- the max number of builds that can happen concurrently during workspace build. 1 means no job (current thread).
- Since:
- 3.13
-
-