Bug 420379 - C++ gen, choosing "Open a CDT Editor" on an operation generates invalid code
Summary: C++ gen, choosing "Open a CDT Editor" on an operation generates invalid code
Status: NEW
Alias: None
Product: Papyrus
Classification: Modeling
Component: Designer (show other bugs)
Version: unspecified   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-10-25 08:57 EDT by Andrew Eidsness CLA
Modified: 2017-09-08 11:35 EDT (History)
2 users (show)

See Also:


Attachments
context-menu for Operation (115.28 KB, image/png)
2013-10-25 08:57 EDT, Andrew Eidsness CLA
no flags Details
context-menu for Opaque Behaviour (117.45 KB, image/png)
2013-10-25 08:57 EDT, Andrew Eidsness CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Andrew Eidsness CLA 2013-10-25 08:57:07 EDT
Created attachment 236895 [details]
context-menu for Operation

When using "Open a CDT Editor" on an operation the generator treats the uml:Operation as though it were a uml:Class.

For example, if the model has a class called Class2 with an operation called virtualOp, then using this menu item opens an editor tab called "CDT virtualOp" that contains:

    // --------------------------------------------------------
    // Code generated by Papyrus C++
    // --------------------------------------------------------

    #define Model_Class2_virtualOp_BODY

    /************************************************************
     virtualOp class body
     ************************************************************/

    // include associated header file
    #include </virtualOp.h>

    // Derived includes directives

    namespace Class2 {

    // static attributes (if any)

    }// of namespace Class2

    /************************************************************
     End of virtualOp class body
     ************************************************************/

The class is generated as though it were a package, and the opaque behaviour is generated as though it were a class.
        
The menu item is not visible in the context menu for the operation (see attached screenshot), but is visible in the context menu for the opaque behaviour (I'll attach a screenshot next).
Comment 1 Andrew Eidsness CLA 2013-10-25 08:57:33 EDT
Created attachment 236896 [details]
context-menu for Opaque Behaviour