Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Papyrus » [Table] Modify several fields based on selected reference
[Table] Modify several fields based on selected reference [message #1752012] Tue, 17 January 2017 18:56 Go to next message
Johan Van Noten is currently offline Johan Van NotenFriend
Messages: 87
Registered: July 2009
Member
Hi all,

I'm customizing a Papyrus table.

For one of my columns, I have created a custom cell editor, extending the SingleReferenceValueCellEditor. This cell editor pops up a dialog that allows the user to select an object in a custom tree view.

Typically, the selected object is passed to the cell editor's edithandler in order to update the underlying table accordingly.
For my specific needs, the selected object:
* Is not an EObject from the model
* Instead contains two EObjects that should be assigned to two columns.

For plain Nattables, I guess replacing the UpdateCommandHandler would provide a solution.
What is the most appropriate way to cause this behavior in the Papyrus Tables?

Best regards,
Johan
Re: [Table] Modify several fields based on selected reference [message #1752047 is a reply to message #1752012] Wed, 18 January 2017 09:33 Go to previous message
Vincent Lorenzo is currently offline Vincent LorenzoFriend
Messages: 249
Registered: June 2010
Location: Paris Saclay, France
Senior Member
Hi Johan,
I think your dialog should return a map <axisToEdit, newValue> or your own structure with the required information.
Then, you should create your own CellManager (extending
org.eclipse.papyrus.infra.nattable.manager.cell.AbstractCellManager
) and declared with the extrension point (
org.eclipse.papyrus.infra.nattable.cellmanager
) to manage the set value as you want.

/Vincent
Previous Topic:Icon presentation for elements in diagrams
Next Topic:Oomph setup problems
Goto Forum:
  


Current Time: Sat Apr 27 00:46:02 GMT 2024

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

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

Back to the top