Package org.eclipse.team.core
Class ProjectSetSerializationContext
java.lang.Object
org.eclipse.team.core.ProjectSetSerializationContext
The context in which project serialization occurs.
The class may be subclassed to represent different serialization contexts.
- Since:
- 3.0
-
Constructor Summary
ConstructorDescriptionCreate a serialization context with no filenameProjectSetSerializationContext
(String filename) Create a serialization context and set the filename of the file that does or is to contain the project set. -
Method Summary
Modifier and TypeMethodDescriptionIProject[]
confirmOverwrite
(IProject[] projects) Given an array of projects that currently exist in the workspace determine which of those projects should be overwritten.Return the name of the file to or from which the project set is being loaded or saved.getProperty
(String key) Return the property for the given key ornull
if the property is not set.getShell()
Return a org.eclipse.swt.Shell if there is a UI context ornull
if executing headless.void
setProperty
(String key, Object value) Set a property of this context.
-
Constructor Details
-
ProjectSetSerializationContext
public ProjectSetSerializationContext()Create a serialization context with no filename -
ProjectSetSerializationContext
Create a serialization context and set the filename of the file that does or is to contain the project set.- Parameters:
filename
- a filename ornull
-
-
Method Details
-
confirmOverwrite
Given an array of projects that currently exist in the workspace determine which of those projects should be overwritten.This default implementation always returns an empty array indicating that no existing projects should be overwritten. Subclasses may override this as appropriate.
- Parameters:
projects
- an array of projects currently existing in the workspace that are desired to be overwritten. (notnull
, contains nonull
s)- Returns:
- an array of zero or more projects that should be overwritten
or
null
if the operation is to be canceled - Throws:
TeamException
- on failure
-
getShell
Return a org.eclipse.swt.Shell if there is a UI context ornull
if executing headless.- Returns:
- the shell or
null
-
getFilename
Return the name of the file to or from which the project set is being loaded or saved. This may benull
.- Returns:
- the filename or
null
-
setProperty
Set a property of this context.- Parameters:
key
- the property keyvalue
- the property value- Since:
- 3.3
-
getProperty
Return the property for the given key ornull
if the property is not set.- Parameters:
key
- the property key- Returns:
- the property value
- Since:
- 3.3
-