Codota Logo
EStructuralFeature.getEAnnotations
Code IndexAdd Codota to your IDE (free)

How to use
getEAnnotations
method
in
org.eclipse.emf.ecore.EStructuralFeature

Best Java code snippets using org.eclipse.emf.ecore.EStructuralFeature.getEAnnotations (Showing top 6 results out of 315)

  • Common ways to obtain EStructuralFeature
private void myMethod () {
EStructuralFeature e =
  • Codota IconItemProviderAdapter zuper;zuper.getChildFeature(object, child)
  • Codota IconEClass eClass;String featureName;eClass.getEStructuralFeature(featureName)
  • Codota IconFeatureMap.Entry entry;entry.getEStructuralFeature()
  • Smart code suggestions by Codota
}
origin: opensourceBIM/BIMserver

public void addIndex(EStructuralFeature eStructuralFeature) {
  for (EAnnotation eAnnotation : eStructuralFeature.getEAnnotations()) {
    if (eAnnotation.getSource().equals("singleindex")) {
      throw new RuntimeException(eStructuralFeature + " already has an index");
    }
  }
  changes.add(new AddIndexChange(this, eStructuralFeature));
  EAnnotation index = EcoreFactory.eINSTANCE.createEAnnotation();
  index.setSource("singleindex");
  eStructuralFeature.getEAnnotations().add(index);
}
origin: org.eclipse.emf/org.eclipse.emf.ecore.xmi

@Override
protected void copyContainment(EReference eReference, EObject eObject, EObject copyEObject)
{
 // The eAnnotations and eGenericType are possible containment references. 
 // We'll move them instead of copying
 //
 if (eReference == EcorePackage.Literals.ETYPED_ELEMENT__EGENERIC_TYPE)
 {
  ((ETypedElement)copyEObject).setEGenericType(((ETypedElement)eObject).getEGenericType());
 }
 else
 {
  ((EStructuralFeature)copyEObject).getEAnnotations().addAll(((EStructuralFeature)eObject).getEAnnotations());
 }
}
@Override
origin: at.bestsolution.efxclipse.eclipse/org.eclipse.emf.ecore.xmi

@Override
protected void copyContainment(EReference eReference, EObject eObject, EObject copyEObject)
{
 // The eAnnotations and eGenericType are possible containment references. 
 // We'll move them instead of copying
 //
 if (eReference == EcorePackage.Literals.ETYPED_ELEMENT__EGENERIC_TYPE)
 {
  ((ETypedElement)copyEObject).setEGenericType(((ETypedElement)eObject).getEGenericType());
 }
 else
 {
  ((EStructuralFeature)copyEObject).getEAnnotations().addAll(((EStructuralFeature)eObject).getEAnnotations());
 }
}
@Override
origin: at.bestsolution.efxclipse.eclipse/org.eclipse.emf.ecore

/**
 * Sets or removes annotations on the given structural feature to prevent generation of accessor methods in its interface.
 * @param eStructuralFeature the structural feature
 * @param accessor the type of accessor method, one of {@link #GET}, {@link #SET}, {@link #IS_SET}, or {@link #UNSET}
 * @param suppress whether the specified accessor's visibility should be suppressed
 * @since 2.1
 */
public static void setSuppressedVisibility(EStructuralFeature eStructuralFeature, int accessor, boolean suppress)
{
 if (accessor < GET || accessor > UNSET) throw new IllegalArgumentException("Invalid accessor identifier: " + accessor);
 EAnnotation eAnnotation = eStructuralFeature.getEAnnotation(GEN_MODEL_PACKAGE_NS_URI);
 if (!suppress)
 {
  if (eAnnotation != null)
  {
   eAnnotation.getDetails().removeKey(ACCESSOR_KEYS[accessor]);
  }
 }
 else
 {
  if (eAnnotation == null)
  {
   eAnnotation = EcoreFactory.eINSTANCE.createEAnnotation();
   eAnnotation.setSource(GEN_MODEL_PACKAGE_NS_URI);
   eStructuralFeature.getEAnnotations().add(eAnnotation);
  }
  eAnnotation.getDetails().put(ACCESSOR_KEYS[accessor], TRUE);
 }
}
origin: org.eclipse.emf/org.eclipse.emf.ecore

/**
 * Sets or removes annotations on the given structural feature to prevent generation of accessor methods in its interface.
 * @param eStructuralFeature the structural feature
 * @param accessor the type of accessor method, one of {@link #GET}, {@link #SET}, {@link #IS_SET}, or {@link #UNSET}
 * @param suppress whether the specified accessor's visibility should be suppressed
 * @since 2.1
 */
public static void setSuppressedVisibility(EStructuralFeature eStructuralFeature, int accessor, boolean suppress)
{
 if (accessor < GET || accessor > UNSET) throw new IllegalArgumentException("Invalid accessor identifier: " + accessor);
 EAnnotation eAnnotation = eStructuralFeature.getEAnnotation(GEN_MODEL_PACKAGE_NS_URI);
 if (!suppress)
 {
  if (eAnnotation != null)
  {
   eAnnotation.getDetails().removeKey(ACCESSOR_KEYS[accessor]);
  }
 }
 else
 {
  if (eAnnotation == null)
  {
   eAnnotation = EcoreFactory.eINSTANCE.createEAnnotation();
   eAnnotation.setSource(GEN_MODEL_PACKAGE_NS_URI);
   eStructuralFeature.getEAnnotations().add(eAnnotation);
  }
  eAnnotation.getDetails().put(ACCESSOR_KEYS[accessor], TRUE);
 }
}
origin: org.eclipse.ocl/ecore

ann = EcoreFactory.eINSTANCE.createEAnnotation();
ann.setSource(Environment.OCL_NAMESPACE_URI);
result.getEAnnotations().add(ann);
org.eclipse.emf.ecoreEStructuralFeaturegetEAnnotations

Popular methods of EStructuralFeature

  • getName
  • isMany
  • getEType
  • getEContainingClass
    Returns the value of the 'EContaining Class' container reference. It is bidirectional and its opposi
  • isUnsettable
    Returns the value of the 'Unsettable' attribute. An unsettable feature explicitly models the state o
  • isChangeable
    Returns the value of the 'Changeable' attribute. The default value is "true".
  • isDerived
    Returns the value of the 'Derived' attribute. A derived feature typically computes its value from th
  • isTransient
    Returns the value of the 'Transient' attribute.
  • getDefaultValue
    Returns the value of the 'Default Value' attribute. It represents the default value that feature mus
  • getUpperBound
  • getDefaultValueLiteral
    Returns the value of the 'Default Value Literal' attribute. It represents the serialized form of the
  • getEGenericType
  • getDefaultValueLiteral,
  • getEGenericType,
  • isUnique,
  • getFeatureID,
  • getEAnnotation,
  • getLowerBound,
  • isOrdered,
  • setChangeable,
  • eIsProxy,
  • setUpperBound

Popular in Java

  • Making http post requests using okhttp
  • onRequestPermissionsResult (Fragment)
  • getExternalFilesDir (Context)
  • getSystemService (Context)
  • VirtualMachine (com.sun.tools.attach)
    A Java virtual machine. A VirtualMachine represents a Java virtual machine to which this Java vir
  • Connection (java.sql)
    A connection represents a link from a Java application to a database. All SQL statements and results
  • ArrayList (java.util)
    Resizable-array implementation of the List interface. Implements all optional list operations, and p
  • Calendar (java.util)
    Calendar is an abstract base class for converting between a Date object and a set of integer fields
  • Enumeration (java.util)
    A legacy iteration interface.New code should use Iterator instead. Iterator replaces the enumeration
  • Collectors (java.util.stream)
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now