本文整理匯總了Java中org.eclipse.emf.ecore.EOperation.setName方法的典型用法代碼示例。如果您正苦於以下問題:Java EOperation.setName方法的具體用法?Java EOperation.setName怎麽用?Java EOperation.setName使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類org.eclipse.emf.ecore.EOperation
的用法示例。
在下文中一共展示了EOperation.setName方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: convertAction
import org.eclipse.emf.ecore.EOperation; //導入方法依賴的package包/類
/**
* Convert an OCCI action to an Ecore operation.
*
* @param action
* the OCCI action to convert.
* @return the resulting Ecore operation.
*/
protected EOperation convertAction(Action action) {
// Create the Ecore operation.
EOperation eOperation = EcoreFactory.eINSTANCE.createEOperation();
// Set the name of the Ecore operation.
eOperation.setName(ConverterUtils.formatName(action.getTerm()));
// Convert all attributes of the OCCI action.
for (Attribute attribute : action.getAttributes()) {
// Each OCCI attribute of the OCCI action is converted to an Ecore
// parameter of the Ecore operation.
EParameter convertParameter = convertParameter(attribute);
if (convertParameter != null) {
// Add the Ecore parameter to the Ecore operation.
eOperation.getEParameters().add(convertParameter);
}
}
attachInfo(eOperation, action.getTitle());
return eOperation;
}