1 11 package org.eclipse.help.internal.dynamic; 12 13 import org.eclipse.core.expressions.IEvaluationContext; 14 import org.eclipse.help.UAContentFilter; 15 import org.eclipse.help.internal.UAElement; 16 17 22 public class FilterHandler extends ProcessorHandler { 23 24 private IEvaluationContext context; 25 26 public FilterHandler(IEvaluationContext context) { 27 this.context = context; 28 } 29 30 public short handle(UAElement element, String id) { 31 if (UAContentFilter.isFiltered(element, context)) { 32 UAElement parent = element.getParentElement(); 33 if (parent != null) { 34 parent.removeChild(element); 35 } 36 return HANDLED_SKIP; 37 } 38 return UNHANDLED; 39 } 40 } 41 | Popular Tags |