public class UIReductionPartAdapter
extends java.lang.Object
IUIReductionAwarePart
should use
this adapter to receive call backs to update the UI reduced controls.
Example use for this adapter:
This class has its own IActivityManagerListener
to prevent the palette from
flickering whenever elements from another model are selected outside of the
editor (ie. within the Project Explorer) which then cause the enabled
capabilities to change.
The editors' palette should be refreshed only whenever capabilities change and when it is the currently active editor, otherwise a listener is used to notify to update the palette when the editor becomes activated.
Constructor and Description |
---|
UIReductionPartAdapter(org.eclipse.ui.IWorkbenchPart workbenchPart) |
Modifier and Type | Method and Description |
---|---|
protected boolean |
canRefresh()
Returns
true if the UI reduced controls of the workbench
part can be refreshed, false otherwise. |
protected org.eclipse.ui.IWorkbenchPart |
getWorkbenchPart()
Return the workbench part.
|
protected void |
refreshUIReducedControls()
Refreshes the UI reduced controls of the workbench part.
|
void |
startListening() |
void |
stopListening() |
public UIReductionPartAdapter(org.eclipse.ui.IWorkbenchPart workbenchPart)
protected org.eclipse.ui.IWorkbenchPart getWorkbenchPart()
protected void refreshUIReducedControls()
protected boolean canRefresh()
true
if the UI reduced controls of the workbench
part can be refreshed, false otherwise.
true
if the UI reduced controls of the workbench
part can be refreshed, false otherwise
public void startListening()
public void stopListening()