Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Papyrus » Defining attribute text constants on class diagram(Defining attribute text constants on class diagram)
Defining attribute text constants on class diagram [message #1801934] Tue, 29 January 2019 15:46 Go to next message
Athanasios Viennas is currently offline Athanasios ViennasFriend
Messages: 12
Registered: June 2018
Junior Member
Hello! I am using Papyrus for UML (version 4.2.0.201812120922) on Eclipse
Version: 2018-12 (4.10.0) for MacOS.
The context is a class diagram whereby I have to define an attribute constant to hold a regex expression. The attribute text value follows:
+ pattern : PrimitiveTypes::String[1]="\\d{1,2}" {unique}

I am getting an EMF error for this. "A Property with invalid text string found"
any thoughs of what could be wrong with this syntax?
with kind regards
Athanasios

Re: Defining attribute text constants on class diagram [message #1802121 is a reply to message #1801934] Fri, 01 February 2019 14:39 Go to previous messageGo to next message
Carsten Pitz is currently offline Carsten PitzFriend
Messages: 479
Registered: May 2015
Location: Germany
Senior Member
Hi Athanasios.
I tried it using Papyrus 2018-12 (4.10.0) on Ubuntu 18.04 LTS and no EMF issue was raised. Even a validate model did not raise any issues.

I attached my Papyrus "project" export as reference.

/Carsten
  • Attachment: regex.zip
    (Size: 2.44KB, Downloaded 55 times)
Re: Defining attribute text constants on class diagram [message #1802123 is a reply to message #1802121] Fri, 01 February 2019 15:00 Go to previous messageGo to next message
Athanasios Viennas is currently offline Athanasios ViennasFriend
Messages: 12
Registered: June 2018
Junior Member
Hello Carsten, thank you very much for the follow-up and help. Having specified the constant value initially without double quotes showed the EMF error, then having tried to use double quotes didn't fix the error which makes sense because I hadn't focused out of the selected attribute and let the attribute repaint with the new "correct" assignment. Really glad there is no bug with this. Thank you very much!
Re: Defining attribute text constants on class diagram [message #1802124 is a reply to message #1802123] Fri, 01 February 2019 15:05 Go to previous message
Athanasios Viennas is currently offline Athanasios ViennasFriend
Messages: 12
Registered: June 2018
Junior Member

Oh well, it wasn't finally that. The handwritten assignment should have been placed after the curly block.

wrong

+ pattern : PrimitiveTypes::String[1]="\\d{1,2}" {unique}


correct

+ pattern : PrimitiveTypes::String[1] {unique}="\\d{1,2}" 
Previous Topic:Unable to Create Activity Diagram
Next Topic:Possibility to configure export image PPI
Goto Forum:
  


Current Time: Thu Apr 25 10:06:08 GMT 2024

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

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

Back to the top