Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » UML2 » UML Component creation
UML Component creation [message #876326] Thu, 24 May 2012 11:36 Go to next message
Tex Iano is currently offline Tex IanoFriend
Messages: 99
Registered: February 2012
Member
Hi,

I want to create a UML component programmatically.

For interfaces, classes etc. I use this:

	public static org.eclipse.uml2.uml.Class addClass(org.eclipse.uml2.uml.Package p, String name) {
		return p.createOwnedClass(name, false);
	}


But there is no method createOwnedComponent. I have created a model using UML2 tools and here a component is a packagedElement similar to a class. But how should I create a component?

Or is the way I use to create classes not correct too?

Regards,

Tex
Re: UML Component creation [message #876877 is a reply to message #876326] Fri, 25 May 2012 12:38 Go to previous message
Ed Willink is currently offline Ed WillinkFriend
Messages: 7655
Registered: July 2009
Senior Member
Hi

I think you'll find that there are only so many helper routines that the
developers had time for.

You need to replicate the innards of one of the helpers that are available.

Regards

Ed Willink


On 24/05/2012 12:36, Tex Iano wrote:
> Hi,
>
> I want to create a UML component programmatically.
>
> For interfaces, classes etc. I use this:
>
>
> public static org.eclipse.uml2.uml.Class
> addClass(org.eclipse.uml2.uml.Package p, String name) {
> return p.createOwnedClass(name, false);
> }
>
>
> But there is no method createOwnedComponent. I have created a model
> using UML2 tools and here a component is a packagedElement similar to
> a class. But how should I create a component?
>
> Or is the way I use to create classes not correct too?
>
> Regards,
>
> Tex
>
Previous Topic:UML2 to Java Literals
Next Topic:Unable to read the stereotypes from Papyrus SysML model in standalone mode
Goto Forum:
  


Current Time: Thu Apr 25 17:41:41 GMT 2024

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

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

Back to the top