org.eclipse.jpt.jpa.core.resource
Class AbstractXmlResourceProvider
java.lang.Object
org.eclipse.jpt.jpa.core.resource.AbstractXmlResourceProvider
- All Implemented Interfaces:
- org.eclipse.jem.util.emf.workbench.IEMFContextContributor, JpaXmlResourceProvider, org.eclipse.wst.common.internal.emfworkbench.validateedit.ResourceStateInputProvider, org.eclipse.wst.common.internal.emfworkbench.validateedit.ResourceStateValidator
public abstract class AbstractXmlResourceProvider
- extends java.lang.Object
- implements JpaXmlResourceProvider, org.eclipse.jem.util.emf.workbench.IEMFContextContributor, org.eclipse.wst.common.internal.emfworkbench.validateedit.ResourceStateInputProvider, org.eclipse.wst.common.internal.emfworkbench.validateedit.ResourceStateValidator
Provisional API: This interface is part of an interim API that is still
under development and expected to change significantly before reaching
stability. It is available at this early stage to solicit feedback from
pioneering adopters on the understanding that any code that uses this API
will almost certainly be broken (repeatedly) as the API evolves.
- Since:
- 2.2
- Version:
- 2.3
| Fields inherited from interface org.eclipse.wst.common.internal.emfworkbench.validateedit.ResourceStateValidator |
OK_STATUS |
|
Constructor Summary |
AbstractXmlResourceProvider(org.eclipse.core.resources.IProject project,
org.eclipse.core.runtime.IPath resourcePath,
org.eclipse.core.runtime.content.IContentType contentType)
Create a new AbstractResourceModelProvider for the given project and
resourcePath. |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AbstractXmlResourceProvider
public AbstractXmlResourceProvider(org.eclipse.core.resources.IProject project,
org.eclipse.core.runtime.IPath resourcePath,
org.eclipse.core.runtime.content.IContentType contentType)
- Create a new AbstractResourceModelProvider for the given project and
resourcePath. The resourcePath may be either
a) an absolute workspace-relative platform resource path (e.g. "/MyProject/src/META-INF/foobar.xml")
or b) a relative runtime path (e.g. "META-INF/foobar.xml".)
In either case,
buildFileUri(IPath) will attempt to build an absolutely pathed
URI for the given path.
getXmlResource
public JpaXmlResource getXmlResource()
- Return the resource, if it exists. If no file exists for this resource,
this will return a stub resource. You must call #createResource() to
create the file on the file system.
- Specified by:
getXmlResource in interface JpaXmlResourceProvider
createFileAndResource
public JpaXmlResource createFileAndResource(java.lang.Object config,
org.eclipse.core.runtime.IProgressMonitor monitor)
throws org.eclipse.core.runtime.CoreException
- This will actually create the underlying file and the JpaXmlResource that corresponds to it.
It also populates the root of the file.
- Parameters:
config - - A configuration object used to specify options for creation of the resource
- Throws:
org.eclipse.core.runtime.CoreException
addListener
public void addListener(JpaXmlResourceProviderListener listener)
removeListener
public void removeListener(JpaXmlResourceProviderListener listener)
getProject
public org.eclipse.core.resources.IProject getProject()
validateEdit
public org.eclipse.core.runtime.IStatus validateEdit(java.lang.Object context)
- Specified by:
validateEdit in interface JpaXmlResourceProvider
primaryContributeToContext
public void primaryContributeToContext(org.eclipse.jem.util.emf.workbench.EMFWorkbenchContextBase context)
- Specified by:
primaryContributeToContext in interface org.eclipse.jem.util.emf.workbench.IEMFContextContributor
secondaryContributeToContext
public void secondaryContributeToContext(org.eclipse.jem.util.emf.workbench.EMFWorkbenchContextBase aNature)
- Specified by:
secondaryContributeToContext in interface org.eclipse.jem.util.emf.workbench.IEMFContextContributor
getStateValidator
public org.eclipse.wst.common.internal.emfworkbench.validateedit.ResourceStateValidator getStateValidator()
checkActivation
public void checkActivation(org.eclipse.wst.common.internal.emfworkbench.validateedit.ResourceStateValidatorPresenter presenter)
throws org.eclipse.core.runtime.CoreException
- Specified by:
checkActivation in interface org.eclipse.wst.common.internal.emfworkbench.validateedit.ResourceStateValidator
- Throws:
org.eclipse.core.runtime.CoreException
lostActivation
public void lostActivation(org.eclipse.wst.common.internal.emfworkbench.validateedit.ResourceStateValidatorPresenter presenter)
throws org.eclipse.core.runtime.CoreException
- Specified by:
lostActivation in interface org.eclipse.wst.common.internal.emfworkbench.validateedit.ResourceStateValidator
- Throws:
org.eclipse.core.runtime.CoreException
validateState
public org.eclipse.core.runtime.IStatus validateState(org.eclipse.wst.common.internal.emfworkbench.validateedit.ResourceStateValidatorPresenter presenter)
throws org.eclipse.core.runtime.CoreException
- Specified by:
validateState in interface org.eclipse.wst.common.internal.emfworkbench.validateedit.ResourceStateValidator
- Throws:
org.eclipse.core.runtime.CoreException
checkSave
public boolean checkSave(org.eclipse.wst.common.internal.emfworkbench.validateedit.ResourceStateValidatorPresenter presenter)
throws org.eclipse.core.runtime.CoreException
- Specified by:
checkSave in interface org.eclipse.wst.common.internal.emfworkbench.validateedit.ResourceStateValidator
- Throws:
org.eclipse.core.runtime.CoreException
checkReadOnly
public boolean checkReadOnly()
- Specified by:
checkReadOnly in interface org.eclipse.wst.common.internal.emfworkbench.validateedit.ResourceStateValidator
isDirty
public boolean isDirty()
- Specified by:
isDirty in interface org.eclipse.wst.common.internal.emfworkbench.validateedit.ResourceStateInputProvider
getNonResourceFiles
public java.util.List getNonResourceFiles()
- Specified by:
getNonResourceFiles in interface org.eclipse.wst.common.internal.emfworkbench.validateedit.ResourceStateInputProvider
getNonResourceInconsistentFiles
public java.util.List getNonResourceInconsistentFiles()
- Specified by:
getNonResourceInconsistentFiles in interface org.eclipse.wst.common.internal.emfworkbench.validateedit.ResourceStateInputProvider
getResources
public java.util.List getResources()
- Specified by:
getResources in interface org.eclipse.wst.common.internal.emfworkbench.validateedit.ResourceStateInputProvider
cacheNonResourceValidateState
public void cacheNonResourceValidateState(java.util.List roNonResourceFiles)
- Specified by:
cacheNonResourceValidateState in interface org.eclipse.wst.common.internal.emfworkbench.validateedit.ResourceStateInputProvider