Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 85179

Summary: [Plan Item] Improved Convenience Methods
Product: [Modeling] MDT.UML2 Reporter: Kenn Hussey <Kenn.Hussey>
Component: CoreAssignee: UML2 Inbox <uml2-core-inbox>
Status: VERIFIED FIXED QA Contact:
Severity: enhancement    
Priority: P4 CC: crivet, k9kis_fcg, mibcn, yeer
Version: 1.1.0Keywords: plan
Target Milestone: 2.0 M3   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Bug Depends on: 75922    
Bug Blocks:    

Description Kenn Hussey CLA 2005-02-14 14:51:54 EST
Provide improved factory and convenience methods. For example, factory methods 
that don’t require an Ecore class as an argument if the type is obvious 
(concrete) and that accept a name as an argument (for named element creation), 
and retrieval methods that accept arguments indicating whether name 
comparisons should be case-sensitive and whether elements should be created on 
demand.
Comment 1 Kenn Hussey CLA 2005-03-28 14:25:07 EST
Also improve performance of existing custom operations, especially those 
dealing with profiles and stereotypes.
Comment 2 Richard Yee CLA 2005-06-08 17:08:10 EDT
It might be very helpful to have a few basic methods for querying about 
Relationships, e.g., given Element X, find all the Relationships, R, in the 
model such that R.getRelatedElements().contains(X) is true.

Some variations might include filtering on relationship subtypes, 
inbound/outbound directions, or relationships pertaining to other elements, 
sets of elements, packages, or (especially) package-subtrees.  Of course, such 
filters would be fairly easy if the basic query were available.  At this 
point, I am not sure which variations or other kinds of queries would be the 
most useful.
Comment 3 Kenn Hussey CLA 2005-06-09 09:37:03 EDT
Also add metadata (Ecore operations) for custom operations that have been 
added by hand.
Comment 4 Kenn Hussey CLA 2005-08-17 10:36:14 EDT
Overload BehavioralFeature#createReturnResult() with a version that takes the 
desired type of the result. Note that both methods should also automatically 
set the direction of the parameter to ParameterDirectionKind#RETURN_LITERAL.
Comment 5 Kenn Hussey CLA 2005-09-27 11:16:15 EDT
*** Bug 101607 has been marked as a duplicate of this bug. ***
Comment 6 Kenn Hussey CLA 2005-11-23 08:19:26 EST
Changes to improve the performance of Element#destroy() and Class#getExtensions() (based on bug 75922) have been committed to CVS.
Comment 7 Richard Yee CLA 2005-12-16 11:57:34 EST
It might be convenient to have Classifier methods for Operations features, analogous to those for Attributes.
  Elist getOperations()
  Operation getOperation(String unqualifiedName)
Comment 8 Kenn Hussey CLA 2006-02-22 15:47:06 EST
Improved factory and look-up methods, along with associated code generator support, have been committed to CVS.
Comment 9 Kenn Hussey CLA 2006-02-22 18:57:31 EST
Query methods for the relationships an element is involved in and the associations a type is involved in have also been committed to CVS.
Comment 10 Kenn Hussey CLA 2006-03-02 15:40:54 EST
The changes are available in build 2.0 M3.
Comment 11 Kenn Hussey CLA 2006-03-08 11:29:48 EST
The following convenience operations are missing:

Association::isBinary()

Behavioredclassifier::getImplementedInterfaces()
Behavioredclassifier::getAllImplementedInterfaces()

Classifier::getUsedInterfaces()
Classifier::getAllUsedInterfaces()

Component::createOwnedClass(String, boolean)
Component::createOwnedEnumeraton(String)
Component::createOwnedInterface(String)
Component::createOwnedPrimitiveType(String)

Parameter::setBooleanDefaultValue(boolean)
Parameter::setIntegerDefaultValue(int)
Parameter::setStringDefaultValue(String)
Parameter::setUnlimitedNaturalDefaultValue(int)
Parameter::setNullDefaultValue()

Property::setIsNavigable(boolean)
Property::getOtherEnd()
Property::setBooleanDefaultValue(boolean)
Property::setIntegerDefaultValue(int)
Property::setStringDefaultValue(String)
Property::setUnlimitedNaturalDefaultValue(int)
Property::setNullDefaultValue()
Comment 12 Kenn Hussey CLA 2006-03-08 16:56:46 EST
The missing operations have been committed to CVS.
Comment 13 Kenn Hussey CLA 2006-03-09 18:11:58 EST
The changes are availabled in build I200603091723.
Comment 14 Nick Boldt CLA 2008-01-28 16:35:20 EST
Move to verified as per bug 206558.