org.eclipse.emf.ecore.EParameter Java Examples

The following examples show how to use org.eclipse.emf.ecore.EParameter. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: XtextSpyLabelProvider.java    From dsl-devkit with Eclipse Public License 1.0 5 votes vote down vote up
/**
 * Text for EOperation.
 * 
 * @param eOperation
 *          the EOperation
 * @return the name and types of all EParameters
 */
protected String text(final EOperation eOperation) {
  return eOperation.getName() + "(" + Joiner.on(", ").join(Iterables.transform(eOperation.getEParameters(), new Function<EParameter, String>() {
    public String apply(final EParameter input) {
      return getText(input.getEType());
    }
  })) + ") : " + (eOperation.getEType() == null ? "Void" : getText(eOperation.getEType()));
}
 
Example #2
Source File: ProcessOCLFactory.java    From bonita-studio with GNU General Public License v2.0 5 votes vote down vote up
/**
* @generated
*/
private static void initCustomEnv(Environment<?, EClassifier, ?, ?, ?, EParameter, ?, ?, ?, ?, ?, ?> ecoreEnv,
		Map<String, EClassifier> environment) {
	// Use EObject as implicit root class for any object, to allow eContainer() and other EObject operations from OCL expressions
	ParsingOptions.setOption(ecoreEnv, ParsingOptions.implicitRootClass(ecoreEnv),
			EcorePackage.eINSTANCE.getEObject());
	for (String varName : environment.keySet()) {
		EClassifier varType = environment.get(varName);
		ecoreEnv.addElement(varName, createVar(ecoreEnv, varName, varType), false);
	}
}