public class PropertiesLinkingService
extends org.eclipse.xtext.linking.impl.DefaultLinkingService
Constructor and Description |
---|
PropertiesLinkingService() |
Modifier and Type | Method and Description |
---|---|
AadlPackage |
findAadlPackage(org.eclipse.emf.ecore.EObject context,
java.lang.String name)
Look up package in EMF index or in resource set
NOTE: the resource set does not have all resources loaded
|
AadlPackage |
findAadlPackage(org.eclipse.emf.ecore.EObject context,
java.lang.String name,
org.eclipse.emf.ecore.EReference reference)
Look up package in EMF index
NOTE: the resource set does not have all resources loaded
|
AadlPackage |
findAadlPackageReference(java.lang.String packageName,
Namespace context)
Find referenced Package by resolving renames first and then making sure it is listed in a with clause
If package name is null or that of the context return containing package
|
ConnectionEnd |
findAccessConnectionEnd(AccessConnection conn,
Context cxt,
java.lang.String name) |
org.eclipse.emf.ecore.EObject |
findClassifier(org.eclipse.emf.ecore.EObject context,
org.eclipse.emf.ecore.EReference reference,
java.lang.String name)
find the classifier taking into account rename aliases
We do not check whether the referenced package is in the with clause.
|
ComponentClassifier |
findClassifierForComponentPrototype(Classifier containingClassifier,
ComponentPrototype prototype)
Dependencies: PrototypeFormalReference, ClassifierReference,
PrototypeOrClassifierReference, ComponentPrototypeClassifierReference,
ComponentPrototypeRefinementReference.
|
ComponentClassifier |
findClassifierForComponentPrototype(Classifier classifierPrototypeContext,
Subcomponent subcomponentPrototypeContext,
ComponentPrototype prototype)
Dependencies: PrototypeFormalReference, ClassifierReference,
PrototypeOrClassifierReference, ComponentPrototypeClassifierReference,
ComponentPrototypeRefinementReference.
|
ComponentClassifier |
findComponentClassifier(Element context,
java.lang.String name)
find the component classifier taking into account rename aliases
The name may be qualified with a package name
We do not check whether the referenced package is in the with clause.
|
static EnumerationLiteral |
findEnumerationLiteral(EnumerationType enumType,
java.lang.String name) |
static EnumerationLiteral |
findEnumerationLiteral(NamedValue nv,
java.lang.String name) |
static EnumerationLiteral |
findEnumerationLiteral(Property property,
java.lang.String name) |
static java.util.List<org.eclipse.emf.ecore.EObject> |
findEnumLiteralAsList(org.eclipse.emf.ecore.EObject context,
org.eclipse.emf.ecore.EReference reference,
java.lang.String name) |
ConnectionEnd |
findFeatureConnectionEnd(FeatureConnection connection,
Context cxt,
java.lang.String name) |
ConnectionEnd |
findFeatureGroupConnectionEnd(FeatureGroupConnection connection,
Context cxt,
java.lang.String name) |
FeatureGroupType |
findFeatureGroupType(Element context,
java.lang.String name) |
FeatureGroupType |
findFeatureGroupType(org.eclipse.emf.ecore.EObject context,
java.lang.String name,
org.eclipse.emf.ecore.EReference reference) |
FeatureGroupType |
findFeatureGroupTypeForFeatureGroupPrototype(Classifier containingClassifier,
FeatureGroupPrototype prototype)
Dependencies: PrototypeFormalReference, FeatureGroupTypeReference,
PrototypeOrFeatureGroupTypeReference,
FeatureGroupPrototypeClassifierReference,
FeatureGroupPrototypeRefinementReference.
|
NamedElement |
findNamedElementInAadlPackage(java.lang.String packageName,
java.lang.String elementName,
Namespace context)
Search for a
NamedElement with the name elementName in
the containing package, which is also the specified by packageName . |
org.eclipse.emf.ecore.EObject |
findNamedElementInPredeclaredPropertySets(java.lang.String propertyName,
org.eclipse.emf.ecore.EObject context,
org.eclipse.emf.ecore.EReference reference)
Find element in predeclared property sets which do not require the qualification
|
NamedElement |
findNamedElementInsideAadlPackage(java.lang.String name,
PackageSection context)
Search for a
NamedElement inside a package. |
ConnectionEnd |
findParameterConnectionEnd(ParameterConnection conn,
Context cxt,
java.lang.String name) |
PortConnectionEnd |
findPortConnectionEnd(PortConnection conn,
Context cxt,
java.lang.String portName) |
java.util.List<org.eclipse.emf.ecore.EObject> |
findPropertyConstant(org.eclipse.emf.ecore.EObject context,
org.eclipse.emf.ecore.EReference reference,
java.lang.String name) |
PropertyConstant |
findPropertyConstant(org.eclipse.emf.ecore.EObject context,
java.lang.String name)
find property constant based on property constant name.
|
Property |
findPropertyDefinition(org.eclipse.emf.ecore.EObject context,
java.lang.String name)
find property definition based on property name.
|
java.util.List<org.eclipse.emf.ecore.EObject> |
findPropertyDefinitionAsList(org.eclipse.emf.ecore.EObject context,
org.eclipse.emf.ecore.EReference reference,
java.lang.String name) |
PropertySet |
findPropertySet(Element context,
java.lang.String name)
look up property set in EMF index or resource set
|
PropertySet |
findPropertySet(org.eclipse.emf.ecore.EObject context,
java.lang.String name,
org.eclipse.emf.ecore.EReference reference)
look property set up in EMF index, if not found search through resource set
NOTE: resource set does not have all resources loaded
|
org.eclipse.emf.ecore.EObject |
findPropertySetElement(org.eclipse.emf.ecore.EObject context,
org.eclipse.emf.ecore.EReference reference,
java.lang.String name)
find a named element in a property set based on an optionally qualified name.
|
java.util.List<org.eclipse.emf.ecore.EObject> |
findPropertyType(org.eclipse.emf.ecore.EObject context,
org.eclipse.emf.ecore.EReference reference,
java.lang.String name) |
PropertyType |
findPropertyType(org.eclipse.emf.ecore.EObject context,
java.lang.String name)
find property type based on property name.
|
PrototypeBinding |
findPrototypeBinding(Classifier classifier,
Prototype prototype)
Dependencies: PrototypeFormalReference.
|
PrototypeBinding |
findPrototypeBinding(Classifier classifierPrototypeContext,
Subcomponent subcomponentPrototypeContext,
Prototype prototype)
Dependencies: PrototypeFormalReference.
|
PrototypeBinding |
findPrototypeBinding(Subcomponent subcomponent,
Prototype prototype)
Dependencies: PrototypeFormalReference.
|
static UnitLiteral |
findUnitLiteral(org.eclipse.emf.ecore.EObject context,
org.eclipse.emf.ecore.EReference reference,
java.lang.String name) |
static UnitLiteral |
findUnitLiteral(NumberValue nv,
java.lang.String name) |
static UnitLiteral |
findUnitLiteral(Property property,
java.lang.String name) |
static java.util.List<org.eclipse.emf.ecore.EObject> |
findUnitLiteralAsList(org.eclipse.emf.ecore.EObject context,
org.eclipse.emf.ecore.EReference reference,
java.lang.String name) |
java.lang.String |
getCrossRefNodeAsString(org.eclipse.xtext.nodemodel.INode node) |
org.eclipse.emf.ecore.EObject |
getIndexedObject(org.eclipse.emf.ecore.EObject context,
org.eclipse.emf.ecore.EReference reference,
java.lang.String crossRefString) |
java.lang.Iterable<org.eclipse.xtext.resource.IEObjectDescription> |
getIndexedObjects(org.eclipse.emf.ecore.EObject context,
org.eclipse.emf.ecore.EReference reference,
java.lang.String crossRefString)
copy of a method from within Xtext.
|
java.util.List<org.eclipse.emf.ecore.EObject> |
getLinkedObjects(org.eclipse.emf.ecore.EObject context,
org.eclipse.emf.ecore.EReference reference,
org.eclipse.xtext.nodemodel.INode node)
returns the first linked object
|
static PropertiesLinkingService |
getPropertiesLinkingService()
Deprecated.
|
static PropertiesLinkingService |
getPropertiesLinkingService(Element context)
Deprecated.
|
java.lang.String |
getQualifiedName(java.lang.String packageOrPropertySetName,
java.lang.String elementName) |
AadlPackage |
resolvePackageRename(java.lang.String name,
org.eclipse.emf.common.util.EList<PackageRename> packageRenames)
find and return renamed package in list of package renames
|
AadlPackage |
resolvePackageRename(java.lang.String name,
PackageSection context)
resolve package name by looking it up in PackageRename
|
@Deprecated public static PropertiesLinkingService getPropertiesLinkingService()
@Deprecated public static PropertiesLinkingService getPropertiesLinkingService(Element context)
public org.eclipse.emf.ecore.EObject getIndexedObject(org.eclipse.emf.ecore.EObject context, org.eclipse.emf.ecore.EReference reference, java.lang.String crossRefString)
public java.lang.Iterable<org.eclipse.xtext.resource.IEObjectDescription> getIndexedObjects(org.eclipse.emf.ecore.EObject context, org.eclipse.emf.ecore.EReference reference, java.lang.String crossRefString)
context
- reference
- crossRefString
- public java.lang.String getCrossRefNodeAsString(org.eclipse.xtext.nodemodel.INode node) throws org.eclipse.xtext.linking.impl.IllegalNodeException
getCrossRefNodeAsString
in class org.eclipse.xtext.linking.impl.DefaultLinkingService
org.eclipse.xtext.linking.impl.IllegalNodeException
public java.util.List<org.eclipse.emf.ecore.EObject> getLinkedObjects(org.eclipse.emf.ecore.EObject context, org.eclipse.emf.ecore.EReference reference, org.eclipse.xtext.nodemodel.INode node) throws org.eclipse.xtext.linking.impl.IllegalNodeException
getLinkedObjects
in interface org.eclipse.xtext.linking.ILinkingService
getLinkedObjects
in class org.eclipse.xtext.linking.impl.DefaultLinkingService
org.eclipse.xtext.linking.impl.IllegalNodeException
public AadlPackage findAadlPackage(org.eclipse.emf.ecore.EObject context, java.lang.String name)
context
- Context of referencename
- Package namepublic AadlPackage findAadlPackage(org.eclipse.emf.ecore.EObject context, java.lang.String name, org.eclipse.emf.ecore.EReference reference)
context
- Context of referencename
- Package namereference
- Ereference identifying the type of the referencepublic AadlPackage findAadlPackageReference(java.lang.String packageName, Namespace context)
packageName
- context
- location of the package referencepublic AadlPackage resolvePackageRename(java.lang.String name, PackageSection context)
name
- package namecontext
- Package section with rename declarationspublic AadlPackage resolvePackageRename(java.lang.String name, org.eclipse.emf.common.util.EList<PackageRename> packageRenames)
name
- package name to be resolvedpackageRenames
- list of package renamespublic PropertySet findPropertySet(Element context, java.lang.String name)
context
- name
- public PropertySet findPropertySet(org.eclipse.emf.ecore.EObject context, java.lang.String name, org.eclipse.emf.ecore.EReference reference)
context
- name
- Property set namereference
- EReference used to identify the type of object we are looking forpublic ComponentClassifier findComponentClassifier(Element context, java.lang.String name)
context
- Element any model object that is the context of the referencename
- name to be resolved; may be unqualified or qualified with a package namepublic FeatureGroupType findFeatureGroupType(Element context, java.lang.String name)
public FeatureGroupType findFeatureGroupType(org.eclipse.emf.ecore.EObject context, java.lang.String name, org.eclipse.emf.ecore.EReference reference)
public org.eclipse.emf.ecore.EObject findClassifier(org.eclipse.emf.ecore.EObject context, org.eclipse.emf.ecore.EReference reference, java.lang.String name)
context
- classifier reference contextreference
- identifying attribute of referencename
- name to be resolvedpublic org.eclipse.emf.ecore.EObject findPropertySetElement(org.eclipse.emf.ecore.EObject context, org.eclipse.emf.ecore.EReference reference, java.lang.String name)
context
- Element an AADL model elementreference
- EReferencename
- property type name possibly qualified with the property set namepublic PropertyConstant findPropertyConstant(org.eclipse.emf.ecore.EObject context, java.lang.String name)
context
- Element an AADL model elementname
- property type name possibly qualified with the property set namepublic java.util.List<org.eclipse.emf.ecore.EObject> findPropertyConstant(org.eclipse.emf.ecore.EObject context, org.eclipse.emf.ecore.EReference reference, java.lang.String name)
public PropertyType findPropertyType(org.eclipse.emf.ecore.EObject context, java.lang.String name)
context
- Element an AADL model elementname
- property type name possibly qualified with the property set namepublic java.util.List<org.eclipse.emf.ecore.EObject> findPropertyType(org.eclipse.emf.ecore.EObject context, org.eclipse.emf.ecore.EReference reference, java.lang.String name)
public Property findPropertyDefinition(org.eclipse.emf.ecore.EObject context, java.lang.String name)
context
- Element an AADL model elementname
- property name possibly qualified with the property set namepublic java.util.List<org.eclipse.emf.ecore.EObject> findPropertyDefinitionAsList(org.eclipse.emf.ecore.EObject context, org.eclipse.emf.ecore.EReference reference, java.lang.String name)
public PortConnectionEnd findPortConnectionEnd(PortConnection conn, Context cxt, java.lang.String portName)
public ConnectionEnd findAccessConnectionEnd(AccessConnection conn, Context cxt, java.lang.String name)
public ConnectionEnd findParameterConnectionEnd(ParameterConnection conn, Context cxt, java.lang.String name)
public ConnectionEnd findFeatureGroupConnectionEnd(FeatureGroupConnection connection, Context cxt, java.lang.String name)
public ConnectionEnd findFeatureConnectionEnd(FeatureConnection connection, Context cxt, java.lang.String name)
public ComponentClassifier findClassifierForComponentPrototype(Classifier containingClassifier, ComponentPrototype prototype)
public ComponentClassifier findClassifierForComponentPrototype(Classifier classifierPrototypeContext, Subcomponent subcomponentPrototypeContext, ComponentPrototype prototype)
public FeatureGroupType findFeatureGroupTypeForFeatureGroupPrototype(Classifier containingClassifier, FeatureGroupPrototype prototype)
public NamedElement findNamedElementInsideAadlPackage(java.lang.String name, PackageSection context)
NamedElement
inside a package. If context
is a
PublicPackageSection
, then this method will search through the
PublicPackageSection
only. If context
is a
PrivatePackageSection
, then this method will search through the
PrivatePackageSection
and its corresponding
PublicPackageSection
.
It will resolve any renames since it is a package internal lookup.
Dependencies: RenamesAll, ComponentTypeRename, FeatureGroupTypeRename.name
- The name of the NamedElement
to search for.context
- The PackageSection
that contains the Element
that needs the search result.NamedElement
or null
if it cannot be found.public NamedElement findNamedElementInAadlPackage(java.lang.String packageName, java.lang.String elementName, Namespace context)
NamedElement
with the name elementName
in
the containing package, which is also the specified by packageName
.
If the element cannot be found in the specified package, then null
will be returned.packageName
- The name of the package that contains the element to search
for, or nullelementName
- The name of the element to search for.context
- The PackageSection
that needs to refer to the
specified Element
.NamedElement
or null
if it cannot be found.public org.eclipse.emf.ecore.EObject findNamedElementInPredeclaredPropertySets(java.lang.String propertyName, org.eclipse.emf.ecore.EObject context, org.eclipse.emf.ecore.EReference reference)
propertyName
- context
- reference
- public java.lang.String getQualifiedName(java.lang.String packageOrPropertySetName, java.lang.String elementName)
public PrototypeBinding findPrototypeBinding(Classifier classifier, Prototype prototype)
public PrototypeBinding findPrototypeBinding(Classifier classifierPrototypeContext, Subcomponent subcomponentPrototypeContext, Prototype prototype)
public PrototypeBinding findPrototypeBinding(Subcomponent subcomponent, Prototype prototype)
public static EnumerationLiteral findEnumerationLiteral(Property property, java.lang.String name)
public static UnitLiteral findUnitLiteral(Property property, java.lang.String name)
public static UnitLiteral findUnitLiteral(NumberValue nv, java.lang.String name)
public static java.util.List<org.eclipse.emf.ecore.EObject> findUnitLiteralAsList(org.eclipse.emf.ecore.EObject context, org.eclipse.emf.ecore.EReference reference, java.lang.String name)
public static UnitLiteral findUnitLiteral(org.eclipse.emf.ecore.EObject context, org.eclipse.emf.ecore.EReference reference, java.lang.String name)
public static EnumerationLiteral findEnumerationLiteral(EnumerationType enumType, java.lang.String name)
public static EnumerationLiteral findEnumerationLiteral(NamedValue nv, java.lang.String name)
public static java.util.List<org.eclipse.emf.ecore.EObject> findEnumLiteralAsList(org.eclipse.emf.ecore.EObject context, org.eclipse.emf.ecore.EReference reference, java.lang.String name)