Community
Participate
Working Groups
Build Identifier: M20100909-0800 From http://www.eclipse.org/forums/index.php?t=rview&goto=644199#msg_644199 I have a property list which has following spec: public interface IModulePublishingTarget extends IModelElement,IRemovable { ModelElementType TYPE = new ModelElementType( IModulePublishingTarget.class ); // *** Name *** @Label( standard = "Target Name" ) @NoDuplicates ... } Although @NoDuplicates is specified, in the rendered table UI, adding duplicated entry does not prompt error. ******************************* The @NoDuplicates annotation doesn't quite work in the way you are thinking. It is applied to the list property (not the contained value) and acts as a hint to rendering rather than a validation provider. The behavior you are looking for is accomplished as follows: @DependsOn( "*/Name" ) @Validator( impl = UniqueValueValidator.class ) The UniqueValueValidator class is part of Sapphire. See IContact.Connections in the samples for an example of this. This looks like something that can be improved. I think your expectation of behavior is actually more intuitive than the current approach. Please open an enhancement request to improve the usability of the @NoDuplicates/UniqueValueValidator scenario. Reproducible: Always
Enhancement implemented. Migration details in documentation.
Verified with contact's name property.
To date this log entry was reported 10 times. Your friendly error reports bot.
To date this log entry was reported 25 times. Your friendly error reports bot.
To date this log entry was reported 50 times. Your friendly error reports bot.