use of org.eclipse.ui.internal.navigator.actions.CollapseAllAction in project polymap4-core by Polymap4.
the class CommonNavigatorActionGroup method makeActions.
/**
*/
private void makeActions() {
FrameList frameList = commonViewer.getFrameList();
backAction = new BackAction(frameList);
forwardAction = new ForwardAction(frameList);
upAction = new UpAction(frameList);
frameList.addPropertyChangeListener(new IPropertyChangeListener() {
public void propertyChange(PropertyChangeEvent event) {
if (event.getProperty().equals(FrameList.P_RESET)) {
upAction.setEnabled(false);
backAction.setEnabled(false);
forwardAction.setEnabled(false);
}
commonNavigator.updateTitle();
IActionBars actionBars = commonNavigator.getViewSite().getActionBars();
updateToolBar(actionBars.getToolBarManager());
}
});
IHandlerService service = (IHandlerService) commonNavigator.getSite().getService(IHandlerService.class);
INavigatorViewerDescriptor viewerDescriptor = commonViewer.getNavigatorContentService().getViewerDescriptor();
boolean hideLinkWithEditorAction = viewerDescriptor.getBooleanConfigProperty(INavigatorViewerDescriptor.PROP_HIDE_LINK_WITH_EDITOR_ACTION);
if (!hideLinkWithEditorAction) {
toggleLinkingAction = new LinkEditorAction(commonNavigator, commonViewer, linkHelperService);
// $NON-NLS-1$
ImageDescriptor syncIcon = getImageDescriptor("elcl16/synced.gif");
toggleLinkingAction.setImageDescriptor(syncIcon);
toggleLinkingAction.setHoverImageDescriptor(syncIcon);
service.activateHandler(toggleLinkingAction.getActionDefinitionId(), new ActionHandler(toggleLinkingAction));
}
boolean hideCollapseAllAction = viewerDescriptor.getBooleanConfigProperty(INavigatorViewerDescriptor.PROP_HIDE_COLLAPSE_ALL_ACTION);
if (!hideCollapseAllAction) {
collapseAllAction = new CollapseAllAction(commonViewer);
// $NON-NLS-1$
ImageDescriptor collapseAllIcon = getImageDescriptor("elcl16/collapseall.gif");
collapseAllAction.setImageDescriptor(collapseAllIcon);
collapseAllAction.setHoverImageDescriptor(collapseAllIcon);
collapseAllHandler = new CollapseAllHandler(commonViewer);
service.activateHandler(CollapseAllHandler.COMMAND_ID, collapseAllHandler);
}
filterGroup = new FilterActionGroup(commonViewer);
}
Aggregations