[DataBinding] Using ControlDecoration in data binding snippets [message #328671] |
Sat, 31 May 2008 07:04  |
Eclipse User |
|
|
|
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 04:50   |
Eclipse User |
|
|
|
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 05:15  |
Eclipse User |
|
|
|
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
------------------------------------------------------------ --------
|
|
|
Powered by
FUDForum. Page generated in 0.03710 seconds