Skip to main content



      Home
Home » Language IDEs » Java Development Tools (JDT) » -> Strange icon behaviour in jface TreeViewer
-> Strange icon behaviour in jface TreeViewer [message #87712] Thu, 21 August 2003 09:11 Go to next message
Eclipse UserFriend
Hi there,

Currently I develop a TreeViewer dialog using Eclipse 2.1.
I got a strange behaviour about the label icons, which I think is
incorrect. I would like to ask if the behaviour is corrected in 2.1.1 or
3.0.

Here is the 'problem':

this works: (first case)

myTreeViewer.setLabelProvider(myLabelProvider);
myTreeViewer.setInput(myInput);

this doesn't work: (first case)

myTreeViewer.setInput(myInput);
myTreeViewer.setLabelProvider(myLabelProvider);

The default label provider of myTreeViewer uses a
ImageDescriptor.getMissingImageDescriptor() to label
the tree items.

The myLabelProvider uses images of 16x16 but the
missing image has a size smaller than that (8x8 or 4x4 not sure).

So in the first case the tree is rendered using the correct
images and display 'em with a size of 16x16 (correct).

In the second case the tree is rendered using the correct
images but display 'em with a size of 8x8 (incorrect).

This brings me to the conclusion that if I ever change
the label provider I have to do something like:
setInput(getInput());

I think this should be done by the TreeViewer base
class ;)

I am using Eclipse 2.1 and Win2k.


Martin (Kersten)
Re: -> Strange icon behaviour in jface TreeViewer [message #88421 is a reply to message #87712] Fri, 22 August 2003 15:42 Go to previous messageGo to next message
Eclipse UserFriend
Should I file in a bug report on this?

Martin (Kersten)

> Hi there,
>
> Currently I develop a TreeViewer dialog using Eclipse 2.1.
> I got a strange behaviour about the label icons, which I think is
> incorrect. I would like to ask if the behaviour is corrected in 2.1.1 or
> 3.0.
>
> Here is the 'problem':
>
> this works: (first case)
>
> myTreeViewer.setLabelProvider(myLabelProvider);
> myTreeViewer.setInput(myInput);
>
> this doesn't work: (first case)
>
> myTreeViewer.setInput(myInput);
> myTreeViewer.setLabelProvider(myLabelProvider);
>
> The default label provider of myTreeViewer uses a
> ImageDescriptor.getMissingImageDescriptor() to label
> the tree items.
>
> The myLabelProvider uses images of 16x16 but the
> missing image has a size smaller than that (8x8 or 4x4 not sure).
>
> So in the first case the tree is rendered using the correct
> images and display 'em with a size of 16x16 (correct).
>
> In the second case the tree is rendered using the correct
> images but display 'em with a size of 8x8 (incorrect).
>
> This brings me to the conclusion that if I ever change
> the label provider I have to do something like:
> setInput(getInput());
>
> I think this should be done by the TreeViewer base
> class ;)
>
> I am using Eclipse 2.1 and Win2k.
>
>
> Martin (Kersten)
>
>
Re: -> Strange icon behaviour in jface TreeViewer [message #88436 is a reply to message #88421] Fri, 22 August 2003 15:51 Go to previous message
Eclipse UserFriend
Filed in as #41881:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=41881


Martin (Kersten)

"Martin Kersten" <Martin.Kersten@student.uni-magdeburg.de> schrieb im
Newsbeitrag news:bi5rin$u4f$1@eclipse.org...
> Should I file in a bug report on this?
>
> Martin (Kersten)
>
> > Hi there,
> >
> > Currently I develop a TreeViewer dialog using Eclipse 2.1.
> > I got a strange behaviour about the label icons, which I think is
> > incorrect. I would like to ask if the behaviour is corrected in 2.1.1 or
> > 3.0.
> >
> > Here is the 'problem':
> >
> > this works: (first case)
> >
> > myTreeViewer.setLabelProvider(myLabelProvider);
> > myTreeViewer.setInput(myInput);
> >
> > this doesn't work: (first case)
> >
> > myTreeViewer.setInput(myInput);
> > myTreeViewer.setLabelProvider(myLabelProvider);
> >
> > The default label provider of myTreeViewer uses a
> > ImageDescriptor.getMissingImageDescriptor() to label
> > the tree items.
> >
> > The myLabelProvider uses images of 16x16 but the
> > missing image has a size smaller than that (8x8 or 4x4 not sure).
> >
> > So in the first case the tree is rendered using the correct
> > images and display 'em with a size of 16x16 (correct).
> >
> > In the second case the tree is rendered using the correct
> > images but display 'em with a size of 8x8 (incorrect).
> >
> > This brings me to the conclusion that if I ever change
> > the label provider I have to do something like:
> > setInput(getInput());
> >
> > I think this should be done by the TreeViewer base
> > class ;)
> >
> > I am using Eclipse 2.1 and Win2k.
> >
> >
> > Martin (Kersten)
> >
> >
>
>
Previous Topic:Debug-variable window
Next Topic:Suggestion for optimized compilation of Anonymous inner classes
Goto Forum:
  


Current Time: Thu May 08 19:33:43 EDT 2025

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

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

Back to the top