|
Dali Provisional API Release 3.2 |
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
public interface JpaFile
A JPA Project contains JPA files for all files in the project that are relevant to the JPA spec.
To retrieve the JPA file corresponding to an Eclipse file:
IFile file = (IFile) ResourcesPlugin.getWorkspace().getRoot().findMember("Foo.java");
JpaFile jpaFile = (JpaFile) file.getAdapter(JpaFile.class);
This is a non-blocking call; and as a result it will return null
if the JPA file or its JPA project is currently under construction. Use a
JPA file reference to retrieve a JPA file in a blocking
fashion that will return a JPA file once it and its JPA project have been
constructed.
See org.eclipse.jpt.jpa.core/plugin.xml:org.eclipse.core.runtime.adapters.
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.
JpaFile.Reference,
FileAdapterFactory| Nested Class Summary | |
|---|---|
static interface |
JpaFile.Reference
Standard adapter for retrieving a JPA file:
IProject project = ResourcesPlugin.getWorkspace().getRoot().getProject("Foo Project");
IFile file = project.getFile("Foo.java");
JpaFile.Reference jpaFileRef = (JpaFile.Reference) file.getAdapter(JpaFile.Reference.class);
JpaFile jpaFile = jpaFileRef.getValue();
See org.eclipse.jpt.jpa.core/plugin.xml:org.eclipse.core.runtime.adapters. |
static class |
JpaFile.ResourceModelTransformer
|
| Nested classes/interfaces inherited from interface org.eclipse.jpt.common.core.ContentTypeReference |
|---|
ContentTypeReference.ContentIsKindOf, ContentTypeReference.ContentTypeTransformer |
| Field Summary | |
|---|---|
static org.eclipse.jpt.common.utility.transformer.Transformer<JpaFile,JptResourceModel> |
RESOURCE_MODEL_TRANSFORMER
|
static String |
ROOT_STRUCTURE_NODES_COLLECTION
|
| Fields inherited from interface org.eclipse.jpt.common.core.ContentTypeReference |
|---|
CONTENT_TYPE_TRANSFORMER |
| Method Summary | |
|---|---|
IFile |
getFile()
Return the JPA file's Eclipse file. |
JptResourceModel |
getResourceModel()
Return the resource model corresponding to the JPA file; typically a JPA compilation unit, a JPA XML resource, or a JPA package fragment root (JAR). |
JptResourceModel |
getResourceModel(IContentType contentType)
Convenience method. |
Iterable<JpaStructureNode> |
getRootStructureNodes()
Return the JPA file's root structure nodes. |
int |
getRootStructureNodesSize()
Return the count of the JPA file's root context model objects. |
JpaStructureNode |
getStructureNode(int textOffset)
Return the structure node best corresponding to the location in the file. |
void |
updateRootStructureNodes()
Update the collection of root structure nodes. |
| Methods inherited from interface org.eclipse.jpt.jpa.core.JpaNode |
|---|
getJpaPlatform, getJpaProject, getJpaProjectManager, getParent, getResource, stateChanged |
| Methods inherited from interface org.eclipse.jpt.common.utility.model.Model |
|---|
addChangeListener, addCollectionChangeListener, addListChangeListener, addPropertyChangeListener, addStateChangeListener, removeChangeListener, removeCollectionChangeListener, removeListChangeListener, removePropertyChangeListener, removeStateChangeListener |
| Methods inherited from interface org.eclipse.core.runtime.IAdaptable |
|---|
getAdapter |
| Methods inherited from interface org.eclipse.jpt.common.core.ContentTypeReference |
|---|
getContentType |
| Field Detail |
|---|
static final org.eclipse.jpt.common.utility.transformer.Transformer<JpaFile,JptResourceModel> RESOURCE_MODEL_TRANSFORMER
static final String ROOT_STRUCTURE_NODES_COLLECTION
| Method Detail |
|---|
IFile getFile()
JptResourceModel getResourceModel()
JptResourceModel getResourceModel(IContentType contentType)
getResourceModel()void updateRootStructureNodes()
JpaStructureNode.gatherRootStructureNodes(JpaFile, java.util.Collection)Iterable<JpaStructureNode> getRootStructureNodes()
int getRootStructureNodesSize()
JpaStructureNode getStructureNode(int textOffset)
|
Dali Provisional API Release 3.2 |
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||