Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » JFace » JFace Data Binding/Getting started
JFace Data Binding/Getting started [message #561] Mon, 04 May 2009 17:34 Go to next message
Igor Ganapolsky is currently offline Igor GanapolskyFriend
Messages: 39
Registered: July 2009
Location: New York
Member

Hello,
I am following the JFace Data Binding/Getting started article on
http://wiki.eclipse.org/JFace_Data_Binding/Getting_started, which was
written by Boris Bokowski and Frank Schaare. I am getting several
compilation errors in this example, but the most notable one is in
SWTObservables.java. The line import sun.security.krb5.Realm gives an
error: "Access restriction: The type Realm is not accessible due to
restriction on required library C:\Program Files\Java\jre6\lib\rt.jar."

Here are my two concerns:
1) I checked access permissions on this jar file, and everything seems
fine.
2) Why is this import specified in the first place? Can't we just use the
Realm object that was defined by Eclipse, instead of Sun??
Re: JFace Data Binding/Getting started [message #573 is a reply to message #561] Mon, 04 May 2009 18:52 Go to previous messageGo to next message
Boris Bokowski is currently offline Boris BokowskiFriend
Messages: 272
Registered: July 2009
Senior Member
You somehow got the wrong import for Realm... see
http://wiki.eclipse.org/JFace_Data_Binding/Getting_started#E xample_Code -
the first sentence of that section states that the import should be:

import org.eclipse.core.databinding.observable.Realm;

Boris

"Igor Ganapolsky" <eazyigz@gmail.com> wrote in message
news:da6fd03f6fa2339c0819a4c5ccadbf88$1@www.eclipse.org...
> Hello,
> I am following the JFace Data Binding/Getting started article on
> http://wiki.eclipse.org/JFace_Data_Binding/Getting_started, which was
> written by Boris Bokowski and Frank Schaare. I am getting several
> compilation errors in this example, but the most notable one is in
> SWTObservables.java. The line import sun.security.krb5.Realm gives an
> error: "Access restriction: The type Realm is not accessible due to
> restriction on required library C:\Program Files\Java\jre6\lib\rt.jar."
>
> Here are my two concerns:
> 1) I checked access permissions on this jar file, and everything seems
> fine.
> 2) Why is this import specified in the first place? Can't we just use the
> Realm object that was defined by Eclipse, instead of Sun??
>
Re: JFace Data Binding/Getting started [message #586 is a reply to message #573] Mon, 04 May 2009 19:45 Go to previous messageGo to next message
Igor Ganapolsky is currently offline Igor GanapolskyFriend
Messages: 39
Registered: July 2009
Location: New York
Member

Thank you, my mistake. However, there is still a compilation error in
SWTObservables.java. Namely, in this method:
public static ISWTObservableValue observeDelayedValue(int delay,
ISWTObservableValue observable) {
return new SWTDelayedObservableValueDecorator(Observables
.observeDelayedValue(delay, observable), observable.getWidget());
}

I get an error "The method observeDelayedValue(int, ISWTObservableValue)
is undefined for the type Observables". Any ideas?

I feel that SWTObservables should have been explained in this tutorial.
Re: JFace Data Binding/Getting started [message #599 is a reply to message #586] Mon, 04 May 2009 19:59 Go to previous messageGo to next message
Igor Ganapolsky is currently offline Igor GanapolskyFriend
Messages: 39
Registered: July 2009
Location: New York
Member

Ok, I resolved the last error by using the following method signature:
SWTDelayedObservableValueDecorator(observable, observable
.getWidget());

The only problem left is when I run GettingStarted I get this error:
Exception in thread "main" java.lang.Error: Unresolved compilation
problem:
The method runWithDefault(Realm, Runnable) in the type Realm is not
applicable for the arguments (Realm, new Runnable(){})

at starting.GettingStarted.main(GettingStarted.java:84)


Any suggestions about this? Thank you.
Re: JFace Data Binding/Getting started [message #610 is a reply to message #599] Mon, 04 May 2009 22:42 Go to previous messageGo to next message
Lars Vogel is currently offline Lars VogelFriend
Messages: 1098
Registered: July 2009
Senior Member

Hi Igor,

a JFace databinding example for the list viewer is also included in this
tutorial:

http://www.vogella.de/articles/EclipseDataBinding/article.ht ml

Best regards, Lars

Igor Ganapolsky wrote:
> Ok, I resolved the last error by using the following method signature:
> SWTDelayedObservableValueDecorator(observable, observable
> .getWidget());
>
> The only problem left is when I run GettingStarted I get this error:
> Exception in thread "main" java.lang.Error: Unresolved compilation
> problem: The method runWithDefault(Realm, Runnable) in the type
> Realm is not applicable for the arguments (Realm, new Runnable(){})
>
> at starting.GettingStarted.main(GettingStarted.java:84)
>
>
> Any suggestions about this? Thank you.
>
>
Re: JFace Data Binding/Getting started [message #623 is a reply to message #610] Mon, 04 May 2009 22:45 Go to previous messageGo to next message
Lars Vogel is currently offline Lars VogelFriend
Messages: 1098
Registered: July 2009
Senior Member

Sorry, I misread your post. I believed you were asking explicitly for a
JFace viewer databinding example.

The tutorial posted above can also serve as a general introduction into
JFace Databinding.

Lars Vogel wrote:
> Hi Igor,
>
> a JFace databinding example for the list viewer is also included in this
> tutorial:
>
> http://www.vogella.de/articles/EclipseDataBinding/article.ht ml
>
> Best regards, Lars
>
> Igor Ganapolsky wrote:
>> Ok, I resolved the last error by using the following method signature:
>> SWTDelayedObservableValueDecorator(observable, observable
>> .getWidget());
>>
>> The only problem left is when I run GettingStarted I get this error:
>> Exception in thread "main" java.lang.Error: Unresolved compilation
>> problem: The method runWithDefault(Realm, Runnable) in the type
>> Realm is not applicable for the arguments (Realm, new Runnable(){})
>>
>> at starting.GettingStarted.main(GettingStarted.java:84)
>>
>>
>> Any suggestions about this? Thank you.
>>
>>
Re: JFace Data Binding/Getting started [message #634 is a reply to message #599] Tue, 05 May 2009 16:00 Go to previous messageGo to next message
Boris Bokowski is currently offline Boris BokowskiFriend
Messages: 272
Registered: July 2009
Senior Member
Igor,

> The only problem left is when I run GettingStarted I get this error:
> Exception in thread "main" java.lang.Error: Unresolved compilation
> problem: The method runWithDefault(Realm, Runnable) in the type Realm is
> not applicable for the arguments (Realm, new Runnable(){})

Sounds like two different classes called "Realm" are at play. Are you sure
that your imports are right, i.e. no sun.security.krb5.Realm?

Boris
Re: JFace Data Binding/Getting started [message #645 is a reply to message #634] Tue, 05 May 2009 22:11 Go to previous messageGo to next message
Igor Ganapolsky is currently offline Igor GanapolskyFriend
Messages: 39
Registered: July 2009
Location: New York
Member

Boris, here are all my imports for GettingStarted.java. Are these what
you were intending to include the tutorial?

import java.beans.PropertyChangeListener;
import java.beans.PropertyChangeSupport;
import org.eclipse.core.databinding.AggregateValidationStatus;
import org.eclipse.core.databinding.DataBindingContext;
import org.eclipse.core.databinding.beans.BeansObservables;
import org.eclipse.core.databinding.observable.Realm;
import org.eclipse.core.databinding.observable.value.IObservableVal ue;
import org.eclipse.jface.databinding.swt.SWTObservables;
import org.eclipse.jface.layout.GridLayoutFactory;
import org.eclipse.swt.SWT;
import org.eclipse.swt.events.SelectionAdapter;
import org.eclipse.swt.events.SelectionEvent;
import org.eclipse.swt.widgets.Button;
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.swt.widgets.Text;
Re: JFace Data Binding/Getting started [message #1493 is a reply to message #645] Wed, 06 May 2009 14:22 Go to previous messageGo to next message
Boris Bokowski is currently offline Boris BokowskiFriend
Messages: 272
Registered: July 2009
Senior Member
Weird - it just works for me. Let me attach the complete file.

Boris

"Igor Ganapolsky" <eazyigz@gmail.com> wrote in message
news:053133056d2be5883aa7ca2de69540ec$1@www.eclipse.org...
> Boris, here are all my imports for GettingStarted.java. Are these what
> you were intending to include the tutorial?
>
> import java.beans.PropertyChangeListener;
> import java.beans.PropertyChangeSupport;
> import org.eclipse.core.databinding.AggregateValidationStatus;
> import org.eclipse.core.databinding.DataBindingContext;
> import org.eclipse.core.databinding.beans.BeansObservables;
> import org.eclipse.core.databinding.observable.Realm;
> import org.eclipse.core.databinding.observable.value.IObservableVal ue;
> import org.eclipse.jface.databinding.swt.SWTObservables;
> import org.eclipse.jface.layout.GridLayoutFactory;
> import org.eclipse.swt.SWT;
> import org.eclipse.swt.events.SelectionAdapter;
> import org.eclipse.swt.events.SelectionEvent;
> import org.eclipse.swt.widgets.Button;
> import org.eclipse.swt.widgets.Display;
> import org.eclipse.swt.widgets.Label;
> import org.eclipse.swt.widgets.Shell;
> import org.eclipse.swt.widgets.Text;
>


Re: JFace Data Binding/Getting started [message #4148 is a reply to message #1493] Tue, 12 May 2009 17:13 Go to previous messageGo to next message
Igor Ganapolsky is currently offline Igor GanapolskyFriend
Messages: 39
Registered: July 2009
Location: New York
Member

Hi Boris, the code you attached isn't legible. Did it get converted to
ASCII?
Re: JFace Data Binding/Getting started [message #6049 is a reply to message #4148] Fri, 15 May 2009 13:57 Go to previous message
Boris Bokowski is currently offline Boris BokowskiFriend
Messages: 272
Registered: July 2009
Senior Member
Weird - I can open the attachment just fine. Try this:
http://pastebin.ca/1423683

Boris

"Igor Ganapolsky" <eazyigz@gmail.com> wrote in message
news:54b51d686963b20bfba60c2f53e2c3ea$1@www.eclipse.org...
> Hi Boris, the code you attached isn't legible. Did it get converted to
> ASCII?
>
Previous Topic:Column Tree view question
Next Topic:CheckBoxTreeViewer and CellEditor combination is buggy
Goto Forum:
  


Current Time: Fri Apr 26 22:12:58 GMT 2024

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

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

Back to the top