final FilterDescriptor desc = FilterDescriptor.getFilterDescriptor(filterId);
final ViewerFilter filter = desc.getViewerFilter();
if (filter == null) {
return;
}
final ErlangOutlinePage erlangOutlinePage;
if (activePart instanceof ErlangOutlinePage) {
erlangOutlinePage = (ErlangOutlinePage) activePart;
} else {
final ContentOutline outline = (ContentOutline) activePart;
erlangOutlinePage = (ErlangOutlinePage) outline
.getAdapter(ErlangOutlinePage.class);
}
final TreeViewer viewer = erlangOutlinePage.getTreeViewer();
if (viewer == null) {
return;
}
if (value) {
viewer.addFilter(filter);