Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [mdt-papyrus.dev] MARTE NFP Types and static profile generation

Dear Stefano,

no, it would be a bad idea to replace the types in your profile with String, since you would loose the ability to enter syntactically correct expressions via the xtext based stereotype editor.

We use a patched variant of the org.eclipse.uml2.uml plugin to convert NFP data types to strings during the UML to ecore conversion. When you create the genmodel from the ecore file, make sure to reference the MARTE genmodel to avoid a re-generation of MARTE elements.

The patch is in the file UMLUtil.java, method "boolean isEDataType(Namespace namespace)"

    @Override
    public Boolean caseDataType(DataType dataType) {
        // Chokri modif
        return Boolean.FALSE;
    }

Best regards

Ansgar


-----Original Message-----
From: mdt-papyrus.dev-bounces@xxxxxxxxxxx on behalf of Stefano Puri
Sent: Thu 4/7/2011 10:51 AM
To: mdt-papyrus.dev@xxxxxxxxxxx
Subject: Re: [mdt-papyrus.dev] MARTE NFP Types and static profile generation
 
Hi Chokri,

first of all thank you for your support.

I think I miss some point:

For instance, in our .uml profile we have some stereotypes having 
attributes typed with NFR_Real.

I can change my .uml profile, e.g. using String in place of NFP_Real  to 
generate my .genmodel and then my static code with no compilation 
errors: is this right?

In this case, while using my profile at modeling time, how can I use the 
VSL editing facilities that should come with Papyrus for those 
attributes originally typed with NFP_Real (in general as MARTE NFP types)?

Best regards,
Stefano.

Il 04/04/2011 23.54, MRAIDHA Chokri 176997 ha scritto:
> Hi Stefano,
>
> NFP_Types have been converted in EDataTypes and instantiated with java.lang.String.
> This implementation choice has been made because MARTE NFP_Types are valuated with VSL expressions which are serialized as String.
> Converting UML DataTypes in EDataTypes and specifying java.lang.String as instance for these types should resolve your compilation errors.
>
> Best regards,
>
> Chokri
>
>
> -----Message d'origine-----
> De : mdt-papyrus.dev-bounces@xxxxxxxxxxx [mailto:mdt-papyrus.dev-bounces@xxxxxxxxxxx] De la part de Stefano Puri
> Envoyé : lundi 4 avril 2011 09:56
> À : mdt-papyrus.dev@xxxxxxxxxxx
> Objet : [mdt-papyrus.dev] MARTE NFP Types and static profile generation
>
> Hi all,
>
> I am trying to generate a static version of another custom profile which
> uses Papyrus MARTE (0.7.2v201101192155). In this profile we have some
> tags typed with predefined MARTE NFP types, e.g. NFP_Real.
>
> So NFP types are defined in MARTE .uml profile.
>
> However when I generate code from our genmodel I have compilation errors
> for these types. In fact I have seen that in MARTE java generated code
> NFP types do not exist, they have been replaced by String type.
>
> Should I remove all the references to NFP types from my profile? Do you
> know if there is a better way to manage this problem?
>
> Do you plan to use NFP types in the future instead of String?
>
> Thanks for the support.
>
> Stefano.
>
>
> LEGAL DISCLAIMER:
> The contents of this email and any transmitted files are confidential and intended solely for the use of the individual or entity to whom they are addressed. We hereby exclude any warranty and any liability as to the quality or accuracy of the contents of this email and any attached transmitted files. If you are not the intended recipient, be advised that you have received this email in error and that any use, dissemination, forwarding, printing or copying of this email is strictly prohibited. If you have received this email in error please contact the sender and delete the material from any computer.
> _______________________________________________
> mdt-papyrus.dev mailing list
> mdt-papyrus.dev@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/mdt-papyrus.dev
> _______________________________________________
> mdt-papyrus.dev mailing list
> mdt-papyrus.dev@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/mdt-papyrus.dev
>

-- 
Stefano Puri

Intecs SpA
Via E. Giannessi, 5
Ospedaletto
I-56121 Pisa, Italy
Ph: +39-050-9657411 (switchboard)
Ph: +39-050-9657549 (direct)
Fax:+39-050-9657400


LEGAL DISCLAIMER:
The contents of this email and any transmitted files are confidential and intended solely for the use of the individual or entity to whom they are addressed. We hereby exclude any warranty and any liability as to the quality or accuracy of the contents of this email and any attached transmitted files. If you are not the intended recipient, be advised that you have received this email in error and that any use, dissemination, forwarding, printing or copying of this email is strictly prohibited. If you have received this email in error please contact the sender and delete the material from any computer.
_______________________________________________
mdt-papyrus.dev mailing list
mdt-papyrus.dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/mdt-papyrus.dev

<<winmail.dat>>


Back to the top