Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » UML2 » RedefinableTemplateSignature on Operation does not validate
RedefinableTemplateSignature on Operation does not validate [message #478746] Thu, 06 August 2009 12:01 Go to next message
No real name is currently offline No real name
Messages: 61
Registered: July 2009
Member
Hi,

I have a (UML2-)model where an Operation-element contains a
RedefinableTemplateSignature.

Now if I validate this model using the UMLValidator, it fails, because:

The required feature 'classifier' of
'org.eclipse.uml2.uml.internal.impl.RedefinableTemplateSigna tureImpl @10e1a4{file:/D:/.../main.uml#_-MRgaoKZEd6ddeTuI_hc6g}'
must be set

There seems to be the constraint, that the feature "classifier" of the
RedefinableTemplateSignature-element must be set. But the
RedefinableTemplateSignature-element in my case is used on an
Operation-element, which should be OK, since an Operation is an
TemplateableElement.

Is this a bug or what am I missing?

thank you

P.S.

my model:

<?xml version="1.0" encoding="UTF-8"?>
<uml:Model xmi:version="2.1"
xmlns:xmi="http://schema.omg.org/spec/XMI/2.1"
xmlns:uml="http://www.eclipse.org/uml2/3.0.0/UML"
xmi:id="_-MRgQIKZEd6ddeTuI_hc6g" name="main">
<packagedElement xmi:type="uml:Package" xmi:id="_-MRgToKZEd6ddeTuI_hc6g"
name="foo.bar">
<packagedElement xmi:type="uml:Class" xmi:id="_-MRgWIKZEd6ddeTuI_hc6g"
name="MyClass">
<ownedOperation xmi:id="_-MRgZ4KZEd6ddeTuI_hc6g" name="genMethod"
visibility="public">
<ownedParameter xmi:id="_-MRgaYKZEd6ddeTuI_hc6g"
direction="return">
<type xmi:type="uml:PrimitiveType"
href="references.uml#_-MRgcYKZEd6ddeTuI_hc6g"/>
</ownedParameter>
<ownedTemplateSignature
xmi:type="uml:RedefinableTemplateSignature"
xmi:id="_-MRgaoKZEd6ddeTuI_hc6g" name="signatureForgenMethod"
parameter="_-MRga4KZEd6ddeTuI_hc6g">
<ownedParameter xmi:type="uml:ClassifierTemplateParameter"
xmi:id="_-MRga4KZEd6ddeTuI_hc6g"
parameteredElement="_-MRgbIKZEd6ddeTuI_hc6g">
<ownedParameteredElement xmi:type="uml:Class"
xmi:id="_-MRgbIKZEd6ddeTuI_hc6g" name="T"
templateParameter="_-MRga4KZEd6ddeTuI_hc6g"/>
</ownedParameter>
</ownedTemplateSignature>
</ownedOperation>
</packagedElement>
</packagedElement>
</uml:Model>

My validation-method:


private boolean validate( EObject sourceModel, BasicDiagnostic
diagnostics )
{
boolean ret = true;

for( Iterator<?> iter = sourceModel.eAllContents(); iter.hasNext(); )
{
EObject currEObject = (EObject) iter.next();

boolean valRes = UMLValidator.INSTANCE.validate(currEObject,
diagnostics, null);

if( valRes == false )
{
ret = false;
}
}

return ret;
}
Re: RedefinableTemplateSignature on Operation does not validate [message #478894 is a reply to message #478746] Fri, 07 August 2009 07:29 Go to previous message
No real name is currently offline No real name
Messages: 61
Registered: July 2009
Member
Oh, stupid me. I don't know why I used RedefinableTemplateSignature
instead of TemplateSignature for Operation.

Sorry; solved.
Re: RedefinableTemplateSignature on Operation does not validate [message #627856 is a reply to message #478746] Fri, 07 August 2009 07:29 Go to previous message
No real name is currently offline No real name
Messages: 61
Registered: July 2009
Member
Oh, stupid me. I don't know why I used RedefinableTemplateSignature
instead of TemplateSignature for Operation.

Sorry; solved.
Previous Topic:RedefinableTemplateSignature on Operation does not validate
Next Topic:Applying stereotypes
Goto Forum:
  


Current Time: Fri Aug 22 00:13:00 EDT 2014

Powered by FUDForum. Page generated in 0.01512 seconds