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.

Bug 84290 - Unable to create two elements in different packages with the same name
Summary: Unable to create two elements in different packages with the same name
Status: VERIFIED FIXED
Alias: None
Product: uml
Classification: Unclassified
Component: General Diagram (show other bugs)
Version: 5.x
Hardware: All All
: P2 blocker (vote)
Assignee: Yang Su
URL:
Keywords: REGRESSION
Depends on:
Blocks:
 
Reported: 2006-09-06 11:31 UTC by bugbridge
Modified: 2006-09-12 10:26 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description bugbridge 2006-09-06 11:31:48 UTC
Description:
reproducible in m19

Steps to reproduce:

- Create a UML project
- Create a Class diagram under UML Model node
- Put a Class element on the diagram and name it 'A'
  Note that the element is not under any packages so
  it fully qualified name is 'A'
- Create a Package under UML Model node and name it 'pack'
- Create a Class diagram under the package
- Put a Class element on the created diagram and name it 'A'
  'Information' dialog appears:
   'An element with this name already exists in the current namespace,
    please choose another name'
  I can't create a 'pack.A' class element.

Description (Entry 2):
The bug is reproduced only if the first element was created under Model node.
Comment 1 Andrew Korostelev 2006-09-06 11:32:58 UTC
see also issue 84286
Comment 2 Yang Su 2006-09-07 01:00:06 UTC
Unified the logic to detect naming collision in common.Util class. The logic is
to locate all elements with the same name under the given namespace, exclude
self, if the found element is the same type or those types that source code can
be generated, e.g Class, Interface, Enumeration ( under Java rules ), a
collision is detected under this condition.
Comment 3 Andrew Korostelev 2006-09-12 10:26:36 UTC
verified in ide-coke_uml-060911