Bug 527414 - [codegen][cdt] errors when overloading methods
Summary: [codegen][cdt] errors when overloading methods
Status: NEW
Alias: None
Product: Papyrus-rt
Classification: Modeling
Component: codegen (show other bugs)
Version: 1.0.0   Edit
Hardware: All All
: P3 normal
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-11-17 11:24 EST by Ernesto Posse CLA
Modified: 2017-11-17 11:56 EST (History)
1 user (show)

See Also:


Attachments
Sample model with overloaded methods (4.12 KB, application/zip)
2017-11-17 11:24 EST, Ernesto Posse CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Ernesto Posse CLA 2017-11-17 11:24:15 EST
Created attachment 271532 [details]
Sample model with overloaded methods

CDT integration generates errors on user-code region tags for overloaded methods (methods with the same name but different signature).


Steps to reproduce
==================

1. create a model with a capsule or class that has two operations with the same name but different parameters
2. generate code
3. open a CDT editor for the corresponding capsule or class and go to the functions for the operation
4. Select Project -> Clean... and clean the CDT project


Expected result
===============

The project is clean and there are no errors


Actual result
=============

There are error markers on the lines containing the tags defining the beginning and the ending of the user-code region in the body of the second instance of the method.

The errors are:

Duplicate editable region: Region with same label declared on line ...

and 

Unexpected region ending: Check for missing region begin tag ...

See the model attached. It contains a capsule that defines two variants of an operation called "Operation1".


Environment
===========

Papyrus-RT 1.0 RCP on macOS


Diagnosis
=========

The tags marking user code are the same for both instances of the overloaded method, so the CDT integration doesn't distinguish between them. The tags used in Operations need to include their signature (parameters with types).