public static boolean isVisible(MToolBarContribution contribution, ExpressionContext eContext) { if (contribution.getVisibleWhen() == null) { return true; } return isVisible((MCoreExpression) contribution.getVisibleWhen(), eContext); }
public boolean anyVisibleWhen() { if (toolbarContribution.getVisibleWhen() != null) { return true; } for (MToolBarElement child : toolbarContribution.getChildren()) { if (child.getVisibleWhen() != null || child.getPersistedState().get( MenuManagerRenderer.VISIBILITY_IDENTIFIER) != null) { return true; } } return false; }
toContribute.add(contribution); } else { if (contribution.getVisibleWhen() != null) { ctx.runAndTrack(new RunAndTrack() { @Override
public boolean anyVisibleWhen() { if (toolbarContribution.getVisibleWhen() != null) { return true; } List<MToolBarElement> childrenToInspect; if (toolbarContribution.getTransientData().get(FACTORY) != null) { // See mergeIntoModel childrenToInspect = this.generatedElements; } else { childrenToInspect = toolbarContribution.getChildren(); } for (MToolBarElement child : childrenToInspect) { if (requiresVisibilityCheck(child)) { return true; } } return false; }
public ToolBarKey(MToolBarContribution mc) { super(mc.getParentId(), mc.getPositionInParent(), mc.getTags(), (MCoreExpression) mc .getVisibleWhen(), mc.getTransientData().get(FACTORY)); this.contribution = mc; mc.setWidget(this); }
public void collectInfo(ExpressionInfo info) { ContributionsAnalyzer.collectInfo(info, toolbarContribution.getVisibleWhen()); for (MToolBarElement item : generatedElements) { ContributionsAnalyzer.collectInfo(info, item.getVisibleWhen()); } for (MToolBarElement item : sharedElements) { ContributionsAnalyzer.collectInfo(info, item.getVisibleWhen()); } }