Dali Provisional API
Release 3.2

org.eclipse.jpt.jpa.core
Interface JpaStructureNode

All Superinterfaces:
IAdaptable, JpaContextModel, JpaModel, JptResourceTypeReference, Model
All Known Subinterfaces:
ClassRef, EclipseLinkEntityMappings, EclipseLinkOrmPersistentType, EntityMappings, JarFileRef, JavaPersistentType, JavaSpecifiedPersistentAttribute, MappingFile.Root, MappingFileRef, OrmPersistentAttribute, OrmPersistentType, OrmSpecifiedPersistentAttribute, Persistence, Persistence2_0, PersistenceUnit, PersistenceUnit2_0, PersistentAttribute, PersistentAttribute2_0, PersistentType, PersistentType2_0, SpecifiedPersistentAttribute, SpecifiedPersistentAttribute2_0, XmlFile.Root
All Known Implementing Classes:
org.eclipse.jpt.jpa.core.internal.context.persistence.AbstractPersistenceUnit, EclipseLinkPersistenceUnit

public interface JpaStructureNode
extends JpaContextModel

Interface implemented by any object to appear in the JPA Structure view and JPA Details view. This interface is also used by the JPA Selection Managers.

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.0

Nested Class Summary
static class JpaStructureNode.ContextType
          Type used to identify a JPA structure node's type with respect to the structure node's context (i.e. its type in the scope of the JPA platform that created the structure node and the structure node's resource).
 
Nested classes/interfaces inherited from interface org.eclipse.jpt.jpa.core.JpaModel
JpaModel.JpaVersionIsCompatibleWith
 
Nested classes/interfaces inherited from interface org.eclipse.jpt.common.core.JptResourceTypeReference
JptResourceTypeReference.ResourceTypeIsKindOf, JptResourceTypeReference.ResourceTypeTransformer
 
Field Summary
static String CHILDREN_COLLECTION
          String constant associated with changes to the structure node's children.
 
Fields inherited from interface org.eclipse.jpt.common.core.JptResourceTypeReference
TRANSFORMER
 
Method Summary
 void addRootStructureNodesTo(JpaFile jpaFile, Collection<JpaStructureNode> rootStructureNodes)
          Add the appropriate root structure nodes to the collection that correspond to the given JPA file.
 boolean containsOffset(int textOffset)
          Return whether the structure node's full text representation contains the specified text offset.
 Iterable<? extends JpaStructureNode> getChildren()
          Return the children structure nodes, to be displayed in the JpaStructureView
 int getChildrenSize()
          Return the size of the children structure node collection
 JpaStructureNode.ContextType getContextType()
          Return the structure node's context type.
 TextRange getFullTextRange()
          Return the text range for the structure node's full text representation.
 TextRange getSelectionTextRange()
          Return the text range to be used to select text in the editor corresponding to the structure node.
 JpaStructureNode getStructureNode(int textOffset)
          Return the structure node at the specified offset in the structure node's corresponding text file.
 Class<? extends JpaStructureNode> getType()
          Return the structure node's type.
 
Methods inherited from interface org.eclipse.jpt.jpa.core.context.JpaContextModel
getCompletionProposals, getContextDefaultDbCatalog, getContextDefaultDbSchema, getContextDefaultDbSchemaContainer, getMappingFileRoot, getParent, getPersistenceUnit, getValidationTextRange, synchronizeWithResourceModel, update, validate
 
Methods inherited from interface org.eclipse.jpt.jpa.core.JpaModel
getJpaPlatform, getJpaProject, getJpaProjectManager, 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.JptResourceTypeReference
getResourceType
 

Field Detail

CHILDREN_COLLECTION

static final String CHILDREN_COLLECTION
String constant associated with changes to the structure node's children.

See Also:
Constant Field Values
Method Detail

getFullTextRange

TextRange getFullTextRange()
Return the text range for the structure node's full text representation.

See Also:
getSelectionTextRange()

containsOffset

boolean containsOffset(int textOffset)
Return whether the structure node's full text representation contains the specified text offset.

See Also:
getFullTextRange()

getStructureNode

JpaStructureNode getStructureNode(int textOffset)
Return the structure node at the specified offset in the structure node's corresponding text file.


getSelectionTextRange

TextRange getSelectionTextRange()
Return the text range to be used to select text in the editor corresponding to the structure node.

See Also:
getFullTextRange()

getContextType

JpaStructureNode.ContextType getContextType()
Return the structure node's context type. Type used to identify a JPA structure node's type with respect to the structure node's context (i.e. its type in the scope of the JPA platform that created the structure node and the structure node's resource).

See Also:
JpaModel.getJpaPlatform(), JptResourceTypeReference.getResourceType(), getType()

getType

Class<? extends JpaStructureNode> getType()
Return the structure node's type. This is used to find the appropriate UI provider for building the structure node's JPA Details Page.


getChildren

Iterable<? extends JpaStructureNode> getChildren()
Return the children structure nodes, to be displayed in the JpaStructureView


getChildrenSize

int getChildrenSize()
Return the size of the children structure node collection


addRootStructureNodesTo

void addRootStructureNodesTo(JpaFile jpaFile,
                             Collection<JpaStructureNode> rootStructureNodes)
Add the appropriate root structure nodes to the collection that correspond to the given JPA file.

See Also:
JpaFile.getRootStructureNodes()

Dali Provisional API
Release 3.2

Copyright (c) 2012 Oracle. All rights reserved.