Skip to main content



      Home
Home » Eclipse Projects » Eclipse Platform » Finding a trim contribution
Finding a trim contribution [message #335532] Mon, 13 April 2009 14:18 Go to next message
Eclipse UserFriend
Once I have contributed an item to the status line trim, how can I find it
programmatically?

I have:

<extension point="org.eclipse.ui.menus">
<menuContribution
locationURI="toolbar:org.eclipse.ui.trim.status">
<toolbar id="org.junit.max.ui.trim.toolbar">
<control
id="org.junit.max.ui.trim.widget"
class="org.junit.max.ui.internal.TrimContribution">
</control>
</toolbar>
</menuContribution>
</extension>

And my contribution is showing up just fine. I would like to find it later
with something like findView(String id).

Regards,

Kent Beck
Three Rivers Consulting, Inc.
Author of JUnit Max
Re: Finding a trim contribution [message #335546 is a reply to message #335532] Tue, 14 April 2009 08:25 Go to previous message
Eclipse UserFriend
Kent Beck wrote:
>
> And my contribution is showing up just fine. I would like to find it
> later with something like findView(String id).

There is no API to find the contributions later. The pattern that is
most prevalent in eclipse is that the control contribution (our status
contribution, for example) gets its data from a manager. ex:

protected Control createControl(Composite parent) {
final ImageHyperlink hyperlink = new ImageHyperlink(parent, SWT.NONE);
IStatusManager m = Activator.getDefault().getStatusManager();
hyperlink.setText(m.getLinkText());
m.addStatusListener(this);
return hyperlink;
}

PW


--
Paul Webster
http://wiki.eclipse.org/Platform_Command_Framework
http://wiki.eclipse.org/Command_Core_Expressions
http://wiki.eclipse.org/Menu_Contributions
http://wiki.eclipse.org/Menus_Extension_Mapping
http://help.eclipse.org/ganymede/index.jsp?topic=/org.eclips e.platform.doc.isv/guide/workbench.htm
Previous Topic:Enabling content assist using template proposals
Next Topic:Reload org.eclipse.ui.workbench.prefs in 3.4?
Goto Forum:
  


Current Time: Fri Apr 25 21:25:44 EDT 2025

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

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

Back to the top