public class ProjectConfigurationContext extends Object implements ConfigurationContext
Constructor and Description |
---|
ProjectConfigurationContext(org.eclipse.ui.IEditorInput editorInput)
Convenience constructor.
|
ProjectConfigurationContext(org.eclipse.core.resources.IProject project)
Initiate with the
IProject providing context. |
ProjectConfigurationContext(org.eclipse.core.resources.IProject project,
org.eclipse.core.runtime.IProgressMonitor monitor)
Initiate with the
IProject providing context. |
Modifier and Type | Method and Description |
---|---|
ConfigurationItem |
createConfigurationItem(String location,
InputStream configuration)
Creates a new
ConfigurationItem at the relative location. |
void |
deleteConfigurationItem(String path)
Deletes the
ConfigurationItem at the relative location. |
ConfigurationItem |
getConfigurationItem(String location)
Obtains the
ConfigurationItem at the relative location. |
String |
getLocation()
Obtains the location for this
ConfigurationContext . |
org.eclipse.core.resources.IProject |
getProject()
Obtain the
IProject . |
static org.eclipse.core.resources.IProject |
getProject(org.eclipse.ui.IEditorInput editorInput)
Obtains the
IProject from the input IEditorInput . |
boolean |
isReadOnly()
Indicates if the configuration is read-only.
|
public ProjectConfigurationContext(org.eclipse.core.resources.IProject project)
IProject
providing context.project
- IProject
providing context.public ProjectConfigurationContext(org.eclipse.ui.IEditorInput editorInput)
editorInput
- IEditorInput
.public ProjectConfigurationContext(org.eclipse.core.resources.IProject project, org.eclipse.core.runtime.IProgressMonitor monitor)
IProject
providing context.project
- IProject
providing context.monitor
- IProgressMonitor
. If only retrieving may specify
null
.public static org.eclipse.core.resources.IProject getProject(org.eclipse.ui.IEditorInput editorInput)
IProject
from the input IEditorInput
.editorInput
- IEditorInput
.IProject
for the input IEditorInput
.public org.eclipse.core.resources.IProject getProject()
IProject
.IProject
.public String getLocation()
ConfigurationContext
Obtains the location for this ConfigurationContext
.
This value is used in the equality of ConfigurationContext
instances.
getLocation
in interface ConfigurationContext
ConfigurationContext
.public ConfigurationItem getConfigurationItem(String location) throws Exception
ConfigurationContext
ConfigurationItem
at the relative location.getConfigurationItem
in interface ConfigurationContext
location
- Relative location of the ConfigurationItem
to obtain.ConfigurationItem
.Exception
- If can not obtain a ConfigurationItem
at the relative
location.public boolean isReadOnly()
ConfigurationContext
isReadOnly
in interface ConfigurationContext
true
should the configuration be read-only.public ConfigurationItem createConfigurationItem(String location, InputStream configuration) throws Exception
ConfigurationContext
ConfigurationItem
at the relative location.createConfigurationItem
in interface ConfigurationContext
location
- Relative location of the ConfigurationItem
to create.configuration
- Configuration for the ConfigurationItem
.ConfigurationItem
.Exception
- If fails to create the ConfigurationItem
.ReadOnlyConfigurationException
- Should the underlying implementation be read-only.public void deleteConfigurationItem(String path) throws Exception, ReadOnlyConfigurationException
ConfigurationContext
ConfigurationItem
at the relative location.deleteConfigurationItem
in interface ConfigurationContext
path
- Relative location of the ConfigurationItem
to delete.Exception
- If can not delete the ConfigurationItem
at the
relative location.ReadOnlyConfigurationException
- Should the underlying implementation be read-only.Copyright © 2005–2016. All rights reserved.