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 78564 - Attribute source code isn't properly generated when draw Navigable Aggregation link to derivation classifier
Summary: Attribute source code isn't properly generated when draw Navigable Aggregatio...
Status: VERIFIED FIXED
Alias: None
Product: uml
Classification: Unclassified
Component: Code Generation (show other bugs)
Version: 5.x
Hardware: PC Windows XP
: P2 blocker (vote)
Assignee: Craig Conover
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-06-20 12:59 UTC by bugbridge
Modified: 2007-02-19 13:08 UTC (History)
1 user (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-06-20 12:59:04 UTC
Coke build 200604050200

Step to reproduce:

- Create a uml project and associate it to the java project
- Add Derivation classifier to the diagram and name it 'Class<Type>'
- Add class to the diagram and name it 'MyClass'
- Draw 'Navigable Aggregation' link from 'MyClass' to 'Class<Type>' element.
 'Invalid Value' dialog pops up.
- go to source code of 'MyClass' class.

  'Class<Type> attr' attribute is not added to source code.
Comment 1 Alexandr Scherbatiy 2006-10-24 14:19:23 UTC
Steps to reproduce:

- Create a Java-Platform Model UML project
- Create a Class diagram
- Add Derivation classifier to the diagram and name it 'Class<Type>'
- Draw 'Navigable Aggregation' link from 'MyClass' to 'Class<Type>' element
 'Invalid Value' dialog pops up
- Generate Code for the UML project

 The generated source is:
 ------------------------------------------------------
  package pack;

  public class MyClass {
    private Class<Type1> ;
    public MyClass() {
    }
  }
 ------------------------------------------------------
 The name of attribute is missed.

 The source is not compiled:
  ------------------------------------------------------
   UMLProject1Sources\src\pack\MyClass.java:4: <identifier> expected
    private Class<Type1> ;
  1 error
  ------------------------------------------------------
 
 


Comment 2 Craig Conover 2007-02-04 00:21:55 UTC
First, the invalid name dialog is being show because of the angle brackets when
it is trying to auto-gen a name for the attribute and its accessors, but this
can be made smarter to remove the brackets or just consider chars prior to the
first angle bracket.

Second, we don't currently generate a class for derivation classifiers, but it
looks like we should. 

Researching to figure what is the right thing to do.
Comment 3 Craig Conover 2007-02-15 03:09:51 UTC
Removing all instances of "<" and ">" before naming the attribute. Code gen did
not need to be adjusted.
Comment 4 Alexandr Scherbatiy 2007-02-19 13:08:17 UTC
verified