Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 351766 - @NoDuplicates annotation should be sensitive to context
Summary: @NoDuplicates annotation should be sensitive to context
Status: CLOSED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: Sapphire (show other bugs)
Version: unspecified   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Konstantin Komissarchik CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-07-11 18:11 EDT by Ling Hao CLA
Modified: 2021-11-19 09:22 EST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.