1 11 package org.eclipse.ui.internal.presentations; 12 13 import org.eclipse.jface.action.ActionContributionItem; 14 15 18 public class UpdatingActionContributionItem extends ActionContributionItem { 19 20 23 public UpdatingActionContributionItem(ISelfUpdatingAction action) { 24 super(action); 25 } 26 27 30 public boolean isVisible() { 31 ISelfUpdatingAction action = (ISelfUpdatingAction) getAction(); 32 return super.isVisible() && action.shouldBeVisible(); 33 } 34 35 38 public void update(String propertyName) { 39 ISelfUpdatingAction action = (ISelfUpdatingAction) getAction(); 40 action.update(); 41 42 super.update(propertyName); 43 } 44 45 48 public boolean isDynamic() { 49 return true; 50 } 51 } 52 | Popular Tags |