Eclipse Community Forums - RDF feed
https://www.eclipse.org/forums/
Eclipse Community ForumsChanging visibility of the toolbar items in IViewPart
https://www.eclipse.org/forums/index.php/mv/msg/198068/631547/#msg_631547
There are several editors (IEditorParts) in the app. There is also an
IViewPart that has a toolbar with several items. The IViewPart provides
supplementary content for some, but not all editors.
When an unsupported editor becomes active, the IViewPart goes empty.
However, its toolbar remains populated. I need to empty it out as well.
I tried the PropertyTester, wired up the plugin.xml, to control the
visibility of the commands, among other things, but no matter what I
tried, the toolbar items' status was updated only when the IViewPart
became active. The problem is that I need the toolbar refreshed as the
editors become active/inactive; the IViewPart may never gain focus.
Is there any solution based on the documented framework features (as
opposed to possible hacks)?
Alex Molochnikov
Kelman Technologies Inc.]]>Alex Molochnikov2010-10-07T22:13:42-00:00Re: Changing visibility of the toolbar items in IViewPart
https://www.eclipse.org/forums/index.php/mv/msg/198068/631576/#msg_631576
> When an unsupported editor becomes active, the IViewPart goes empty.
> However, its toolbar remains populated. I need to empty it out as well.
I tried to put the New Wizard command on the Package Explorer and made
it visible only when PackageExplorer or Plugin manifest editor is
active. It works:
www.eclipse-tips.com]]>Prakash G.R.2010-10-08T04:35:32-00:00Re: Changing visibility of the toolbar items in IViewPart
https://www.eclipse.org/forums/index.php/mv/msg/198068/631658/#msg_631658
If you need to re-evaluate a property tester because you think it might
have changed, use
org.eclipse.ui.services.IEvaluationService.requestEvaluation (String)
Paul Webster wrote:
> If you are using propertyTesters, remember they are not event driven. If
> you need to re-evaluate a property tester because you think it might
> have changed, use
> org.eclipse.ui.services.IEvaluationService.requestEvaluation (String)
>
> PW
>]]>Alex Molochnikov2010-10-08T15:41:33-00:00