Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » [DataBinding] Using ControlDecoration in data binding snippets
[DataBinding] Using ControlDecoration in data binding snippets [message #328671] Sat, 31 May 2008 11:04 Go to next message
Eclipse UserFriend
Originally posted by: malloovidio.bluewin.ch

Hi all,

I wanted to use the ControlDecoration class to visualize the validation
status of a Binding on the corresponding UI control. In order to retrieve
the decoration images predefined in JFace, I'm using the following code

FieldDecorationRegistry.getDefault().getFieldDecoration(
FieldDecorationRegistry.DEC_ERROR).getImage();

However, this always results in the below exception being thrown as the
images seem not to be found. I guess it's once more some CLASSPATH/ClassLoader
problem but I cannot figure out what I have to do to be able to use those
images from within the data binding snippets (without having to hardcode
the images' path).

Any suggenstions? Thanks in advance!

Regards,
Ovidio


The image could not be loaded: FileImageDescriptor(location=class
org.eclipse.jface.fieldassist.FieldDecorationRegistry, name=images/error_ovr.gif)
org.eclipse.jface.resource.DeviceResourceException: Unable to create resource
FileImageDescriptor(location=class
org.eclipse.jface.fieldassist.FieldDecorationRegistry, name=images/error_ovr.gif)
at
org.eclipse.jface.resource.ImageDescriptor.createResource(Im ageDescriptor.java:167)
at
org.eclipse.jface.resource.DeviceResourceManager.allocate(De viceResourceManager.java:56)
at
org.eclipse.jface.resource.AbstractResourceManager.create(Ab stractResourceManager.java:88)
at
org.eclipse.jface.resource.ResourceManager.createImageWithDe fault(ResourceManager.java:192)
at org.eclipse.jface.resource.ImageRegistry.get(ImageRegistry.j ava:211)
at
org.eclipse.jface.fieldassist.FieldDecorationRegistry$Entry. getDecoration(FieldDecorationRegistry.java:197)
at
org.eclipse.jface.fieldassist.FieldDecorationRegistry.recomp uteMaximums(FieldDecorationRegistry.java:401)
at
org.eclipse.jface.fieldassist.FieldDecorationRegistry.regist erFieldDecoration(FieldDecorationRegistry.java:348)
at
org.eclipse.jface.fieldassist.FieldDecorationRegistry.<clinit >(FieldDecorationRegistry.java:138)
at
org.eclipse.jface.examples.databinding.snippets.Snippet000He lloWorld$1.run(Snippet000HelloWorld.java:41)
at org.eclipse.core.databinding.observable.Realm.runWithDefault (Realm.java:288)
at
org.eclipse.jface.examples.databinding.snippets.Snippet000He lloWorld.main(Snippet000HelloWorld.java:38)
Re: [DataBinding] Using ControlDecoration in data binding snippets [message #328686 is a reply to message #328671] Mon, 02 June 2008 08:50 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: malloovidio.bluewin.ch

Hi again,

it seems as if it was some bug. I was having that problem with Eclipse
Ganymed M6 but with the RC1 version which I have just downloaded, the
exception is gone.

Regards,
Ovidio


Ovidio Mallo wrote:
> Hi all,
>
> I wanted to use the ControlDecoration class to visualize the validation
> status of a Binding on the corresponding UI control. In order to retrieve
> the decoration images predefined in JFace, I'm using the following code
>
>
> FieldDecorationRegistry.getDefault().getFieldDecoration(
> FieldDecorationRegistry.DEC_ERROR).getImage();
>
> However, this always results in the below exception being thrown as the
> images seem not to be found. I guess it's once more some
> CLASSPATH/ClassLoader
> problem but I cannot figure out what I have to do to be able to use those
> images from within the data binding snippets (without having to hardcode
> the images' path).
>
> Any suggenstions? Thanks in advance!
>
> Regards,
> Ovidio
>
>
> The image could not be loaded: FileImageDescriptor(location=class
> org.eclipse.jface.fieldassist.FieldDecorationRegistry,
> name=images/error_ovr.gif)
> org.eclipse.jface.resource.DeviceResourceException: Unable to create
> resource FileImageDescriptor(location=class
> org.eclipse.jface.fieldassist.FieldDecorationRegistry,
> name=images/error_ovr.gif)
> at
> org.eclipse.jface.resource.ImageDescriptor.createResource(Im ageDescriptor.java:167)
>
> at
> org.eclipse.jface.resource.DeviceResourceManager.allocate(De viceResourceManager.java:56)
>
> at
> org.eclipse.jface.resource.AbstractResourceManager.create(Ab stractResourceManager.java:88)
>
> at
> org.eclipse.jface.resource.ResourceManager.createImageWithDe fault(ResourceManager.java:192)
>
> at org.eclipse.jface.resource.ImageRegistry.get(ImageRegistry.j ava:211)
> at
> org.eclipse.jface.fieldassist.FieldDecorationRegistry$Entry. getDecoration(FieldDecorationRegistry.java:197)
>
> at
> org.eclipse.jface.fieldassist.FieldDecorationRegistry.recomp uteMaximums(FieldDecorationRegistry.java:401)
>
> at
> org.eclipse.jface.fieldassist.FieldDecorationRegistry.regist erFieldDecoration(FieldDecorationRegistry.java:348)
>
> at
> org.eclipse.jface.fieldassist.FieldDecorationRegistry.<clinit >(FieldDecorationRegistry.java:138)
>
> at
> org.eclipse.jface.examples.databinding.snippets.Snippet000He lloWorld$1.run(Snippet000HelloWorld.java:41)
>
> at
> org.eclipse.core.databinding.observable.Realm.runWithDefault (Realm.java:288)
>
> at
> org.eclipse.jface.examples.databinding.snippets.Snippet000He lloWorld.main(Snippet000HelloWorld.java:38)
>
Re: [DataBinding] Using ControlDecoration in data binding snippets [message #328687 is a reply to message #328686] Mon, 02 June 2008 09:15 Go to previous message
Thomas Schindl is currently offline Thomas SchindlFriend
Messages: 6651
Registered: July 2009
Senior Member
Yes there was a change in how ImageDescriptors work and there was a bug
introduced some time in the dev-cycle.

Tom

Ovidio Mallo schrieb:
> Hi again,
>
> it seems as if it was some bug. I was having that problem with Eclipse
> Ganymed M6 but with the RC1 version which I have just downloaded, the
> exception is gone.
>
> Regards,
> Ovidio
>
>
> Ovidio Mallo wrote:
>> Hi all,
>>
>> I wanted to use the ControlDecoration class to visualize the validation
>> status of a Binding on the corresponding UI control. In order to retrieve
>> the decoration images predefined in JFace, I'm using the following code
>>
>>
>> FieldDecorationRegistry.getDefault().getFieldDecoration(
>> FieldDecorationRegistry.DEC_ERROR).getImage();
>>
>> However, this always results in the below exception being thrown as the
>> images seem not to be found. I guess it's once more some
>> CLASSPATH/ClassLoader
>> problem but I cannot figure out what I have to do to be able to use those
>> images from within the data binding snippets (without having to hardcode
>> the images' path).
>>
>> Any suggenstions? Thanks in advance!
>>
>> Regards,
>> Ovidio
>>
>>
>> The image could not be loaded: FileImageDescriptor(location=class
>> org.eclipse.jface.fieldassist.FieldDecorationRegistry,
>> name=images/error_ovr.gif)
>> org.eclipse.jface.resource.DeviceResourceException: Unable to create
>> resource FileImageDescriptor(location=class
>> org.eclipse.jface.fieldassist.FieldDecorationRegistry,
>> name=images/error_ovr.gif)
>> at
>> org.eclipse.jface.resource.ImageDescriptor.createResource(Im ageDescriptor.java:167)
>>
>> at
>> org.eclipse.jface.resource.DeviceResourceManager.allocate(De viceResourceManager.java:56)
>>
>> at
>> org.eclipse.jface.resource.AbstractResourceManager.create(Ab stractResourceManager.java:88)
>>
>> at
>> org.eclipse.jface.resource.ResourceManager.createImageWithDe fault(ResourceManager.java:192)
>>
>> at
>> org.eclipse.jface.resource.ImageRegistry.get(ImageRegistry.j ava:211)
>> at
>> org.eclipse.jface.fieldassist.FieldDecorationRegistry$Entry. getDecoration(FieldDecorationRegistry.java:197)
>>
>> at
>> org.eclipse.jface.fieldassist.FieldDecorationRegistry.recomp uteMaximums(FieldDecorationRegistry.java:401)
>>
>> at
>> org.eclipse.jface.fieldassist.FieldDecorationRegistry.regist erFieldDecoration(FieldDecorationRegistry.java:348)
>>
>> at
>> org.eclipse.jface.fieldassist.FieldDecorationRegistry.<clinit >(FieldDecorationRegistry.java:138)
>>
>> at
>> org.eclipse.jface.examples.databinding.snippets.Snippet000He lloWorld$1.run(Snippet000HelloWorld.java:41)
>>
>> at
>> org.eclipse.core.databinding.observable.Realm.runWithDefault (Realm.java:288)
>>
>> at
>> org.eclipse.jface.examples.databinding.snippets.Snippet000He lloWorld.main(Snippet000HelloWorld.java:38)
>>


--
B e s t S o l u t i o n . at
------------------------------------------------------------ --------
Tom Schindl JFace-Committer
------------------------------------------------------------ --------
Previous Topic:Not able to right click the project tree view on hte left pane in eclipse 3.3.2
Next Topic:Combining wizards
Goto Forum:
  


Current Time: Sat Apr 27 22:04:12 GMT 2024

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

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

Back to the top