Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    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 10:00 Go to next message
Hiroki Kondo is currently offline Hiroki KondoFriend
Messages: 47
Registered: July 2009
Member
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 13:38 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33140
Registered: July 2009
Senior Member
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


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: How to annotate to refer other ecore package? [message #1486746 is a reply to message #1485718] Tue, 25 November 2014 09:02 Go to previous messageGo to next message
Hiroki Kondo is currently offline Hiroki KondoFriend
Messages: 47
Registered: July 2009
Member
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 10:10 Go to previous message
Ed Merks is currently offline Ed MerksFriend
Messages: 33140
Registered: July 2009
Senior Member
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,


Ed Merks
Professional Support: https://www.macromodeling.com/
Previous Topic:Referring to inexistent data member in generated package class
Next Topic:[XCORE]
Goto Forum:
  


Current Time: Wed Apr 24 17:22:21 GMT 2024

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

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

Back to the top