Skip to main content



      Home
Home » Modeling » EMF » How to annotate to refer other ecore package?
How to annotate to refer other ecore package? [message #1485522] Mon, 24 November 2014 05:00 Go to next message
Eclipse UserFriend
Hi there,

I'd like to specify well-defined ecore from my Java Annotated source code.
How to define to refer other ecore?

Regards,
Hiroki
Re: How to annotate to refer other ecore package? [message #1485718 is a reply to message #1485522] Mon, 24 November 2014 08:38 Go to previous messageGo to next message
Eclipse UserFriend
Hiroki,

Each annotated Java source has its own annotations. You can refer to
things from any Ecore model using the same notation you use to refer to
things within the same Ecore model.

On 24/11/2014 11:00 AM, Hiroki Kondo wrote:
> Hi there,
>
> I'd like to specify well-defined ecore from my Java Annotated source
> code.
> How to define to refer other ecore?
>
> Regards,
> Hiroki
Re: How to annotate to refer other ecore package? [message #1486746 is a reply to message #1485718] Tue, 25 November 2014 04:02 Go to previous messageGo to next message
Eclipse UserFriend
Thanks your response.

If I wrote the code like below, the EAttribute association is made in the attached ecore file.(sample.ecore)

package sample;

import org.eclipse.uml2.uml.Class;

/**
 * @model
 */
public interface LoadUML2 {
    
    /**
     * @model
     */
    public Class getUML2Class();

}


How about EReference? How I specify to make like attached file(refered_uml2.ecore)?

Regards,
Re: How to annotate to refer other ecore package? [message #1486828 is a reply to message #1486746] Tue, 25 November 2014 05:10 Go to previous message
Eclipse UserFriend
Hiroki,

I think without the UML source project in the workspace, the importer
isn't smart enough to know there is a model. Xcore is much better as a
textual representation.


On 25/11/2014 10:02 AM, Hiroki Kondo wrote:
> Thanks your response.
>
> If I wrote the code like below, the EAttribute association is made in the attached ecore file.(sample.ecore)
>
>
> package sample;
>
> import org.eclipse.uml2.uml.Class;
>
> /**
> * @model
> */
> public interface LoadUML2 {
>
> /**
> * @model
> */
> public Class getUML2Class();
>
> }
>
>
> How about EReference? How I specify to make like attached file(refered_uml2.ecore)?
>
> Regards,
Previous Topic:Referring to inexistent data member in generated package class
Next Topic:[XCORE]
Goto Forum:
  


Current Time: Sun Jul 27 02:30:27 EDT 2025

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

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

Back to the top