Tabnine Logo
EStructuralFeature.getEAnnotations
Code IndexAdd Tabnine 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)

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

  • Running tasks concurrently on multiple threads
  • runOnUiThread (Activity)
  • getContentResolver (Context)
  • putExtra (Intent)
  • EOFException (java.io)
    Thrown when a program encounters the end of a file or stream during an input operation.
  • Charset (java.nio.charset)
    A charset is a named mapping between Unicode characters and byte sequences. Every Charset can decode
  • TreeMap (java.util)
    Walk the nodes of the tree left-to-right or right-to-left. Note that in descending iterations, next
  • HttpServletRequest (javax.servlet.http)
    Extends the javax.servlet.ServletRequest interface to provide request information for HTTP servlets.
  • JTextField (javax.swing)
  • SAXParseException (org.xml.sax)
    Encapsulate an XML parse error or warning.> This module, both source code and documentation, is in t
  • Github Copilot alternatives
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