This Bugzilla instance is deprecated, and most Eclipse projects now use GitHub or Eclipse GitLab. Please see the deprecation plan for details.
Bug 240205 - Instance diagram: should not be allowed to instantiate abstract types
Summary: Instance diagram: should not be allowed to instantiate abstract types
Status: CLOSED INVALID
Alias: None
Product: Tigerstripe (Archived)
Classification: Technology
Component: Diagrams (show other bugs)
Version: 0.3   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 0.3M2   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-07-09 12:30 EDT by Yoram CLA
Modified: 2012-03-19 09:47 EDT (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Yoram CLA 2008-07-09 12:30:58 EDT
A class CLS is defined with attributes:

CLS.ct1 : AbsCT, where AbsCT is an abstract datatype.

In instance diagram create an instance of CLS.
A dialog box comes up to define attributes' values
Check the box next to ct1, move to the Value column and click the ... button

What should happen:

A dialog box should be displayed and a choice for a concrete subtype should be displayed

What happebs:

A dialog box comes up WITHOUT cjoice for concrete subtype but with the option for creating an instance

Now the instance of the abstract datatype is created.

Try this by directly dragging the abstract type into the diagram and it behaves correctly -- an error is displayed about not being allowed to create instances of abstract types.

Ramifications: You can't specify the CLS instance at all in an instance diagram
Comment 1 Eric Dillon CLA 2008-07-09 19:52:48 EDT
Hi Yoram,

good point. I remember indeed when we implemented this a year ago, about putting a check on a direct drag-n-drop, but not on the indirect creation (from an attribute).
We'll into scheduling a fix for it.
Comment 2 Eric Dillon CLA 2010-08-09 22:41:36 EDT
We seem to have contradicting requirements, where being able to DnD a abstract artifact allows to show how concrete artifact would relate to artifacts thru a parent association.

I believe this should be junked?
Comment 3 Yoram CLA 2010-08-15 08:20:33 EDT
Eric: "I believe this should be junked?"

No, no... I don’t think so. I outlined a behavior below (in the original post) that can be implemented to resolve the conflict.
My point is this: abstract classes should not be allowed to be instantiated but when one drags an abstract class to a diagram one should be offered an opportunity to create an ad-hoc concrete subtype that only exists in this diagram. This behavior is similar to the opportunity given to create an instance of a datatype when an atribute is to be populated in an instance diagram and that attribute has a type that requires datatype...

Allowing instances of abstract classes is embarrassing at least and quite misleading otherwise.

*Yoram
Comment 4 Eric Dillon CLA 2010-08-16 10:20:09 EDT
(In reply to comment #3)
> Eric: "I believe this should be junked?"
> 
> No, no... I don’t think so. I outlined a behavior below (in the original post)
> that can be implemented to resolve the conflict.
> My point is this: abstract classes should not be allowed to be instantiated but
> when one drags an abstract class to a diagram one should be offered an
> opportunity to create an ad-hoc concrete subtype that only exists in this
> diagram. This behavior is similar to the opportunity given to create an
> instance of a datatype when an atribute is to be populated in an instance
> diagram and that attribute has a type that requires datatype...
> 
> Allowing instances of abstract classes is embarrassing at least and quite
> misleading otherwise.
> 
> *Yoram

Thanks for your answer Yoram. That makes a lot of sense.

Richard? I hope you're watching this :-)? Just added you on the cc-list anyway...

Eric
Comment 5 Navid Mehregani CLA 2012-03-19 09:47:48 EDT
The issue contradicts current assumptions in TS. There were several issues related to this.  Now users are  able to instantiate any abstract type on instance diagrams.