public void updateText() { if (hasVars && (menuItem != null) && (originalValue != null)) { iWidget w = (contextWidget == null) ? Platform.getContextRootViewer() : contextWidget; menuItem.setText(w.expandString((String) originalValue, false)); } }