Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 351766

Summary: @NoDuplicates annotation should be sensitive to context
Product: z_Archived Reporter: Ling Hao <ling.hao>
Component: SapphireAssignee: Konstantin Komissarchik <konstantin>
Status: CLOSED FIXED QA Contact:
Severity: normal    
Priority: P3    
Version: unspecified   
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard:

Description Ling Hao CLA 2011-07-11 18:11:03 EDT
Original question:

I have a simple issue that I don't know how to address. I havea list of ICachingScheme that has a name field that should be unique which works simply with @NoDuplicates. But sometimes these ICachingSchemes are used as an ElementProperty. In these cases, I get the following error in the console:

 
ERROR : Invalid model path "#/SchemeName" evaluated on oracle.eclipse.tools.coherence.descriptors.cacheConfig.ICachestoreScheme.

UniqueValueValidationService contains a check for the parent to be a list, so the error came from this annotation when the parent is an ElementProperty and not a ModelElementList:

@DependsOn( "*/SchemeName" )

Kosta:

Go ahead an open a bug on this. Using @NoDuplicates annotation automatically generates a property dependency (you don’t need to use @DependsOn explicitly). The dependency needs to be sensitive to context and only get generated if parent is a list.
Comment 1 Konstantin Komissarchik CLA 2011-07-14 15:51:42 EDT
Fixed. As part of the fix, the dependencies are surfaced and can be customized via new DependenciesService API.
Comment 2 Ling Hao CLA 2011-08-05 19:46:28 EDT
Verified, closing.