245246247248249250251252253254255
// clear the variable only if the types are different if (currentType.getTypeName().equals(newType.getTypeName())) { return; } variableInstanceEntity.clear(); // set the new type variableInstanceEntity.setType(newType); }