| [appearance] showing default value in case of an instanceValue [message #1445482] |
Wed, 15 October 2014 09:52  |
Eclipse User |
|
|
|
Hi,
while debugging why the default value of a property wasn't shown on a class diagram (or bdd in the case of sysml), I found out that the defaultValue is only shown in case that the type of the valuespecification is set explicitly
// manage default value
if(maskValues.contains(ILabelPreferenceConstants.DISP_DEFAULT_VALUE) && property.getDefaultValue() != null) {
ValueSpecification valueSpecification = property.getDefaultValue();
if((valueSpecification instanceof InstanceValue && property.getType().equals(valueSpecification.getType())) || !(valueSpecification instanceof InstanceValue)) {
result = String.format(DEFAULT_VALUE_FORMAT, result, ValueSpecificationUtil.getSpecificationValue(valueSpecification));
}
}
Is there a reason for the property.getType().equals(valueSpecification.getType()) clause? At first sight, I would think it is not a relevant condition on which to decide to show the defaultValue or not?
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.03670 seconds