org.eclipse.jpt.core.resource
Class AbstractResourceModelProvider<R extends JpaXmlResource>
java.lang.Object
org.eclipse.jpt.core.resource.AbstractResourceModelProvider<R>
- All Implemented Interfaces:
- JpaResourceModelProvider, org.eclipse.wst.common.internal.emfworkbench.validateedit.ResourceStateInputProvider, org.eclipse.wst.common.internal.emfworkbench.validateedit.ResourceStateValidator
public abstract class AbstractResourceModelProvider<R extends JpaXmlResource>
- extends java.lang.Object
- implements JpaResourceModelProvider, 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.
| Fields inherited from interface org.eclipse.wst.common.internal.emfworkbench.validateedit.ResourceStateValidator |
OK_STATUS |
|
Constructor Summary |
AbstractResourceModelProvider(org.eclipse.core.resources.IProject project,
org.eclipse.core.runtime.IPath resourcePath)
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 |
AbstractResourceModelProvider
public AbstractResourceModelProvider(org.eclipse.core.resources.IProject project,
org.eclipse.core.runtime.IPath resourcePath)
- Create a new AbstractResourceModelProvider for the given project and
resourcePath. The resourcePath may be either a) an absolute platform
resource path (e.g. "MyProject/src/META-INF/foobar.xml") or b) a relative
deploy path (e.g. "META-INF/foobar.xml".) In either case,
buildFileUri(IPath) will attempt to build an absolutely pathed
URI for the given path.
getResource
public R getResource()
- 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:
getResource in interface JpaResourceModelProvider
createResource
public R createResource()
throws org.eclipse.core.runtime.CoreException
- Throws:
org.eclipse.core.runtime.CoreException
addListener
public void addListener(JpaResourceModelProviderListener listener)
removeListener
public void removeListener(JpaResourceModelProviderListener 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 JpaResourceModelProvider
modify
public void modify(java.lang.Runnable runnable)
- Specified by:
modify in interface JpaResourceModelProvider
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