Tabnine Logo
PathExpressionHead
Code IndexAdd Tabnine to your IDE (free)

How to use
PathExpressionHead
in
org.eclipse.incquery.patternlanguage.patternLanguage

Best Java code snippets using org.eclipse.incquery.patternlanguage.patternLanguage.PathExpressionHead (Showing top 10 results out of 315)

origin: org.eclipse.incquery/org.eclipse.incquery.patternlanguage.emf

public static EClassifier calculateExpressionType(PathExpressionHead head) throws ResolutionException {
  if (head.getTail() == null) {
    throw new ResolutionException(NOT_AN_ENUMERATION_REFERENCE_ERROR);
  }
  return calculateExpressionType(head.getTail());
}
origin: org.eclipse.incquery/org.eclipse.incquery.patternlanguage.emf

@Override
public IScope casePathExpressionHead(PathExpressionHead object) {
  return calculateReferences(object.getType());
}
origin: org.eclipse.incquery/org.eclipse.incquery.patternlanguage.emf

private void gatherPathExpression(PathExpressionConstraint pathExpression, PatternModelAcceptor<?> acceptor) throws SpecificationBuilderException {
  PathExpressionHead head = pathExpression.getHead();
  VariableReference src = head.getSrc();
  ValueReference dst = head.getDst();
  if (src == null || dst == null) {
    return;
  PathExpressionTail currentTail = head.getTail();
  Type headType = head.getType();
  if (headType instanceof ClassType) {
    EClassifier headClassname = ((ClassType) headType).getClassname();
origin: org.eclipse.incquery/org.eclipse.incquery.patternlanguage.emf

/**
 * This validator checks if the literal or computational values match the path expression's type.
 * 
 * @param pathExpressionConstraint
 */
@Check
public void checkForWrongLiteralAndComputationValuesInPathExpressionConstraints(
    PathExpressionConstraint pathExpressionConstraint) {
  // Normal attribute-reference constraint
  PathExpressionHead pathExpressionHead = pathExpressionConstraint.getHead();
  ValueReference valueReference = pathExpressionHead.getDst();
  if (valueReference instanceof LiteralValueReference || valueReference instanceof ComputationValue) {
    EClassifier inputClassifier = emfTypeProvider
        .getClassifierForLiteralComputationEnumValueReference(valueReference);
    EClassifier typeClassifier = emfTypeProvider.getClassifierForType(emfTypeProvider
        .getTypeFromPathExpressionTail(pathExpressionHead.getTail()));
    if (!isCompatibleClassifiers(typeClassifier, inputClassifier)) {
      String name = typeClassifier == null ? "<unknown>" : typeClassifier.getInstanceClassName();
      error("The type inferred from the path expression (" + name
          + ") is different from the input literal/computational value ("
          + inputClassifier.getInstanceClassName() + ").", pathExpressionConstraint, null,
          EMFIssueCodes.LITERAL_OR_COMPUTATION_TYPE_MISMATCH_IN_PATH_EXPRESSION);
    }
  }
}
origin: org.eclipse.incquery/org.eclipse.incquery.patternlanguage.emf

ValueReference valueReference = pathExpressionHead.getDst();
Variable pathExpressionHeadSourceVariable = null;
if (pathExpressionHead.getSrc() != null) {
  pathExpressionHeadSourceVariable = pathExpressionHead.getSrc().getVariable();
  PathExpressionHead pathExpressionHead = pathExpressionConstraint.getHead();
  Variable pathExpressionHeadSourceVariable = null;
  if (pathExpressionHead.getSrc() != null) {
    pathExpressionHeadSourceVariable = pathExpressionHead.getSrc().getVariable();
  ValueReference valueReference = pathExpressionHead.getDst();
  addPositiveVariablesFromValueReference(unnamedRunningVariables, justPositiveUnionFindForVariables, positiveVariables,
      valueReference);
origin: org.eclipse.incquery/org.eclipse.incquery.patternlanguage

ValueReference valueReference = pathExpressionHead.getDst();
resultList.addAll(getUnnamedVariablesFromValueReference(valueReference, true));
origin: org.eclipse.incquery/org.eclipse.incquery.patternlanguage

/**
 * Contexts:
 *     PathExpressionHead returns PathExpressionHead
 *
 * Constraint:
 *     (type=Type tail=PathExpressionTail src=VariableReference dst=ValueReference)
 */
protected void sequence_PathExpressionHead(ISerializationContext context, PathExpressionHead semanticObject) {
  if (errorAcceptor != null) {
    if (transientValues.isValueTransient(semanticObject, PatternLanguagePackage.Literals.PATH_EXPRESSION_ELEMENT__TYPE) == ValueTransient.YES)
      errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, PatternLanguagePackage.Literals.PATH_EXPRESSION_ELEMENT__TYPE));
    if (transientValues.isValueTransient(semanticObject, PatternLanguagePackage.Literals.PATH_EXPRESSION_ELEMENT__TAIL) == ValueTransient.YES)
      errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, PatternLanguagePackage.Literals.PATH_EXPRESSION_ELEMENT__TAIL));
    if (transientValues.isValueTransient(semanticObject, PatternLanguagePackage.Literals.PATH_EXPRESSION_HEAD__SRC) == ValueTransient.YES)
      errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, PatternLanguagePackage.Literals.PATH_EXPRESSION_HEAD__SRC));
    if (transientValues.isValueTransient(semanticObject, PatternLanguagePackage.Literals.PATH_EXPRESSION_HEAD__DST) == ValueTransient.YES)
      errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, PatternLanguagePackage.Literals.PATH_EXPRESSION_HEAD__DST));
  }
  SequenceFeeder feeder = createSequencerFeeder(context, semanticObject);
  feeder.accept(grammarAccess.getPathExpressionHeadAccess().getTypeTypeParserRuleCall_1_0(), semanticObject.getType());
  feeder.accept(grammarAccess.getPathExpressionHeadAccess().getTailPathExpressionTailParserRuleCall_3_0(), semanticObject.getTail());
  feeder.accept(grammarAccess.getPathExpressionHeadAccess().getSrcVariableReferenceParserRuleCall_5_0(), semanticObject.getSrc());
  feeder.accept(grammarAccess.getPathExpressionHeadAccess().getDstValueReferenceParserRuleCall_7_0(), semanticObject.getDst());
  feeder.finish();
}

origin: org.eclipse.incquery/org.eclipse.incquery.patternlanguage.emf

final PathExpressionHead pathExpressionHead = ((PathExpressionConstraint) constraint).getHead();
final VariableReference firstvariableReference = pathExpressionHead.getSrc();
if (isEqualVariables(variable, firstvariableReference)) {
  Type type = pathExpressionHead.getType();
  classifier = getClassifierForType(type);
  if (classifier != null) {
final ValueReference valueReference = pathExpressionHead.getDst();
if (valueReference instanceof VariableValue) {
  final VariableReference secondVariableReference = ((VariableValue) valueReference).getValue();
  if (isEqualVariables(variable, secondVariableReference)) {
    Type type = getTypeFromPathExpressionTail(pathExpressionHead.getTail());
    classifier = getClassifierForType(type);
    if (classifier != null) {
origin: org.eclipse.incquery/org.eclipse.incquery.patternlanguage.emf

public static EEnum calculateEnumerationType(PathExpressionHead head) throws ResolutionException {
  if (head.getTail() == null) {
    throw new ResolutionException(NOT_AN_ENUMERATION_REFERENCE_ERROR);
  }
  return calculateEnumerationType(head.getTail());
}
origin: org.eclipse.incquery/org.eclipse.incquery.patternlanguage.emf

PathExpressionHead pathExpressionHead = pathExpressionConstraint.getHead();
Map<PathExpressionTail, EStructuralFeature> tailFeatureMap = emfTypeProvider
    .getAllFeaturesFromPathExpressionTail(pathExpressionHead.getTail());
for (Entry<PathExpressionTail, EStructuralFeature> tail : tailFeatureMap.entrySet()) {
  EStructuralFeature feature = tail.getValue();
org.eclipse.incquery.patternlanguage.patternLanguagePathExpressionHead

Javadoc

A representation of the model object 'Path Expression Head'.

The following features are supported:

  • org.eclipse.incquery.patternlanguage.patternLanguage.PathExpressionHead#getSrc
  • org.eclipse.incquery.patternlanguage.patternLanguage.PathExpressionHead#getDst

Most used methods

  • getDst
    Returns the value of the 'Dst' containment reference. If the meaning of the 'Dst' containment refere
  • getSrc
    Returns the value of the 'Src' containment reference. If the meaning of the 'Src' containment refere
  • getTail
  • getType

Popular in Java

  • Reading from database using SQL prepared statement
  • notifyDataSetChanged (ArrayAdapter)
  • setScale (BigDecimal)
  • findViewById (Activity)
  • GridBagLayout (java.awt)
    The GridBagLayout class is a flexible layout manager that aligns components vertically and horizonta
  • IOException (java.io)
    Signals a general, I/O-related error. Error details may be specified when calling the constructor, a
  • HashSet (java.util)
    HashSet is an implementation of a Set. All optional operations (adding and removing) are supported.
  • Scanner (java.util)
    A parser that parses a text string of primitive types and strings with the help of regular expressio
  • Reference (javax.naming)
  • Logger (org.slf4j)
    The org.slf4j.Logger interface is the main user entry point of SLF4J API. It is expected that loggin
  • Top Vim plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now