Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Papyrus » 4.2RC3 : datatype with properties :: cannot assign property value in 'Properties'-View(4.2RC3 : datatype with properties :: cannot assign property value in 'Properties'-View)
icon5.gif  4.2RC3 : datatype with properties :: cannot assign property value in 'Properties'-View [message #888751] Mon, 18 June 2012 15:24 Go to next message
martin schwehla is currently offline martin schwehlaFriend
Messages: 8
Registered: June 2012
Junior Member
Hello everyone,

I am quite new to papyrus and need some advice from you experts:

My goal is to model databases using a class diagram and applying a codegenerator for generating ddl-code using the juno-release

== progress so far ==

* setup metamodel by creating a new profile

create Stereotype <BusinessEntity> extends metamodel class
custom datatype: varchar, number, date (plain, no connections to some metamodel)

each custum datatype has some properties like fraction digit and so on



* apply metamodel
created papyrus-project and attached metamodel

Question 1:

when perform the action 'Model Explorer' [context-menu:import->import registered profile] my profile does not appear. How can i add my metamodel in this list ?

I apply my steretype by selecting my model -> Properties -> Profile -> Apply Profiles, this works just fine.

I've created a new class-diagramm and can apply my stereotype to the classes and can add properties to them like 'salary' with the datatype 'number'.

My problem is now that i cannot edit the custom properties in the 'Properties'-View in papyrus when selecting the property 'salary'. I want to set the fraction digits for that.

Can one please give me a hint how to do this ? If one help me i will write a tutorial. All the documentary i have found is stereotype-specific

Thank you
Martin


Re: 4.2RC3 : datatype with properties :: cannot assign property value in 'Properties'-View [message #888757 is a reply to message #888751] Mon, 18 June 2012 15:33 Go to previous messageGo to next message
Camille Letavernier is currently offline Camille LetavernierFriend
Messages: 952
Registered: February 2011
Senior Member
Hello Martin,

Quote:
when perform the action 'Model Explorer' [context-menu:import->import registered profile] my profile does not appear. How can i add my metamodel in this list ?


You have to create a plug-in, and use the "org.eclipse.papyrus.extensionpoints.uml2.UMLProfile" extension point to register your profile. However, this is not required, as you can still use the "Apply profile" (From local workspace) button from the Profile tab of the properties view.

Quote:
My problem is now that i cannot edit the custom properties in the 'Properties'-View in papyrus when selecting the property 'salary'. I want to set the fraction digits for that.


Datatypes properties are currently considered as String properties. Can't you edit them at all ? It seems to work fine for me.

Profile tab > Unfold your stereotype > Select the property 'salary' > Use the Text box on the right to edit the value (As a String)


Regards,
Camille


Camille Letavernier
Re: 4.2RC3 : datatype with properties :: cannot assign property value in 'Properties'-View [message #888813 is a reply to message #888757] Mon, 18 June 2012 16:58 Go to previous messageGo to next message
martin schwehla is currently offline martin schwehlaFriend
Messages: 8
Registered: June 2012
Junior Member
Hello Camille,

thank your for your quick reply. I know that stereotypes have string-properties to edit but my datatype have no stereotype at all.

I've added a screenshot for better understanding. May you have a look at it ? (sorry for bad resolution). Maybe i need to define 'subsetted property' to adress the nested properties of my datatype 'Number' ?

Again: My usecase is to model a class as representing a database table. One property represents a column. I need to specify the colum (name, comment, fraction, type and so on) and want to store this information in the uml-model. The right place for me seems to be some nested properties defined in the datatype number, varchar and so on.

greetings
Martin.
Re: 4.2RC3 : datatype with properties :: cannot assign property value in 'Properties'-View [message #889384 is a reply to message #888813] Tue, 19 June 2012 07:22 Go to previous messageGo to next message
Camille Letavernier is currently offline Camille LetavernierFriend
Messages: 952
Registered: February 2011
Senior Member
Hello,

What I actually meant is that the Datatypes structure is lost when you apply the stereotype. The properties typed by a structured datatype are actually considered as String properties.

375029: [Profile definition] Profile Datatypes should be defined as EClasses instead of Strings
https://bugs.eclipse.org/bugs/show_bug.cgi?id=375029


Regards,
Camille


Camille Letavernier
Re: 4.2RC3 : datatype with properties :: cannot assign property value in 'Properties'-View [message #889730 is a reply to message #889384] Tue, 19 June 2012 14:18 Go to previous messageGo to next message
martin schwehla is currently offline martin schwehlaFriend
Messages: 8
Registered: June 2012
Junior Member
Hello Camille,

good to see that this issue is already being adressed.

I am a beginner in papyrus and still learning. As far as i understand this problem have nothing to do with stereotypes. I've created an other sample using just one class and a datatype defined in the same model. I still can't easily set values from that datatype using the property-view. (see screenshot er_diagramm.JPG, good quality this time Very Happy )

However i will have a look if i can cover my usecase with subproperties.

thank you for your help.

mercy
martin.
Re: 4.2RC3 : datatype with properties :: cannot assign property value in 'Properties'-View [message #891377 is a reply to message #888751] Sun, 24 June 2012 21:05 Go to previous messageGo to next message
Eclipse UserFriend
Martin,

what you want to achieve is semantically not correct. You want to set the
value of a property at type level. Please be aware that concrete values are
not set at type level (well, defalt values can be set anyway for a
property), but at instance (specification) level. So you would have to
create an InstanceSpecification (e.g. for Number) with slots representing
concrete value (specifications) for a particular property.

What you've tried in your latest post (property subsetting) is semantically
wrong.

HTH
Florian

"martin schwehla" schrieb im Newsbeitrag
news:jrnh73$u4a$1@xxxxxxxxe.org...

Hello everyone,

I am quite new to papyrus and need some advice from you experts:

My goal is to model databases using a class diagram and applying a
codegenerator for generating ddl-code using the juno-release

== progress so far ==

* setup metamodel by creating a new profile

create Stereotype <BusinessEntity> extends metamodel class
custom datatype: varchar, number, date (plain, no connections to some
metamodel)

each custum datatype has some properties like fraction digit and so on



* apply metamodel
created papyrus-project and attached metamodel

Question 1:

when perform the action 'Model Explorer' [context-menu:import->import
registered profile] my profile does not appear. How can i add my metamodel
in this list ?

I apply my steretype by selecting my model -> Properties -> Profile -> Apply
Profiles, this works just fine.

I've created a new class-diagramm and can apply my stereotype to the classes
and can add properties to them like 'salary' with the datatype 'number'.

My problem is now that i cannot edit the custom properties in the
'Properties'-View in papyrus when selecting the property 'salary'. I want to
set the fraction digits for that.

Can one please give me a hint how to do this ? If one help me i will write a
tutorial. All the documentary i have found is stereotype-specific

Thank you
Martin
icon14.gif  Re: 4.2RC3 : datatype with properties :: cannot assign property value in 'Properties'-View [message #891677 is a reply to message #891377] Mon, 25 June 2012 13:32 Go to previous message
martin schwehla is currently offline martin schwehlaFriend
Messages: 8
Registered: June 2012
Junior Member
you are right i had mixed up something.

I've definded a stereotype 'EntityAttribute' that has nested properties like 'comment' and so on. These can i use to specify my attributes in more detail and can edit as well.

Thank you for pointing me in the right direction.

Martin.

Previous Topic:dragging a class from another diagram doesn't create a reference
Next Topic:UML elements
Goto Forum:
  


Current Time: Fri Mar 29 05:12:33 GMT 2024

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

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

Back to the top