Hi,
I noticed an issue related to refreshing part toolbars introduced with 4.2.1.
In fact I notice this in a view which is part of an Eclipse plugin. But as it works in 4.2 and not in 4.2.1 I'll assume it is related to the compatibility layer.
What am I trying to do?
I have a view that contains two menu items in the view toolbar. My plugin.xml looks like this:
<extension
point="org.eclipse.ui.menus">
<menuContribution
allPopups="false"
locationURI="toolbar:MyView">
<command
commandId="ToggleViewModeCommand"
icon="icons/toggledetailpane_co.gif"
style="push"
tooltip="Toggle the view mode between simple and detail view">
</command>
<command
commandId="TogglePresentationCommand"
style="push"
tooltip="Toggle the table presentation between flat and hierarchical">
<visibleWhen
checkEnabled="false">
<with
variable="sourceprovider.detailview">
<equals
value="ENABLED">
</equals>
</with>
</visibleWhen>
</command>
</menuContribution>
</extension>
Clicking the one menu item triggers a command which modifies a variable in my source provider. The set-method in my source provider looks like this
public void setDetailViewEnabled(boolean enable) {
this.enabled = enable;
String value = enabled ? ENABLED : DISABLED;
fireSourceChanged(ISources.WORKBENCH, DETAIL_VIEW, value);
}
I'm using the source provider mechanism explained in the tutorial by Lars Vogel: http://www.vogella.com/articles/EclipseCommandsAdvanced/article.html#commmands_sourceprovider
With the Eclipse 4.2 IDE the result was a refresh of the view toolbar whenever the value in the source provider changed. So the command toggled from visible to invisible state regarding the specified value.
After the update to 4.2.1 the view toolbar isn't refreshed automatically. But the view toolbar will render correctly when I resize it afterwards. So it seems to me that the refresh isn't working correctly since the update.
As it seems to be related to the compatibility layer IMHO this is the correct forum. If I'm wrong then please tell me where to ask the question.
Greez,
Dirk