Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF "Technology" (Ecore Tools, EMFatic, etc)  » [EMFForms] Tweak spacing of renderers
[EMFForms] Tweak spacing of renderers [message #1749068] Thu, 01 December 2016 14:37 Go to next message
Hauke Fuhrmann is currently offline Hauke FuhrmannFriend
Messages: 26
Registered: January 2016
Junior Member
Hi there,

the default EMF Forms SWT renderers have a grid layout with a vertical spacing of 5. Is this hardcoded or can it be changed by stylesheets (templates)?

I would like to create a very condensed layout and set the verticalSpacing to 0.

I tried by programmatically search the right Composite and tweak its Layout; however, changing the ViewModel will likely change the Composite structure, e.g. when adding Groups or stuff.
Any offical way to tweak this?

Cheers,
Hauke
Re: [EMFForms] Tweak spacing of renderers [message #1749149 is a reply to message #1749068] Fri, 02 December 2016 10:36 Go to previous messageGo to next message
Eugen Neufeld is currently offline Eugen NeufeldFriend
Messages: 174
Registered: May 2015
Senior Member
Hi Hauke,
the vertical spacing is the default setting of the gridlayout.
The easiest way to influence this is providing your own org.eclipse.emfforms.spi.swt.core.layout.LayoutProvider using the org.eclipse.emf.ecp.ui.view.swt.layoutProvider ExtensionPoint.

Cheers,
Eugen


--
Eugen Neufeld

Get professional Eclipse developer support:
http://eclipsesource.com/en/services/developer-support/
Re: [EMFForms] Tweak spacing of renderers [message #1751184 is a reply to message #1749149] Thu, 05 January 2017 13:35 Go to previous messageGo to next message
Hauke Fuhrmann is currently offline Hauke FuhrmannFriend
Messages: 26
Registered: January 2016
Junior Member
Thanks, Eugen.
Principally it seems to work. However, I get the exception below:

"org.eclipse.swt.SWTException: Failed to execute runnable (org.eclipse.e4.core.di.InjectionException: java.lang.IllegalStateException: There must be exactly one LayoutProvider!
Found 2 providers.
my.CustomLayoutProvider@b7bd26
org.eclipse.emf.ecp.view.swt.internal.layout.ECPLayoutProvider@c3f13e)"

To resolve, I had to remove the bundle "org.eclipse.emf.ecp.view.swt.layout" from my run-configuration. Then it worked.

However, this is not really feasible, because the bundle is part of the emfforms feature which we include in our product in order to avoid maintaining the list of required plug-ins manually and end in bundle-hell.
Any hint how to do this right?

Cheers,
Hauke
Re: [EMFForms] Tweak spacing of renderers [message #1751653 is a reply to message #1751184] Thu, 12 January 2017 09:46 Go to previous messageGo to next message
Eugen Neufeld is currently offline Eugen NeufeldFriend
Messages: 174
Registered: May 2015
Senior Member
Hi Hauke,
I see the problem.
You could try providing your layout provider as an OSGi Service witch provides the org.eclipse.emfforms.spi.swt.core.layout.LayoutProvider.
This way your layoutprovider should have a priority and be used over the default one provided via extension point.

Cheers,
Eugen


--
Eugen Neufeld

Get professional Eclipse developer support:
http://eclipsesource.com/en/services/developer-support/
Re: [EMFForms] Tweak spacing of renderers [message #1752063 is a reply to message #1751653] Wed, 18 January 2017 13:06 Go to previous message
Eugen Neufeld is currently offline Eugen NeufeldFriend
Messages: 174
Registered: May 2015
Senior Member
Hi Hauke,
You will need the 1.12 release in order to provide the layout provider as an OSGi Service. You can find the 1.12 M1 Build here:
http://download.eclipse.org/ecp/releases/releases_target_112/1120_M1/

Cheers,
Eugen


--
Eugen Neufeld

Get professional Eclipse developer support:
http://eclipsesource.com/en/services/developer-support/
Previous Topic:How to add parameters to texo annotations
Next Topic:[EMF Client Platform] Building a standalone product out of EMF CP?
Goto Forum:
  


Current Time: Thu Apr 25 04:25:21 GMT 2024

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

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

Back to the top