protected String getSwitchLocalVariableSimpleName(XSwitchExpression expr) { IdentifiableSimpleNameProvider nameProvider = getNameProvider(); String varName = nameProvider.getSimpleName(expr.getDeclaredParam()); if (varName != null) { return varName; } XExpression expression = expr.getSwitch(); if (!(expression instanceof XFeatureCall)) { return null; } XFeatureCall featureCall = (XFeatureCall) expression; JvmIdentifiableElement feature = featureCall.getFeature(); return nameProvider.getSimpleName(feature); }
public Class<? extends IdentifiableSimpleNameProvider> bindIdentifiableSimpleNameProvider() { return IdentifiableSimpleNameProvider.class; }
public void setNameProvider(IdentifiableSimpleNameProvider nameProvider) { this.nameProvider = nameProvider; }
protected IdentifiableSimpleNameProvider getNameProvider() { return nameProvider; }
public void setFeatureNameProvider(IdentifiableSimpleNameProvider featureNameProvider) { this.featureNameProvider = featureNameProvider; }
public Class<? extends IdentifiableSimpleNameProvider> bindIdentifiableSimpleNameProvider() { return ScriptIdentifiableSimpleNameProvider.class; }