Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » UML2 » Component removal.
Component removal. [message #472908] Tue, 15 May 2007 13:05 Go to next message
Guillaume is currently offline GuillaumeFriend
Messages: 20
Registered: July 2009
Junior Member
Hi,

I'm having troubles using the Package element in your implementation of
UML2.
Below a code snippet that is showing my issue :

------------------------------------------------------------ -----------------
// Create container package.
Package container = UMLFactory.eINSTANCE.createPackage();
container.setName("Container"); //$NON-NLS-1$
// Create sub-package package1.
container.createNestedPackage("Package1"); //$NON-NLS-1$
// Create component mdsyse.
Component component = (Component) container.createOwnedType("mdsyse",
UMLPackage.Literals.COMPONENT); //$NON-NLS-1$
// Create sub-package package2.
container.createNestedPackage("Package2"); //$NON-NLS-1$

// Before deletion, display nested packages.
StringBuilder outMessage = new StringBuilder("BEFORE DELETION _
Container nested packages ="); //$NON-NLS-1$
outMessage.append("\n").append(container.getNestedPackages());
//$NON-NLS-1$
System.out.println(outMessage.toString());
// Before deletion, display owned types.
outMessage = new StringBuilder("BEFORE DELETION _ Container owned
types ="); //$NON-NLS-1$
outMessage.append("\n").append(container.getOwnedTypes());
//$NON-NLS-1$
System.out.println(outMessage.toString());

// Remove mdsyse component from container package.
container.getOwnedTypes().remove(component);

// After deletion, display nested packages.
outMessage = new StringBuilder("AFTER DELETION _ Container nested
packages ="); //$NON-NLS-1$
outMessage.append("\n").append(container.getNestedPackages());
//$NON-NLS-1$
System.out.println(outMessage.toString());
// Before deletion, display owned types.
outMessage = new StringBuilder("AFTER DELETION _ Container owned types
="); //$NON-NLS-1$
outMessage.append("\n").append(container.getOwnedTypes());
//$NON-NLS-1$
System.out.println(outMessage.toString());
------------------------------------------------------------ -----------------

So, I am creating a Package named "container" that is indeed containing
two other packages, "Package1" and "Package2", and a Component, named
"mdsyse".

Now I'm trying to remove "mdsyse" from "container" owned types.
As a result, "mdsyse" is still known as an owned type, and worst I have
lost "Package2" from nested packages.

I can cope with the fact that "mdsyse" is not removed but why should
"Package2" disappear from nested packages ? Isn't it a bug ?

Trying to remove "mdsyse" from packaged elements does solve this issue.
What am I missing about owned types ?

Thanks in advance,
Guillaume.

PS : I don't want "mdsyse" to be destroyed, just not longer linked to
"container".
Re: Component removal. [message #472911 is a reply to message #472908] Wed, 16 May 2007 17:01 Go to previous messageGo to next message
Kenn Hussey is currently offline Kenn HusseyFriend
Messages: 1620
Registered: July 2009
Senior Member
Guillaume,

This is a bug - please open a Bugzilla report and we'll have it fixed ASAP.

Kenn

"Guillaume" <guillaume.brocard@thalesgroup.com> wrote in message
news:6b8f350595323250507c2401de12b51c$1@www.eclipse.org...
> Hi,
>
> I'm having troubles using the Package element in your implementation of
> UML2.
> Below a code snippet that is showing my issue :
>
> ------------------------------------------------------------ -----------------
> // Create container package.
> Package container = UMLFactory.eINSTANCE.createPackage();
> container.setName("Container"); //$NON-NLS-1$
> // Create sub-package package1.
> container.createNestedPackage("Package1"); //$NON-NLS-1$
> // Create component mdsyse.
> Component component = (Component) container.createOwnedType("mdsyse",
> UMLPackage.Literals.COMPONENT); //$NON-NLS-1$
> // Create sub-package package2.
> container.createNestedPackage("Package2"); //$NON-NLS-1$
>
> // Before deletion, display nested packages.
> StringBuilder outMessage = new StringBuilder("BEFORE DELETION _
> Container nested packages ="); //$NON-NLS-1$
> outMessage.append("\n").append(container.getNestedPackages());
> //$NON-NLS-1$
> System.out.println(outMessage.toString());
> // Before deletion, display owned types.
> outMessage = new StringBuilder("BEFORE DELETION _ Container owned types
> ="); //$NON-NLS-1$
> outMessage.append("\n").append(container.getOwnedTypes());
> //$NON-NLS-1$
> System.out.println(outMessage.toString());
>
> // Remove mdsyse component from container package.
> container.getOwnedTypes().remove(component);
>
> // After deletion, display nested packages.
> outMessage = new StringBuilder("AFTER DELETION _ Container nested
> packages ="); //$NON-NLS-1$
> outMessage.append("\n").append(container.getNestedPackages());
> //$NON-NLS-1$
> System.out.println(outMessage.toString());
> // Before deletion, display owned types.
> outMessage = new StringBuilder("AFTER DELETION _ Container owned types
> ="); //$NON-NLS-1$
> outMessage.append("\n").append(container.getOwnedTypes());
> //$NON-NLS-1$
> System.out.println(outMessage.toString());
> ------------------------------------------------------------ -----------------
>
> So, I am creating a Package named "container" that is indeed containing
> two other packages, "Package1" and "Package2", and a Component, named
> "mdsyse".
>
> Now I'm trying to remove "mdsyse" from "container" owned types.
> As a result, "mdsyse" is still known as an owned type, and worst I have
> lost "Package2" from nested packages.
>
> I can cope with the fact that "mdsyse" is not removed but why should
> "Package2" disappear from nested packages ? Isn't it a bug ?
>
> Trying to remove "mdsyse" from packaged elements does solve this issue.
> What am I missing about owned types ?
>
> Thanks in advance,
> Guillaume.
>
> PS : I don't want "mdsyse" to be destroyed, just not longer linked to
> "container".
>
>
Re: Component removal. [message #472977 is a reply to message #472911] Wed, 23 May 2007 15:17 Go to previous messageGo to next message
Guillaume is currently offline GuillaumeFriend
Messages: 20
Registered: July 2009
Junior Member
Hi Kenn,

it's done.
Bug id is 188293.

Guillaume.

Kenn Hussey wrote:

> Guillaume,

> This is a bug - please open a Bugzilla report and we'll have it fixed ASAP.

> Kenn

> "Guillaume" <guillaume.brocard@thalesgroup.com> wrote in message
> news:6b8f350595323250507c2401de12b51c$1@www.eclipse.org...
>> Hi,
>>
>> I'm having troubles using the Package element in your implementation of
>> UML2.
>> Below a code snippet that is showing my issue :
>>
>>
------------------------------------------------------------ -----------------
>> // Create container package.
>> Package container = UMLFactory.eINSTANCE.createPackage();
>> container.setName("Container"); //$NON-NLS-1$
>> // Create sub-package package1.
>> container.createNestedPackage("Package1"); //$NON-NLS-1$
>> // Create component mdsyse.
>> Component component = (Component) container.createOwnedType("mdsyse",
>> UMLPackage.Literals.COMPONENT); //$NON-NLS-1$
>> // Create sub-package package2.
>> container.createNestedPackage("Package2"); //$NON-NLS-1$
>>
>> // Before deletion, display nested packages.
>> StringBuilder outMessage = new StringBuilder("BEFORE DELETION _
>> Container nested packages ="); //$NON-NLS-1$
>> outMessage.append("n").append(container.getNestedPackages());
>> //$NON-NLS-1$
>> System.out.println(outMessage.toString());
>> // Before deletion, display owned types.
>> outMessage = new StringBuilder("BEFORE DELETION _ Container owned types
>> ="); //$NON-NLS-1$
>> outMessage.append("n").append(container.getOwnedTypes());
>> //$NON-NLS-1$
>> System.out.println(outMessage.toString());
>>
>> // Remove mdsyse component from container package.
>> container.getOwnedTypes().remove(component);
>>
>> // After deletion, display nested packages.
>> outMessage = new StringBuilder("AFTER DELETION _ Container nested
>> packages ="); //$NON-NLS-1$
>> outMessage.append("n").append(container.getNestedPackages());
>> //$NON-NLS-1$
>> System.out.println(outMessage.toString());
>> // Before deletion, display owned types.
>> outMessage = new StringBuilder("AFTER DELETION _ Container owned types
>> ="); //$NON-NLS-1$
>> outMessage.append("n").append(container.getOwnedTypes());
>> //$NON-NLS-1$
>> System.out.println(outMessage.toString());
>>
------------------------------------------------------------ -----------------
>>
>> So, I am creating a Package named "container" that is indeed containing
>> two other packages, "Package1" and "Package2", and a Component, named
>> "mdsyse".
>>
>> Now I'm trying to remove "mdsyse" from "container" owned types.
>> As a result, "mdsyse" is still known as an owned type, and worst I have
>> lost "Package2" from nested packages.
>>
>> I can cope with the fact that "mdsyse" is not removed but why should
>> "Package2" disappear from nested packages ? Isn't it a bug ?
>>
>> Trying to remove "mdsyse" from packaged elements does solve this issue.
>> What am I missing about owned types ?
>>
>> Thanks in advance,
>> Guillaume.
>>
>> PS : I don't want "mdsyse" to be destroyed, just not longer linked to
>> "container".
>>
>>
Re: Component removal. [message #472982 is a reply to message #472977] Thu, 24 May 2007 03:14 Go to previous message
Kenn Hussey is currently offline Kenn HusseyFriend
Messages: 1620
Registered: July 2009
Senior Member
Guillaume,

Thanks, the fix has been committed to CVS and will be available in this
week's (tomorrow's) RC1 build.

Kenn

"Guillaume" <guillaume.brocard@thalesgroup.com> wrote in message
news:1cd9b98b2fdd5bc4b0b58237f9c0d1c2$1@www.eclipse.org...
> Hi Kenn,
>
> it's done.
> Bug id is 188293.
>
> Guillaume.
>
> Kenn Hussey wrote:
>
>> Guillaume,
>
>> This is a bug - please open a Bugzilla report and we'll have it fixed
>> ASAP.
>
>> Kenn
>
>> "Guillaume" <guillaume.brocard@thalesgroup.com> wrote in message
>> news:6b8f350595323250507c2401de12b51c$1@www.eclipse.org...
>>> Hi,
>>>
>>> I'm having troubles using the Package element in your implementation of
>>> UML2.
>>> Below a code snippet that is showing my issue :
>>>
>>>
> ------------------------------------------------------------ -----------------
>>> // Create container package.
>>> Package container = UMLFactory.eINSTANCE.createPackage();
>>> container.setName("Container"); //$NON-NLS-1$
>>> // Create sub-package package1.
>>> container.createNestedPackage("Package1"); //$NON-NLS-1$
>>> // Create component mdsyse.
>>> Component component = (Component) container.createOwnedType("mdsyse",
>>> UMLPackage.Literals.COMPONENT); //$NON-NLS-1$
>>> // Create sub-package package2.
>>> container.createNestedPackage("Package2"); //$NON-NLS-1$
>>>
>>> // Before deletion, display nested packages.
>>> StringBuilder outMessage = new StringBuilder("BEFORE DELETION _
>>> Container nested packages ="); //$NON-NLS-1$
>>> outMessage.append("n").append(container.getNestedPackages());
>>> //$NON-NLS-1$
>>> System.out.println(outMessage.toString());
>>> // Before deletion, display owned types.
>>> outMessage = new StringBuilder("BEFORE DELETION _ Container owned
>>> types ="); //$NON-NLS-1$
>>> outMessage.append("n").append(container.getOwnedTypes());
>>> //$NON-NLS-1$
>>> System.out.println(outMessage.toString());
>>>
>>> // Remove mdsyse component from container package.
>>> container.getOwnedTypes().remove(component);
>>>
>>> // After deletion, display nested packages.
>>> outMessage = new StringBuilder("AFTER DELETION _ Container nested
>>> packages ="); //$NON-NLS-1$
>>> outMessage.append("n").append(container.getNestedPackages());
>>> //$NON-NLS-1$
>>> System.out.println(outMessage.toString());
>>> // Before deletion, display owned types.
>>> outMessage = new StringBuilder("AFTER DELETION _ Container owned
>>> types ="); //$NON-NLS-1$
>>> outMessage.append("n").append(container.getOwnedTypes());
>>> //$NON-NLS-1$
>>> System.out.println(outMessage.toString());
>>>
> ------------------------------------------------------------ -----------------
>>>
>>> So, I am creating a Package named "container" that is indeed containing
>>> two other packages, "Package1" and "Package2", and a Component, named
>>> "mdsyse".
>>>
>>> Now I'm trying to remove "mdsyse" from "container" owned types.
>>> As a result, "mdsyse" is still known as an owned type, and worst I have
>>> lost "Package2" from nested packages.
>>>
>>> I can cope with the fact that "mdsyse" is not removed but why should
>>> "Package2" disappear from nested packages ? Isn't it a bug ?
>>>
>>> Trying to remove "mdsyse" from packaged elements does solve this issue.
>>> What am I missing about owned types ?
>>>
>>> Thanks in advance,
>>> Guillaume.
>>>
>>> PS : I don't want "mdsyse" to be destroyed, just not longer linked to
>>> "container".
>>>
>>>
>
>
Re: Component removal. [message #615878 is a reply to message #472908] Wed, 16 May 2007 17:01 Go to previous message
Kenn Hussey is currently offline Kenn HusseyFriend
Messages: 1620
Registered: July 2009
Senior Member
Guillaume,

This is a bug - please open a Bugzilla report and we'll have it fixed ASAP.

Kenn

"Guillaume" <guillaume.brocard@thalesgroup.com> wrote in message
news:6b8f350595323250507c2401de12b51c$1@www.eclipse.org...
> Hi,
>
> I'm having troubles using the Package element in your implementation of
> UML2.
> Below a code snippet that is showing my issue :
>
> ------------------------------------------------------------ -----------------
> // Create container package.
> Package container = UMLFactory.eINSTANCE.createPackage();
> container.setName("Container"); //$NON-NLS-1$
> // Create sub-package package1.
> container.createNestedPackage("Package1"); //$NON-NLS-1$
> // Create component mdsyse.
> Component component = (Component) container.createOwnedType("mdsyse",
> UMLPackage.Literals.COMPONENT); //$NON-NLS-1$
> // Create sub-package package2.
> container.createNestedPackage("Package2"); //$NON-NLS-1$
>
> // Before deletion, display nested packages.
> StringBuilder outMessage = new StringBuilder("BEFORE DELETION _
> Container nested packages ="); //$NON-NLS-1$
> outMessage.append("\n").append(container.getNestedPackages());
> //$NON-NLS-1$
> System.out.println(outMessage.toString());
> // Before deletion, display owned types.
> outMessage = new StringBuilder("BEFORE DELETION _ Container owned types
> ="); //$NON-NLS-1$
> outMessage.append("\n").append(container.getOwnedTypes());
> //$NON-NLS-1$
> System.out.println(outMessage.toString());
>
> // Remove mdsyse component from container package.
> container.getOwnedTypes().remove(component);
>
> // After deletion, display nested packages.
> outMessage = new StringBuilder("AFTER DELETION _ Container nested
> packages ="); //$NON-NLS-1$
> outMessage.append("\n").append(container.getNestedPackages());
> //$NON-NLS-1$
> System.out.println(outMessage.toString());
> // Before deletion, display owned types.
> outMessage = new StringBuilder("AFTER DELETION _ Container owned types
> ="); //$NON-NLS-1$
> outMessage.append("\n").append(container.getOwnedTypes());
> //$NON-NLS-1$
> System.out.println(outMessage.toString());
> ------------------------------------------------------------ -----------------
>
> So, I am creating a Package named "container" that is indeed containing
> two other packages, "Package1" and "Package2", and a Component, named
> "mdsyse".
>
> Now I'm trying to remove "mdsyse" from "container" owned types.
> As a result, "mdsyse" is still known as an owned type, and worst I have
> lost "Package2" from nested packages.
>
> I can cope with the fact that "mdsyse" is not removed but why should
> "Package2" disappear from nested packages ? Isn't it a bug ?
>
> Trying to remove "mdsyse" from packaged elements does solve this issue.
> What am I missing about owned types ?
>
> Thanks in advance,
> Guillaume.
>
> PS : I don't want "mdsyse" to be destroyed, just not longer linked to
> "container".
>
>
Re: Component removal. [message #617184 is a reply to message #472911] Wed, 23 May 2007 15:17 Go to previous message
Guillaume is currently offline GuillaumeFriend
Messages: 20
Registered: July 2009
Junior Member
Hi Kenn,

it's done.
Bug id is 188293.

Guillaume.

Kenn Hussey wrote:

> Guillaume,

> This is a bug - please open a Bugzilla report and we'll have it fixed ASAP.

> Kenn

> "Guillaume" <guillaume.brocard@thalesgroup.com> wrote in message
> news:6b8f350595323250507c2401de12b51c$1@www.eclipse.org...
>> Hi,
>>
>> I'm having troubles using the Package element in your implementation of
>> UML2.
>> Below a code snippet that is showing my issue :
>>
>>
------------------------------------------------------------ -----------------
>> // Create container package.
>> Package container = UMLFactory.eINSTANCE.createPackage();
>> container.setName("Container"); //$NON-NLS-1$
>> // Create sub-package package1.
>> container.createNestedPackage("Package1"); //$NON-NLS-1$
>> // Create component mdsyse.
>> Component component = (Component) container.createOwnedType("mdsyse",
>> UMLPackage.Literals.COMPONENT); //$NON-NLS-1$
>> // Create sub-package package2.
>> container.createNestedPackage("Package2"); //$NON-NLS-1$
>>
>> // Before deletion, display nested packages.
>> StringBuilder outMessage = new StringBuilder("BEFORE DELETION _
>> Container nested packages ="); //$NON-NLS-1$
>> outMessage.append("n").append(container.getNestedPackages());
>> //$NON-NLS-1$
>> System.out.println(outMessage.toString());
>> // Before deletion, display owned types.
>> outMessage = new StringBuilder("BEFORE DELETION _ Container owned types
>> ="); //$NON-NLS-1$
>> outMessage.append("n").append(container.getOwnedTypes());
>> //$NON-NLS-1$
>> System.out.println(outMessage.toString());
>>
>> // Remove mdsyse component from container package.
>> container.getOwnedTypes().remove(component);
>>
>> // After deletion, display nested packages.
>> outMessage = new StringBuilder("AFTER DELETION _ Container nested
>> packages ="); //$NON-NLS-1$
>> outMessage.append("n").append(container.getNestedPackages());
>> //$NON-NLS-1$
>> System.out.println(outMessage.toString());
>> // Before deletion, display owned types.
>> outMessage = new StringBuilder("AFTER DELETION _ Container owned types
>> ="); //$NON-NLS-1$
>> outMessage.append("n").append(container.getOwnedTypes());
>> //$NON-NLS-1$
>> System.out.println(outMessage.toString());
>>
------------------------------------------------------------ -----------------
>>
>> So, I am creating a Package named "container" that is indeed containing
>> two other packages, "Package1" and "Package2", and a Component, named
>> "mdsyse".
>>
>> Now I'm trying to remove "mdsyse" from "container" owned types.
>> As a result, "mdsyse" is still known as an owned type, and worst I have
>> lost "Package2" from nested packages.
>>
>> I can cope with the fact that "mdsyse" is not removed but why should
>> "Package2" disappear from nested packages ? Isn't it a bug ?
>>
>> Trying to remove "mdsyse" from packaged elements does solve this issue.
>> What am I missing about owned types ?
>>
>> Thanks in advance,
>> Guillaume.
>>
>> PS : I don't want "mdsyse" to be destroyed, just not longer linked to
>> "container".
>>
>>
Re: Component removal. [message #617536 is a reply to message #472977] Thu, 24 May 2007 03:14 Go to previous message
Kenn Hussey is currently offline Kenn HusseyFriend
Messages: 1620
Registered: July 2009
Senior Member
Guillaume,

Thanks, the fix has been committed to CVS and will be available in this
week's (tomorrow's) RC1 build.

Kenn

"Guillaume" <guillaume.brocard@thalesgroup.com> wrote in message
news:1cd9b98b2fdd5bc4b0b58237f9c0d1c2$1@www.eclipse.org...
> Hi Kenn,
>
> it's done.
> Bug id is 188293.
>
> Guillaume.
>
> Kenn Hussey wrote:
>
>> Guillaume,
>
>> This is a bug - please open a Bugzilla report and we'll have it fixed
>> ASAP.
>
>> Kenn
>
>> "Guillaume" <guillaume.brocard@thalesgroup.com> wrote in message
>> news:6b8f350595323250507c2401de12b51c$1@www.eclipse.org...
>>> Hi,
>>>
>>> I'm having troubles using the Package element in your implementation of
>>> UML2.
>>> Below a code snippet that is showing my issue :
>>>
>>>
> ------------------------------------------------------------ -----------------
>>> // Create container package.
>>> Package container = UMLFactory.eINSTANCE.createPackage();
>>> container.setName("Container"); //$NON-NLS-1$
>>> // Create sub-package package1.
>>> container.createNestedPackage("Package1"); //$NON-NLS-1$
>>> // Create component mdsyse.
>>> Component component = (Component) container.createOwnedType("mdsyse",
>>> UMLPackage.Literals.COMPONENT); //$NON-NLS-1$
>>> // Create sub-package package2.
>>> container.createNestedPackage("Package2"); //$NON-NLS-1$
>>>
>>> // Before deletion, display nested packages.
>>> StringBuilder outMessage = new StringBuilder("BEFORE DELETION _
>>> Container nested packages ="); //$NON-NLS-1$
>>> outMessage.append("n").append(container.getNestedPackages());
>>> //$NON-NLS-1$
>>> System.out.println(outMessage.toString());
>>> // Before deletion, display owned types.
>>> outMessage = new StringBuilder("BEFORE DELETION _ Container owned
>>> types ="); //$NON-NLS-1$
>>> outMessage.append("n").append(container.getOwnedTypes());
>>> //$NON-NLS-1$
>>> System.out.println(outMessage.toString());
>>>
>>> // Remove mdsyse component from container package.
>>> container.getOwnedTypes().remove(component);
>>>
>>> // After deletion, display nested packages.
>>> outMessage = new StringBuilder("AFTER DELETION _ Container nested
>>> packages ="); //$NON-NLS-1$
>>> outMessage.append("n").append(container.getNestedPackages());
>>> //$NON-NLS-1$
>>> System.out.println(outMessage.toString());
>>> // Before deletion, display owned types.
>>> outMessage = new StringBuilder("AFTER DELETION _ Container owned
>>> types ="); //$NON-NLS-1$
>>> outMessage.append("n").append(container.getOwnedTypes());
>>> //$NON-NLS-1$
>>> System.out.println(outMessage.toString());
>>>
> ------------------------------------------------------------ -----------------
>>>
>>> So, I am creating a Package named "container" that is indeed containing
>>> two other packages, "Package1" and "Package2", and a Component, named
>>> "mdsyse".
>>>
>>> Now I'm trying to remove "mdsyse" from "container" owned types.
>>> As a result, "mdsyse" is still known as an owned type, and worst I have
>>> lost "Package2" from nested packages.
>>>
>>> I can cope with the fact that "mdsyse" is not removed but why should
>>> "Package2" disappear from nested packages ? Isn't it a bug ?
>>>
>>> Trying to remove "mdsyse" from packaged elements does solve this issue.
>>> What am I missing about owned types ?
>>>
>>> Thanks in advance,
>>> Guillaume.
>>>
>>> PS : I don't want "mdsyse" to be destroyed, just not longer linked to
>>> "container".
>>>
>>>
>
>
Previous Topic:Sequence Diagram - How to create Combine Fragments correctly?
Next Topic:[Announce] MDT UML2 2.1.0 2.1RC1 is available
Goto Forum:
  


Current Time: Thu Mar 28 09:21:37 GMT 2024

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

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

Back to the top