本文整理汇总了Java中org.eclipse.xtext.XtextPackage.GRAMMAR__METAMODEL_DECLARATIONS属性的典型用法代码示例。如果您正苦于以下问题:Java XtextPackage.GRAMMAR__METAMODEL_DECLARATIONS属性的具体用法?Java XtextPackage.GRAMMAR__METAMODEL_DECLARATIONS怎么用?Java XtextPackage.GRAMMAR__METAMODEL_DECLARATIONS使用的例子?那么恭喜您, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类org.eclipse.xtext.XtextPackage
的用法示例。
在下文中一共展示了XtextPackage.GRAMMAR__METAMODEL_DECLARATIONS属性的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: eGet
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public Object eGet(int featureID, boolean resolve, boolean coreType) {
switch (featureID) {
case XtextPackage.GRAMMAR__NAME:
return getName();
case XtextPackage.GRAMMAR__USED_GRAMMARS:
return getUsedGrammars();
case XtextPackage.GRAMMAR__DEFINES_HIDDEN_TOKENS:
return isDefinesHiddenTokens();
case XtextPackage.GRAMMAR__HIDDEN_TOKENS:
return getHiddenTokens();
case XtextPackage.GRAMMAR__METAMODEL_DECLARATIONS:
return getMetamodelDeclarations();
case XtextPackage.GRAMMAR__RULES:
return getRules();
}
return super.eGet(featureID, resolve, coreType);
}
示例2: eUnset
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public void eUnset(int featureID) {
switch (featureID) {
case XtextPackage.GRAMMAR__NAME:
setName(NAME_EDEFAULT);
return;
case XtextPackage.GRAMMAR__USED_GRAMMARS:
getUsedGrammars().clear();
return;
case XtextPackage.GRAMMAR__DEFINES_HIDDEN_TOKENS:
setDefinesHiddenTokens(DEFINES_HIDDEN_TOKENS_EDEFAULT);
return;
case XtextPackage.GRAMMAR__HIDDEN_TOKENS:
getHiddenTokens().clear();
return;
case XtextPackage.GRAMMAR__METAMODEL_DECLARATIONS:
getMetamodelDeclarations().clear();
return;
case XtextPackage.GRAMMAR__RULES:
getRules().clear();
return;
}
super.eUnset(featureID);
}
示例3: eIsSet
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public boolean eIsSet(int featureID) {
switch (featureID) {
case XtextPackage.GRAMMAR__NAME:
return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name);
case XtextPackage.GRAMMAR__USED_GRAMMARS:
return usedGrammars != null && !usedGrammars.isEmpty();
case XtextPackage.GRAMMAR__DEFINES_HIDDEN_TOKENS:
return definesHiddenTokens != DEFINES_HIDDEN_TOKENS_EDEFAULT;
case XtextPackage.GRAMMAR__HIDDEN_TOKENS:
return hiddenTokens != null && !hiddenTokens.isEmpty();
case XtextPackage.GRAMMAR__METAMODEL_DECLARATIONS:
return metamodelDeclarations != null && !metamodelDeclarations.isEmpty();
case XtextPackage.GRAMMAR__RULES:
return rules != null && !rules.isEmpty();
}
return super.eIsSet(featureID);
}
示例4: getMetamodelDeclarations
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EList<AbstractMetamodelDeclaration> getMetamodelDeclarations() {
if (metamodelDeclarations == null) {
metamodelDeclarations = new EObjectContainmentEList<AbstractMetamodelDeclaration>(AbstractMetamodelDeclaration.class, this, XtextPackage.GRAMMAR__METAMODEL_DECLARATIONS);
}
return metamodelDeclarations;
}
示例5: eInverseRemove
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
switch (featureID) {
case XtextPackage.GRAMMAR__METAMODEL_DECLARATIONS:
return ((InternalEList<?>)getMetamodelDeclarations()).basicRemove(otherEnd, msgs);
case XtextPackage.GRAMMAR__RULES:
return ((InternalEList<?>)getRules()).basicRemove(otherEnd, msgs);
}
return super.eInverseRemove(otherEnd, featureID, msgs);
}
示例6: eSet
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@SuppressWarnings("unchecked")
@Override
public void eSet(int featureID, Object newValue) {
switch (featureID) {
case XtextPackage.GRAMMAR__NAME:
setName((String)newValue);
return;
case XtextPackage.GRAMMAR__USED_GRAMMARS:
getUsedGrammars().clear();
getUsedGrammars().addAll((Collection<? extends Grammar>)newValue);
return;
case XtextPackage.GRAMMAR__DEFINES_HIDDEN_TOKENS:
setDefinesHiddenTokens((Boolean)newValue);
return;
case XtextPackage.GRAMMAR__HIDDEN_TOKENS:
getHiddenTokens().clear();
getHiddenTokens().addAll((Collection<? extends AbstractRule>)newValue);
return;
case XtextPackage.GRAMMAR__METAMODEL_DECLARATIONS:
getMetamodelDeclarations().clear();
getMetamodelDeclarations().addAll((Collection<? extends AbstractMetamodelDeclaration>)newValue);
return;
case XtextPackage.GRAMMAR__RULES:
getRules().clear();
getRules().addAll((Collection<? extends AbstractRule>)newValue);
return;
}
super.eSet(featureID, newValue);
}