[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [platform-ui-dev] CoolBarManager implementation incomplete in F2
|
Kevin,
The CoolBarManager implementation is internal to the workbench. You
should not be able to gain access to a CoolBarManager implementation of
IToolBarManager using the public APIs.
The only valid way to get an IToolBarManager is via IActionBars an a view
or editor. These implementations virtualize the coolbar. For example,
editor contributions to the toolbar go in a separate cool item.
How are you obtaining a CoolBarManager? Note that taking an
IWorkbenchWindow and casting it to ApplicationWindow is taking advantage
of internals: WorkbenchWindow is internal, and the fact that it extends
ApplicationWindow is an implementation detail.
The comment in initializeDefaultPreferences is out of date. We have
removed the preference and are committed to going with coolbars for 2.0.
Nick
---------------------
"Cornell, Kevin" <kcornell@xxxxxxxxxxxx>
Sent by: platform-ui-dev-admin@xxxxxxxxxxx
06/11/2002 09:47 AM
Please respond to platform-ui-dev
To: "'platform-ui-dev@xxxxxxxxxxx'" <platform-ui-dev@xxxxxxxxxxx>
cc:
Subject: [platform-ui-dev] CoolBarManager implementation incomplete in F2
What is the status of the CoolBarManager implementation? I am working on a
plug-in that makes dynamic contributions to the workbench window toolbar
and with the F2 drop, it throws Asserts like crazy. I get an object that
implements IToolBarManager but when I call IToolBarManager.add(
IContributionItem ), an assert is thrown in CoolBarManager because the
item I am trying to contribute is not an instance of
CoolBarContributionItem (an internal class) but does implement
IContributionItem.
In looking at the code in CoolBarManager, there is virtually no code (only
asserts) for the methods add(IAction) and addToGroup(...).
In the WorkbenchWindow constructor, the preference "ENABLE_COOL_BARS" is
set to "true", causing the CoolBarManager to be created instead of the
jface ToolBarManager. This preference is actually defined in
WorkbenchPlugin.initializeDefaultPreferences(), but is commented as being temporary.
How do I contribute items to the CoolBarManager?