Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Papyrus for Real Time » Region with the same label declared on line
Region with the same label declared on line [message #1776536] Fri, 17 November 2017 12:17 Go to next message
Sekwon Jang is currently offline Sekwon JangFriend
Messages: 10
Registered: November 2017
Junior Member
index.php/fa/31303/0/

I attached a image showing an error.
I think that it is a root cause to make functions that have same name.
Sometime, the code within error is deleted after code generation.
But it isn't an error in C++.
How to remove this error?
Re: Region with the same label declared on line [message #1776554 is a reply to message #1776536] Fri, 17 November 2017 16:13 Go to previous messageGo to next message
Ernesto Posse is currently offline Ernesto PosseFriend
Messages: 350
Registered: March 2011
Senior Member
Hmm.. That is strange. I think I can reproduce the error. I defined a method "Operation1" in a capsule, and overloaded it. The generated code is as follows:

void Capsule_Top::Operation1( int n )
{
    /* UMLRTGEN-USERREGION-BEGIN platform:/resource/MethodOverloading/MethodOverloading.uml MethodOverloading::Top operation Operation1 */
    cout << "int: " << n << endl;
    /* UMLRTGEN-USERREGION-END */
}

void Capsule_Top::Operation1( string s )
{
    /* UMLRTGEN-USERREGION-BEGIN platform:/resource/MethodOverloading/MethodOverloading.uml MethodOverloading::Top operation Operation1 */
    cout << "string: " << s << endl;
    /* UMLRTGEN-USERREGION-END */
}


As your example, the comments are exactly the same.

At first I did not get any errors. But after doing a "clean" on the project I got the error markers.

This is certainly a bug, and it is caused by the Papyrus-RT/CDT integration builder which doesn't know about method overloading.

Nevertheless it does not affect the correct compilation and execution of the model as long as you compile using the instructions found at [1].

Although it doesn't affect compilation itself, it is annoying having those errors. For now the only workaround is to open the "Problems" view, and under "Errors" select the errors corresponding to those markers, then right-click -> Delete. You may have to do this after every "clean".

Alternatively, do not use method-overloading.

[1] https://wiki.eclipse.org/Papyrus-RT/User_Guide/Compiling_and_running_Papyrus_for_Real_Time_applications

Re: Region with the same label declared on line [message #1776556 is a reply to message #1776554] Fri, 17 November 2017 16:25 Go to previous message
Ernesto Posse is currently offline Ernesto PosseFriend
Messages: 350
Registered: March 2011
Senior Member
FYI, I've opened Bug 527414 for this.
Previous Topic:Submodel
Next Topic:local transitions using/not using entry points
Goto Forum:
  


Current Time: Thu Sep 20 02:39:44 GMT 2018

Powered by FUDForum. Page generated in 0.02329 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top