Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF "Technology" (Ecore Tools, EMFatic, etc)  » [EMF Forms] Custom table control
[EMF Forms] Custom table control [message #1698907] Thu, 18 June 2015 16:15 Go to next message
Tobias Zangl is currently offline Tobias ZanglFriend
Messages: 15
Registered: May 2015
Junior Member
Hey,

i want to change the behaviour of the table control renderer. For example i would like to add a column with checkboxes (instead of true/false), a column which content is created from referenced ecore data and values that can be changed inside the table without opening it in a new dialogue. Is there any way to do stuff like this in the model/genmodel ? And if not where should i start changing the table control render? Is it necessary to change the table domain model reference?
Is there a tutorial containing information about this?

Thanks in advance for any hints and help.

Greetings,
Tobi
Re: [EMF Forms] Custom table control [message #1698969 is a reply to message #1698907] Fri, 19 June 2015 08:29 Go to previous message
Eugen Neufeld is currently offline Eugen NeufeldFriend
Messages: 168
Registered: May 2015
Senior Member
Hi Tobi,
to get checkboxes instead of true/false, open the emfforms update site: EMF Forms Features -> EMFForms Table UI SWT Additional Cell Editors (non-RAP)
This feature is available since 1.6.

For everything else:
As far as I understand it, you want to change the way specific features are rendered inside a table.
To do so on a plain SWT Table you would need to provide CellEditors. You can do the same with EMFForms.

You will need 2 classes:
The CellEditor: It must extend the CellEditor (or a subclass of it) and the ECPCellEditor
The Tester: it must extends ECPCellEditorTester
The tester is used for determining which cell editor should be used, this way you can provide very specific cell renderer.
Then you have to provide those using the "org.eclipse.emf.ecp.edit.swt.cellEditor" extension point.
You can look at the implementation of the checkbox cell editor here: https://git.eclipse.org/c/emfclient/org.eclipse.emf.ecp.core.git/tree/bundles/org.eclipse.emf.ecp.view.table.celleditor.rcp

I don't really get this part: "values that can be changed inside the table without opening it in a new dialogue" .
The Table always allows inline editing. You need to select the row and then click inside a cell. The cell will probably change a bit the way it looks and thus get into an editable state.
You can additionally activate the option to edit the values in a dialog.

I think we don't have a tutorial about customizing tables yet.

Cheers,
Eugen


--
Eugen Neufeld

Get professional Eclipse developer support:
http://eclipsesource.com/en/services/developer-support/
Previous Topic:[EMF Edit] Browser/Session dependent localization
Next Topic:Is there a BNF grammar of Emfatic
Goto Forum:
  


Current Time: Sun Nov 29 00:13:49 GMT 2020

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

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

Back to the top