Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » WindowBuilder » window builder & rap platform
window builder & rap platform [message #716283] Tue, 16 August 2011 21:48 Go to next message
bogdan toma is currently offline bogdan tomaFriend
Messages: 39
Registered: February 2010
Member
Hello all,

I am using the latest window builder. When building the GUI i have activated a RAP target platform(version 1.4).
I have a composite which i want to be reused.
Another composite is using it.
  public UsingExposedForExtending(Composite parent, int style)
    {
        super(parent, style);
        setLayout(new GridLayout(1, false));
        
        exposedForExtending = new ExposedForExtending(this, SWT.NONE);


public class ExposedForExtending extends Composite {
	private DataBindingContext m_bindingContext;
	private Binding mBinding;
	private Text text;
	private Composite composite;

	...
public ExposedForExtending(Composite parent, int style) {
		super(parent, style);
		setLayout(new GridLayout(1, false));
...
protected DataBindingContext initDataBindings() {
        DataBindingContext bindingContext = new DataBindingContext();
 ...


When i preview the UsingExposedForExtending i get an exception:
org.eclipse.core.runtime.AssertionFailedException: null argument:Validation realm cannot be null
at org.eclipse.core.runtime.Assert.isNotNull(Assert.java:85)
at org.eclipse.core.databinding.DataBindingContext.<init>(DataBindingContext.java:95)
at org.eclipse.core.databinding.DataBindingContext.<init>(DataBindingContext.java:82)
at de.softcon.wb.other.ExposedForExtending.initDataBindings(ExposedForExtending.java:140)
at de.softcon.wb.other.ExposedForExtending.<init>(ExposedForExtending.java:105)

When using a RCP target platform everything works well.
Maybe there is an idea (besides changing target) how to avoid this exception.

Thank you.
Re: window builder & rap platform [message #716312 is a reply to message #716283] Wed, 17 August 2011 02:47 Go to previous messageGo to next message
Eric Clayberg is currently offline Eric ClaybergFriend
Messages: 979
Registered: July 2009
Location: Boston, MA
Senior Member
Looks like you need to set up a Data Binding Realm. As I recall, RCP apps do that for you. I'm guessing that RAP apps don't, so you need to do that yourself. Sounds like a good question for the RAP or JFace forum. None of the WB committers are experts in using the Eclipse Data Binding framework, so we can't help you much there.

Re: window builder & rap platform [message #716348 is a reply to message #716312] Wed, 17 August 2011 06:32 Go to previous messageGo to next message
bogdan toma is currently offline bogdan tomaFriend
Messages: 39
Registered: February 2010
Member
Thank you for your reply.
My question is : how to add some custom code to WindowBuilder (in order that in preview to have this Data Binding Realm) ?

Thank you.
Re: window builder &amp; rap platform [message #716370 is a reply to message #716312] Wed, 17 August 2011 08:15 Go to previous messageGo to next message
Thomas Schindl is currently offline Thomas SchindlFriend
Messages: 6651
Registered: July 2009
Senior Member
Hi Eric,

You are right the RCP platform launches the whole framework using
Realm.runWithDefault(...).

I don't know how the WindowBuilder creates instances of the sources (i
guess they are created in a seperate Java-Process) so somehow you need
to set the realm, not?

Tom

Am 17.08.11 04:47, schrieb Eric Clayberg:
> Looks like you need to set up a Data Binding Realm. As I recall, RCP
> apps do that for you. I'm guessing that RAP apps don't, so you need to
> do that yourself. Sounds like a good question for the RAP or JFace
> forum. None of the WB committers are experts in using the Eclipse Data
> Binding framework, so we can't help you much there.
>
>
Re: window builder & rap platform [message #716554 is a reply to message #716283] Wed, 17 August 2011 16:56 Go to previous messageGo to next message
Konstantin Scheglov is currently offline Konstantin ScheglovFriend
Messages: 555
Registered: July 2009
Senior Member
bogdan.toma wrote on Tue, 16 August 2011 17:48

When using a RCP target platform everything works well.
Maybe there is an idea (besides changing target) how to avoid this exception.


Actually WindowBuilder does not support RAP, so while it accidentally works in some cases, does not mean that we tested and support RAP toolkit.

As Tom mentioned, when you use RCP, it already initializes Realm as process of starting Eclipse. But when you use different toolkit, Realm is not initialized for it. So, you need to write extension plugin for WindowBuilder to support RAP.


Konstantin Scheglov,
Google, Inc.
Re: window builder & rap platform [message #716584 is a reply to message #716554] Wed, 17 August 2011 18:59 Go to previous messageGo to next message
Eric Clayberg is currently offline Eric ClaybergFriend
Messages: 979
Registered: July 2009
Location: Boston, MA
Senior Member
In addition to adding first class support for RAP to WB, a quicker solution might be to just add code to your Composite to initialize the Realm if one isn't present.
Re: window builder & rap platform [message #716626 is a reply to message #716554] Wed, 17 August 2011 22:19 Go to previous messageGo to next message
bogdan toma is currently offline bogdan tomaFriend
Messages: 39
Registered: February 2010
Member
Thank for answer.

The code generated by WindowBuilder works quite well with the principle of single sourcing (except some issues...).
So I was hoping that also design time to work somehow...

Quote:
So, you need to write extension plugin for WindowBuilder to support RAP


Where do I start ? Is there a documentation for this ?
I want to get a feeling of what "writing an extension plugin" means.

Thank you.
Re: window builder & rap platform [message #717291 is a reply to message #716626] Fri, 19 August 2011 20:33 Go to previous messageGo to next message
Konstantin Scheglov is currently offline Konstantin ScheglovFriend
Messages: 555
Registered: July 2009
Senior Member
I'd start looking on eRCP or RCP plugins implementations, how they add new toolkit support.

Konstantin Scheglov,
Google, Inc.
icon3.gif  Re: window builder & rap platform [message #1691849 is a reply to message #717291] Fri, 10 April 2015 07:17 Go to previous message
Björn Harmen Gerth is currently offline Björn Harmen GerthFriend
Messages: 4
Registered: December 2014
Junior Member
For the curious: There is a related issue
Bug 389040 - Databinding support in the JEE mode
bugs.eclipse.org/bugs/show_bug.cgi?id=389040
Previous Topic:instalação
Next Topic:add image to label (XWT)
Goto Forum:
  


Current Time: Thu Apr 25 00:18:04 GMT 2024

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

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

Back to the top