Hello,
I was searching for a possibility to apply profiles on Ecore models and I was happy seeing that EMF Profiles seems perfectly suitable for that.
However, when I try to follow the steps described in the screencasts, I have problems with actually applying my created profile. My use case is that I want to apply stereotypes on Ecore models, e.g. to apply a stereotype Entity on a EClass instance.
Creating the profile seems to work properly. For instance, the registered EMF profiles view shows the profile and the stereotypes etc.
My problem is that I don't find a way to apply my profile to ecore files. I tested different options: creating an ecore file using the tree editor and creating an ecore file using the Ecore Tools.
When using the Ecore tools I can create a .ecorediag file, but when I select a EClass, I can't find an option "EMF Profiles -> Apply Profile". There is only an "Apply Stereotype" but this reports "Can not apply any stereotype to EObject". I could not find something like "EMF Profiles -> ..." using the standard tree-based Ecore editor either.
In another post in this newsgroup (
https://groups.google.com/forum/#!topic/emf-profiles/czUX-MRnabk) I found the following:
> To apply a profile, you need to open the model to which you want to
apply the profile, open the EMF Profile > Profile Application View
> and hit the green plus button in that view. Then, you may choose the
file to which you want to save the profile application and select the
> profile to be applied. Once the profile application is displayed in the
profile application view, you can right-click any element in the model
> to which you want to apply the profile and select "Apply Stereotype".
I tried to perform these steps, but this was not successful. When I click the green plus button, I can select an "EMF Profile Application File", but this dialog expects a .".pa.xmi" file which I don't have. I tried to "trick" the dialog by renaming my example model file to a file ending with ".pa.xmi" but then I receive the error message "The file ... does not contain any profile applications", which is obviously right, as I didn't apply a profile yet.
Did I miss a required step? I only want to apply my profile example to some Ecore model to test EMF profiles. Later, I want to use it to create models with stereotypes which are used as input for e.g. Xtend to generate code.
Best regards
Klaus