Skip to main content



      Home
Home » Modeling » Papyrus » [appearance] showing default value in case of an instanceValue
[appearance] showing default value in case of an instanceValue [message #1445482] Wed, 15 October 2014 09:52 Go to next message
Eclipse UserFriend
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?
Re: [appearance] showing default value in case of an instanceValue [message #1448646 is a reply to message #1445482] Mon, 20 October 2014 04:30 Go to previous messageGo to next message
Eclipse UserFriend
Submitted as https://bugs.eclipse.org/bugs/show_bug.cgi?id=447855
Re: [appearance] showing default value in case of an instanceValue [message #1448754 is a reply to message #1448646] Mon, 20 October 2014 07:53 Go to previous message
Eclipse UserFriend
Hi Klaas,

Indeed, it doesn't seem to be relevant at all

Thanks for reporting it,
Camille
Previous Topic:the overrided attach/detach methods of the extended class of the CDOResourceImpl class not be called
Next Topic:Cannot apply UML-RT State Machine stereotype
Goto Forum:
  


Current Time: Sun Nov 09 01:16:16 EST 2025

Powered by FUDForum. Page generated in 0.03670 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top