Skip to main content



      Home
Home » Modeling » EMF » Help Embedding EMF in a Java Based Project in Eclipse(Ensuring I have identified not only the correct language but how to then embed it.)
Help Embedding EMF in a Java Based Project in Eclipse [message #1814569] Fri, 13 September 2019 07:32 Go to next message
Eclipse UserFriend
In the code snippet below I would like to ensure that 1: It is EMF code that I am dealing with. 2: If it is EMF how did they, what looks like Embed, the EMF code in this java project.

If anyone could link me to or describe how to do this it would be appreciated as I am trying to adapt this implementaion to another project of mine. I will be active on this forum post to reply and ask questions. Thank you in advance for any advice.

/**
 */
package RiskMatrixModel;

import org.eclipse.emf.common.util.EList;

import org.eclipse.emf.ecore.EObject;

/**
 * <!-- begin-user-doc -->
 * A representation of the model object '<em><b>Risk Matrix</b></em>'.
 * <!-- end-user-doc -->
 *
 * <p>
 * The following features are supported:
 * </p>
 * <ul>
 *   <li>{@link RiskMatrixModel.RiskMatrix#getLikelihoodlevel <em>Likelihoodlevel</em>}</li>
 *   <li>{@link RiskMatrixModel.RiskMatrix#getRiskratinginstance <em>Riskratinginstance</em>}</li>
 *   <li>{@link RiskMatrixModel.RiskMatrix#getSeveritylevel <em>Severitylevel</em>}</li>
 *   <li>{@link RiskMatrixModel.RiskMatrix#getMinUnacceptableRisk <em>Min Unacceptable Risk</em>}</li>
 * </ul>
 *
 * @see RiskMatrixModel.RiskMatrixModelPackage#getRiskMatrix()
 * @model
 * @generated
 */
public interface RiskMatrix extends EObject {
	/**
	 * Returns the value of the '<em><b>Likelihoodlevel</b></em>' containment reference list.
	 * The list contents are of type {@link RiskMatrixModel.LikelihoodLevel}.
	 * <!-- begin-user-doc -->
	 * <p>
	 * If the meaning of the '<em>Likelihoodlevel</em>' containment reference list isn't clear,
	 * there really should be more of a description here...
	 * </p>
	 * <!-- end-user-doc -->
	 * @return the value of the '<em>Likelihoodlevel</em>' containment reference list.
	 * @see RiskMatrixModel.RiskMatrixModelPackage#getRiskMatrix_Likelihoodlevel()
	 * @model containment="true"
	 * @generated
	 */
	EList<LikelihoodLevel> getLikelihoodlevel();

	/**
	 * Returns the value of the '<em><b>Riskratinginstance</b></em>' containment reference list.
	 * The list contents are of type {@link RiskMatrixModel.RiskRatingInstance}.
	 * <!-- begin-user-doc -->
	 * <p>
	 * If the meaning of the '<em>Riskratinginstance</em>' containment reference list isn't clear,
	 * there really should be more of a description here...
	 * </p>
	 * <!-- end-user-doc -->
	 * @return the value of the '<em>Riskratinginstance</em>' containment reference list.
	 * @see RiskMatrixModel.RiskMatrixModelPackage#getRiskMatrix_Riskratinginstance()
	 * @model containment="true"
	 * @generated
	 */
	EList<RiskRatingInstance> getRiskratinginstance();

	/**
	 * Returns the value of the '<em><b>Severitylevel</b></em>' containment reference list.
	 * The list contents are of type {@link RiskMatrixModel.SeverityLevel}.
	 * <!-- begin-user-doc -->
	 * <p>
	 * If the meaning of the '<em>Severitylevel</em>' containment reference list isn't clear,
	 * there really should be more of a description here...
	 * </p>
	 * <!-- end-user-doc -->
	 * @return the value of the '<em>Severitylevel</em>' containment reference list.
	 * @see RiskMatrixModel.RiskMatrixModelPackage#getRiskMatrix_Severitylevel()
	 * @model containment="true"
	 * @generated
	 */
	EList<SeverityLevel> getSeveritylevel();

	/**
	 * Returns the value of the '<em><b>Min Unacceptable Risk</b></em>' attribute.
	 * <!-- begin-user-doc -->
	 * <p>
	 * If the meaning of the '<em>Min Unacceptable Risk</em>' attribute isn't clear,
	 * there really should be more of a description here...
	 * </p>
	 * <!-- end-user-doc -->
	 * @return the value of the '<em>Min Unacceptable Risk</em>' attribute.
	 * @see #setMinUnacceptableRisk(int)
	 * @see RiskMatrixModel.RiskMatrixModelPackage#getRiskMatrix_MinUnacceptableRisk()
	 * @model dataType="org.eclipse.emf.ecore.xml.type.Int"
	 * @generated
	 */
	int getMinUnacceptableRisk();

	/**
	 * Sets the value of the '{@link RiskMatrixModel.RiskMatrix#getMinUnacceptableRisk <em>Min Unacceptable Risk</em>}' attribute.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @param value the new value of the '<em>Min Unacceptable Risk</em>' attribute.
	 * @see #getMinUnacceptableRisk()
	 * @generated
	 */
	void setMinUnacceptableRisk(int value);

} // RiskMatrix
Re: Help Embedding EMF in a Java Based Project in Eclipse [message #1814708 is a reply to message #1814569] Tue, 17 September 2019 00:05 Go to previous message
Eclipse UserFriend
It it's marked @generated then it was (at least originally) generated by EMF. Of course it's possible for someone to copy and past such code. The general structure one would expect to see in a "model" project is that there is a folder called "models" and in that folder will be one or more *.genmodel and one or more *.ecore, e.g., as in this model project for Ecore itself:

https://git.eclipse.org/c/emf/org.eclipse.emf.git/tree/plugins/org.eclipse.emf.ecore/model

One generally opens the *.genmodel and invoke the generator from it.

Assuming you have the source code under source code control, you could delete one or more of the *.java files and regenerate the model to see if there are any differences between what's there now and what's purely generated.
Previous Topic:[CDO] CDOStoreUnorderedEList invalidates index of RemoveCommand during undo
Next Topic:CopyToClipboardCommand makes editor dirty
Goto Forum:
  


Current Time: Mon Jul 07 21:53:09 EDT 2025

Powered by FUDForum. Page generated in 0.04788 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top