@Override
protected void registerSpecialToolbarActions(IActionBars actionBars) {
// XXX: DLTK TCL 3.0 copied and modified code:
IToolBarManager toolBarManager = actionBars.getToolBarManager();
MemberFilterActionGroup fMemberFilterActionGroup = new MemberFilterActionGroup(
fOutlineViewer, fStore);
List<MemberFilterAction> actions = new ArrayList<MemberFilterAction>(3);
// variables
// TODO help support IDLTKHelpContextIds.FILTER_FIELDS_ACTION;
MemberFilterAction hideVariables = new MemberFilterAction(
fMemberFilterActionGroup,
ActionMessages.MemberFilterActionGroup_hide_variables_label,
new ModelElementFilter(IModelElement.FIELD), null, true);
hideVariables.setDescription(ActionMessages.MemberFilterActionGroup_hide_variables_description);
hideVariables.setToolTipText(ActionMessages.MemberFilterActionGroup_hide_variables_tooltip);
DLTKPluginImages.setLocalImageDescriptors(hideVariables, "filter_fields.gif"); //$NON-NLS-1$
actions.add(hideVariables);
// procedures
// TODO help support IDLTKHelpContextIds.FILTER_STATIC_ACTION;
MemberFilterAction hideProcedures = new MemberFilterAction(
fMemberFilterActionGroup,
ActionMessages.MemberFilterActionGroup_hide_functions_label,
new ModelElementFilter(IModelElement.METHOD), null, true);
hideProcedures.setDescription(ActionMessages.MemberFilterActionGroup_hide_functions_description);
hideProcedures.setToolTipText(ActionMessages.MemberFilterActionGroup_hide_functions_tooltip);
// TODO: add correct icon
DLTKPluginImages.setLocalImageDescriptors(hideProcedures,
"filter_methods.gif"); //$NON-NLS-1$
actions.add(hideProcedures);
// private
MemberFilterAction hidePrivate = new MemberFilterAction(
fMemberFilterActionGroup,
ActionMessages.MemberFilterActionGroup_hide_private_label,
new ModelElementFlagsFilter(Modifiers.AccPrivate), null, true);
hidePrivate.setDescription(ActionMessages.MemberFilterActionGroup_hide_private_description);
hidePrivate.setToolTipText(ActionMessages.MemberFilterActionGroup_hide_private_tooltip);
DLTKPluginImages.setLocalImageDescriptors(hidePrivate,
"filter_private.gif"); //$NON-NLS-1$
actions.add(hidePrivate);
// order corresponds to ordeutilusr in toolbar
MemberFilterAction[] fFilterActions = actions.toArray(new MemberFilterAction[actions.size()]);
fMemberFilterActionGroup.setActions(fFilterActions);
fMemberFilterActionGroup.contributeToToolBar(toolBarManager);
}