Jazz Forum Welcome to the Jazz Community Forum Connect and collaborate with IBM Engineering experts and users

Any public ILabelProvider ?

Hello,
I was wondering if there is any single public ILabelProvider that can be
used to text/image RTC objects? Basically I would like to show the
icon/text for an IWorkspaceConnection.
Regards,
Sri.

0 votes



6 answers

Permanent link
I was wondering if there is any single public ILabelProvider that can be
used to text/image RTC objects? Basically I would like to show the
icon/text for an IWorkspaceConnection.

You can try to use com.ibm.team.jface.labelProviders.StandardLabelProvider.

Components register their specific item label providers with it, so it
can be used to get the text/icon for many different item types.

HTH,
Patrick,
Jazz Work Item team

0 votes


Permanent link
Hi Patrick,
Ive tried new StandardLabelProvider(new ElementRemovedNotifierImpl()))
which does not work - is there some initialization/registration that I
need to invoke before using this label provider?
new StandardLabelProvider(new ProcessLabelProvider(), new
ElementRemovedNotifierImpl()) did not help either.
Regards,
Srimanth.


Patrick Streule wrote:
I was wondering if there is any single public ILabelProvider that can
be used to text/image RTC objects? Basically I would like to show the
icon/text for an IWorkspaceConnection.

You can try to use com.ibm.team.jface.labelProviders.StandardLabelProvider.

Components register their specific item label providers with it, so it
can be used to get the text/icon for many different item types.

HTH,
Patrick,
Jazz Work Item team

0 votes


Permanent link
Srimanth,

There may not be a label provider registered to render the
IWorkspaceConnection.
My very quick search of the code base did not find such a label provider.

Your "sample" code should have provided you with an image / text for the
connection.
I would suggest you file an enhancement against Source Control for this
support.

HTH
Darins
Jazz Process Team

"Srimanth Gunturi" <sgunturi@us.ibm.com> wrote in message
news:fn8hc8$91v$1@localhost.localdomain...
Hi Patrick,
Ive tried new StandardLabelProvider(new ElementRemovedNotifierImpl()))
which does not work - is there some initialization/registration that I
need to invoke before using this label provider?
new StandardLabelProvider(new ProcessLabelProvider(), new
ElementRemovedNotifierImpl()) did not help either.
Regards,
Srimanth.


Patrick Streule wrote:
I was wondering if there is any single public ILabelProvider that can be
used to text/image RTC objects? Basically I would like to show the
icon/text for an IWorkspaceConnection.

You can try to use
com.ibm.team.jface.labelProviders.StandardLabelProvider.

Components register their specific item label providers with it, so it
can be used to get the text/icon for many different item types.

HTH,
Patrick,
Jazz Work Item team

0 votes


Permanent link
Hi Darin,
The sample label providers I mentioned dont give either images or text.
Im guessing the StandardLabelProvider gets loaded when the views
activate? and since our perspective never does anything to initialize
it, we get empty images/text. Is there any internal code we can trigger
to force a load for Beta2?
The last resort would be to directly access the workspace connection
icons for streams/workspaces.
Regards,
Srimanth.


Darin Swanson wrote:
Srimanth,

There may not be a label provider registered to render the
IWorkspaceConnection.
My very quick search of the code base did not find such a label provider.

Your "sample" code should have provided you with an image / text for the
connection.
I would suggest you file an enhancement against Source Control for this
support.

HTH
Darins
Jazz Process Team

"Srimanth Gunturi" <sgunturi@us.ibm.com> wrote in message
news:fn8hc8$91v$1@localhost.localdomain...
Hi Patrick,
Ive tried new StandardLabelProvider(new ElementRemovedNotifierImpl()))
which does not work - is there some initialization/registration that I
need to invoke before using this label provider?
new StandardLabelProvider(new ProcessLabelProvider(), new
ElementRemovedNotifierImpl()) did not help either.
Regards,
Srimanth.


Patrick Streule wrote:
I was wondering if there is any single public ILabelProvider that can be
used to text/image RTC objects? Basically I would like to show the
icon/text for an IWorkspaceConnection.
You can try to use
com.ibm.team.jface.labelProviders.StandardLabelProvider.

Components register their specific item label providers with it, so it
can be used to get the text/icon for many different item types.

HTH,
Patrick,
Jazz Work Item team

0 votes


Permanent link
We currently wrap our UI elements so that our labels can be shown without additional server round-trips. If you have a IWorkspaceConnection in hand, use the helpers on AbstractPlaceWrapper and put those in the view with the StandardLabelProvider pattern shown above and the labels/text should appear.

0 votes


Permanent link
Thank you, that worked.


jlemieux wrote:
We currently wrap our UI elements so that our labels can be shown
without additional server round-trips. If you have a
IWorkspaceConnection in hand, use the helpers on AbstractPlaceWrapper
and put those in the view with the StandardLabelProvider pattern shown
above and the labels/text should appear.

0 votes

Your answer

Register or log in to post your answer.

Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details
× 10,937

Question asked: Jan 23 '08, 11:18 a.m.

Question was seen: 8,682 times

Last updated: Jan 23 '08, 11:18 a.m.

Confirmation Cancel Confirm