Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » UML2 » NewbieQuestion: Programmatic Creat UML model
NewbieQuestion: Programmatic Creat UML model [message #470961] Wed, 21 February 2007 13:06 Go to next message
Jerry is currently offline JerryFriend
Messages: 32
Registered: July 2009
Member
Dear,

I am trying to follow the instruction "getting started with uml2" to learn
how to create uml models using java code. However, it showes error
message "the import *** cannot be resolved", e.g., the "import
org.eclipse.uml2.Model;"

Could you please give some instructions about the setting? e.g., should I
add some jar or libarary? which one should them be? where should them be
put?

Thank you very much!
Re: NewbieQuestion: Programmatic Creat UML model [message #470966 is a reply to message #470961] Thu, 22 February 2007 02:36 Go to previous messageGo to next message
james bruck is currently offline james bruckFriend
Messages: 1724
Registered: July 2009
Senior Member
Hi Jerry,

If you are using the latest version of opensource UML, the import should be

import org.eclipse.uml2.uml.Model;

If you can point out issues with the "getting started article" they will be
fixed ( it seems correct to me ).

Regards,

- James.



"Jerry" <sjianlin@hotmail.com> wrote in message
news:24888c3676556e839d02909687ddb859$1@www.eclipse.org...
> Dear,
>
> I am trying to follow the instruction "getting started with uml2" to learn
> how to create uml models using java code. However, it showes error
> message "the import *** cannot be resolved", e.g., the "import
> org.eclipse.uml2.Model;"
>
> Could you please give some instructions about the setting? e.g., should I
> add some jar or libarary? which one should them be? where should them be
> put?
>
> Thank you very much!
>
>
Re: NewbieQuestion: Programmatic Creat UML model [message #470968 is a reply to message #470966] Thu, 22 February 2007 11:24 Go to previous messageGo to next message
Jerry is currently offline JerryFriend
Messages: 32
Registered: July 2009
Member
Thanks James!
I guess you are telling me the right import if I have the new version uml.
However I still have questions: 1st, The srouce code for "getting started"
article actually provides a plug-in, it defines the Plug-in dependecy,
which includes the jar files named: org.eclipse.core.runtime,
org.eclipse.uml2, org.eclipse.uml2.common, org.eclipse.emf.ecore,
org.eclipse.emf.common, org.eclipse.emf.ecore.xmi, org.eclipse.osgi. But I
am working on a java project, so does this mean I have to do following? :
select project property--> java build path and select the Libraries -->
add external jars--> choose the jar files listed above. Otherwise, it
showes that""the import org.eclipse cannot be resolved" error.

Am I workin on the right way?
Thank you very much!
Re: NewbieQuestion: Programmatic Creat UML model [message #470971 is a reply to message #470968] Thu, 22 February 2007 19:29 Go to previous messageGo to next message
james bruck is currently offline james bruckFriend
Messages: 1724
Registered: July 2009
Senior Member
Hi Jerry,

To work with UML you need to download the opensource UML component with its
dependencies (EMF). The "getting started article" explains that.
From your other postings I assume that you are working with older code and
the newer version of the article (with source).
Start by getting all the latest UML components, then follow the article. The
article should explain all the details. I just verified the code in the
example and it looks fine.

- James.

"Jerry" <sjianlin@hotmail.com> wrote in message
news:7ab6888c826c114f1751fe0f70aa9f62$1@www.eclipse.org...
> Thanks James!
> I guess you are telling me the right import if I have the new version uml.
> However I still have questions: 1st, The srouce code for "getting started"
> article actually provides a plug-in, it defines the Plug-in dependecy,
> which includes the jar files named: org.eclipse.core.runtime,
> org.eclipse.uml2, org.eclipse.uml2.common, org.eclipse.emf.ecore,
> org.eclipse.emf.common, org.eclipse.emf.ecore.xmi, org.eclipse.osgi. But I
> am working on a java project, so does this mean I have to do following? :
> select project property--> java build path and select the Libraries -->
> add external jars--> choose the jar files listed above. Otherwise, it
> showes that""the import org.eclipse cannot be resolved" error.
>
> Am I workin on the right way?
> Thank you very much!
>
Re: NewbieQuestion: Programmatic Creat UML model [message #470977 is a reply to message #470971] Fri, 23 February 2007 11:41 Go to previous message
Lasith is currently offline LasithFriend
Messages: 29
Registered: July 2009
Junior Member
Hi,

As my knowledge I think you haven't import appropriate plug-in
dependencies for import org.eclipse.uml2.Model.

So add org.eclipse.uml2.uml dependency to your plugin (If you are using
uml2.0).

Thanks.
Re: NewbieQuestion: Programmatic Creat UML model [message #589066 is a reply to message #470961] Thu, 22 February 2007 02:36 Go to previous message
james bruck is currently offline james bruckFriend
Messages: 1724
Registered: July 2009
Senior Member
Hi Jerry,

If you are using the latest version of opensource UML, the import should be

import org.eclipse.uml2.uml.Model;

If you can point out issues with the "getting started article" they will be
fixed ( it seems correct to me ).

Regards,

- James.



"Jerry" <sjianlin@hotmail.com> wrote in message
news:24888c3676556e839d02909687ddb859$1@www.eclipse.org...
> Dear,
>
> I am trying to follow the instruction "getting started with uml2" to learn
> how to create uml models using java code. However, it showes error
> message "the import *** cannot be resolved", e.g., the "import
> org.eclipse.uml2.Model;"
>
> Could you please give some instructions about the setting? e.g., should I
> add some jar or libarary? which one should them be? where should them be
> put?
>
> Thank you very much!
>
>
Re: NewbieQuestion: Programmatic Creat UML model [message #590494 is a reply to message #470966] Thu, 22 February 2007 11:24 Go to previous message
Jerry is currently offline JerryFriend
Messages: 32
Registered: July 2009
Member
Thanks James!
I guess you are telling me the right import if I have the new version uml.
However I still have questions: 1st, The srouce code for "getting started"
article actually provides a plug-in, it defines the Plug-in dependecy,
which includes the jar files named: org.eclipse.core.runtime,
org.eclipse.uml2, org.eclipse.uml2.common, org.eclipse.emf.ecore,
org.eclipse.emf.common, org.eclipse.emf.ecore.xmi, org.eclipse.osgi. But I
am working on a java project, so does this mean I have to do following? :
select project property--> java build path and select the Libraries -->
add external jars--> choose the jar files listed above. Otherwise, it
showes that""the import org.eclipse cannot be resolved" error.

Am I workin on the right way?
Thank you very much!
Re: NewbieQuestion: Programmatic Creat UML model [message #590544 is a reply to message #470968] Thu, 22 February 2007 19:29 Go to previous message
james bruck is currently offline james bruckFriend
Messages: 1724
Registered: July 2009
Senior Member
Hi Jerry,

To work with UML you need to download the opensource UML component with its
dependencies (EMF). The "getting started article" explains that.
From your other postings I assume that you are working with older code and
the newer version of the article (with source).
Start by getting all the latest UML components, then follow the article. The
article should explain all the details. I just verified the code in the
example and it looks fine.

- James.

"Jerry" <sjianlin@hotmail.com> wrote in message
news:7ab6888c826c114f1751fe0f70aa9f62$1@www.eclipse.org...
> Thanks James!
> I guess you are telling me the right import if I have the new version uml.
> However I still have questions: 1st, The srouce code for "getting started"
> article actually provides a plug-in, it defines the Plug-in dependecy,
> which includes the jar files named: org.eclipse.core.runtime,
> org.eclipse.uml2, org.eclipse.uml2.common, org.eclipse.emf.ecore,
> org.eclipse.emf.common, org.eclipse.emf.ecore.xmi, org.eclipse.osgi. But I
> am working on a java project, so does this mean I have to do following? :
> select project property--> java build path and select the Libraries -->
> add external jars--> choose the jar files listed above. Otherwise, it
> showes that""the import org.eclipse cannot be resolved" error.
>
> Am I workin on the right way?
> Thank you very much!
>
Re: NewbieQuestion: Programmatic Creat UML model [message #590640 is a reply to message #470971] Fri, 23 February 2007 11:41 Go to previous message
Lasith is currently offline LasithFriend
Messages: 29
Registered: July 2009
Junior Member
Hi,

As my knowledge I think you haven't import appropriate plug-in
dependencies for import org.eclipse.uml2.Model.

So add org.eclipse.uml2.uml dependency to your plugin (If you are using
uml2.0).

Thanks.
Previous Topic:Deffrence between lower and lowervalue of the association in uml2
Next Topic:Changing the version number of a uml profile
Goto Forum:
  


Current Time: Fri Apr 26 23:38:56 GMT 2024

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

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

Back to the top