Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Papyrus » Customize a Papyrus Nattable
Customize a Papyrus Nattable [message #1489718] Thu, 27 November 2014 16:17 Go to next message
Nicholas Pacini is currently offline Nicholas PaciniFriend
Messages: 24
Registered: June 2014
Junior Member
Hello all,

I'm trying to add a custom Nattable editor to the Papyrus Model Explorer.

I've followed the examples already available in the current version of Papyrus (for example the RequirementTable), as i haven't found much documentation elsewhere.

Mi aim is to create a table which allows the user to add UML Comments, with a custom stereotype ,and to display the properties of the stereotype in the rows of the table. (similar to the aforementioned RequirementTable)

Up to now, i've managed to create the table and to create comments from the contextual menu, but i can't apply the stereotype automatically, so the new comment is not shown in the table unless i apply the stereotype by hand.

if anyone could give me any support on this issue it would be much appreciated.

To reproduce the issue, I'm attaching the plugin under development (and the custom profile) and a papyrus model i use for testing. I'm developing on Eclipse 4.4, with Papyrus 1.0.1 in Win64 environment and Java1.7

bye,
Nicholas
Re: Customize a Papyrus Nattable [message #1490637 is a reply to message #1489718] Fri, 28 November 2014 09:56 Go to previous messageGo to next message
vincent lorenzo is currently offline vincent lorenzoFriend
Messages: 132
Registered: June 2010
Location: Paris Saclay, France
Senior Member
Hi Nicholas,
There are two possible solutions for your problems :
1/ you can accept all comments in your table, editing a cell requiring our stereotype will apply this stereotype on our comment
or 2/ Create your own new child menu in the Model Explorer (you can see the Papyrus User documentation, item Menu New Child) This documentation is embedded in our Eclipse installation and in the plugin org.eclipse.papyrus.infra.newchild.
The creation of your own new child menu requires to create object called "extended type" for each stereotype of your profile. You can use the plugin org.eclipse.papyrus.infra.extendedtypes.tests as example. This plugin is stored in the papyrus git : tests/junit/plugins/core
Re: Customize a Papyrus Nattable [message #1490650 is a reply to message #1490637] Fri, 28 November 2014 10:11 Go to previous messageGo to next message
Nicholas Pacini is currently offline Nicholas PaciniFriend
Messages: 24
Registered: June 2014
Junior Member
Hi Vincent,

Thank you very much for your reply, i'll try the solutions you have provided very soon!

bye,
Nicholas
Re: Customize a Papyrus Nattable [message #1494218 is a reply to message #1490650] Mon, 01 December 2014 09:22 Go to previous message
Nicholas Pacini is currently offline Nicholas PaciniFriend
Messages: 24
Registered: June 2014
Junior Member
Hello Vincent and everyone,

i've tried your first suggestion, but i'm afraid i'm missing something else:
i've changed my Axis Manager to accept all comments so that when creating a new comment, it is visualized correctly in the table.
However, i'm not sure how i can apply the stereotype when editing a cell, in fact i can't even edit a cell!
Have you got any further suggestion?

Thanks a lot,
Nicholas

EDIT: it is not true that i can't edit a cell. The stereotype i'd like to apply has several properties typed with MARTE data types, such as NFP_Duration.
The cells corresoponding to those proerties are not editable. Others (typed as String, for instance) are editable.

[Updated on: Wed, 03 December 2014 15:40]

Report message to a moderator

Previous Topic:Complex C++ Types
Next Topic:Simulation under Papyrus
Goto Forum:
  


Current Time: Fri Jul 03 20:56:22 GMT 2020

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

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

Back to the top