ArrangementUiComponent (@NotNull final ArrangementMatchCondition rendererTarget, @NotNull final StdArrangementMatchRule rule, final boolean allowModification) { final Ref<ArrangementUiComponent> ref = new Ref<>(); rendererTarget.invite(new ArrangementMatchConditionVisitor() { @Override public void visit(@NotNull ArrangementAtomMatchCondition condition) { RemoveAtomConditionCallback callback = allowModification ? new RemoveAtomConditionCallback(rule) : null; ArrangementUiComponent component = new ArrangementAtomMatchConditionComponent( mySettingsManager, myColorsProvider, condition, callback ); ref.set(component); } @Override public void visit(@NotNull ArrangementCompositeMatchCondition condition) { ref.set(new ArrangementAndMatchConditionComponent(rule, condition, ArrangementMatchNodeComponentFactory.this, mySettingsManager, allowModification)); } }); return ref.get(); }