This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
Calling either of these methods will nearly always result in a ClassCastException. The reason is that they expect extendedNamespace() to return a collection of ModelElement instances, but actually it returns a collection of StorableFeatureds. Here is a patch. Note that in the process I refactored nameIsValid() and lookupElementExtended() to use a common helper method for the search algorithm they share. This way, nameIsValid() can take advantage of the index that was previously only being used by lookupElementExtended.
Created attachment 6424 [details] Patch
patch integrated