1 11 package org.eclipse.jdt.internal.debug.ui.actions; 12 13 14 import org.eclipse.debug.core.DebugException; 15 import org.eclipse.jdt.debug.core.IJavaVariable; 16 import org.eclipse.jdt.internal.debug.ui.IJDIPreferencesConstants; 17 import org.eclipse.jdt.internal.debug.ui.JDIDebugUIPlugin; 18 import org.eclipse.jface.viewers.Viewer; 19 20 23 public class ShowStaticVariablesAction extends ViewFilterAction { 24 25 public ShowStaticVariablesAction() { 26 super(); 27 } 28 29 32 protected String getPreferenceKey() { 33 return IJDIPreferencesConstants.PREF_SHOW_STATIC_VARIALBES; 34 } 35 36 39 public boolean select(Viewer viewer, Object parentElement, Object element) { 40 if (element instanceof IJavaVariable) { 41 IJavaVariable variable = (IJavaVariable)element; 42 try { 43 if (!getValue()) { 44 return !(variable.isStatic() && !variable.isFinal()); 46 } 47 } catch (DebugException e) { 48 JDIDebugUIPlugin.log(e); 49 } 50 } 51 return true; 52 } 53 } 54 | Popular Tags |