Please use the Apache issue tracking system for new NetBeans issues (https://issues.apache.org/jira/projects/NETBEANS0/issues) !!
Bug 98020 - Builder: Name for attribute from Director class is not generated
Builder: Name for attribute from Director class is not generated
Status: VERIFIED FIXED
Product: uml
Classification: Unclassified
Component: Design Center
5.x
All All
: P2 (vote)
: 6.x
Assigned To: Viktor Lapitski
issues@uml
HOL, release55_fixes_fixed
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2007-03-15 17:49 UTC by Alexandr Scherbatiy
Modified: 2007-05-11 15:02 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
:


Attachments
UML project (22.50 KB, application/octet-stream)
2007-03-16 10:00 UTC, Alexandr Scherbatiy
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Alexandr Scherbatiy 2007-03-15 17:49:54 UTC
Steps to reproduce:

- Create a Java-Platform UML project
- Apply a Creational::Builder GoF design pattern
- Generate Code for the project
- Go to Director class source code
  ----------------------------------------------------
  public class Director {
    private Builder ;
    public Product construct() {
        return null;
    }
  }
  ----------------------------------------------------

 Name is not generated for 'private Builder ;' attribute
 The source code is not compiled
Comment 1 Craig Conover 2007-03-15 21:47:26 UTC
I could not reproduce this. I see the mBuilder attribute and my java application
builds successfully.

Perhaps you can attach your UML project for me to try out or there is some other
detail I am missing?
Comment 2 Alexandr Scherbatiy 2007-03-16 10:00:04 UTC
Created attachment 39575 [details]
UML project
Comment 3 Alexandr Scherbatiy 2007-03-16 10:02:41 UTC
I have attached a UML project with applyed Builder design pattern.
Use ide_uml-griffin-070313_2-ml.zip build  to check the issue.
Comment 4 Sergey Petrov 2007-03-16 11:33:30 UTC
I see the same behavior with older build, main reason Part End have no name (may
be name from Aggregate End name should be moved to Part End)
Comment 5 Peter Lam 2007-03-20 20:06:10 UTC
low use case not currently impacting our installed user base.
Comment 6 Peter Lam 2007-03-21 00:04:13 UTC
Exact steps to reproduce:

- create an empty java project (optional but will be used for code gen)
- create a Java-Platform UML project and cancel the diagram creation
- from the project tree, right click on the Model node of the uml project and
select Apply Design Pattern
- from the Design Pattern Apply Wizard, click Next
- from Pattern Selection step:
  select "GoF Design Patterns" from the Project list 
  select "Creational::Builder" from the Design pattern list
- click Next
- click Next again on the "Target Scope"
- click Next again on the "Choosing Participants" step
- click Next again on the "Options" step (do not check the Create class diagram
check-box)
- click Finish and wait till applying design pattern action is done
- right click on the uml project node and select Generate Code...
- accept the default path for the source to be generated or enter the path to
the source directory for the java project created at the beginning and click OK
- click OK on the Authorize UML Project Save dialog and wait till code gen is done
- expand the Model node and right click on "Director" class and select "Navigate
to Source"
The following source is opened in the source editor.

public class Director {
    private Builder ;
    public Product construct() {
        return null;
    }
}



Comment 7 khu 2007-04-05 01:56:53 UTC
I could not reproduce the problem if I download UML nbms from the current NB UC
Beta. However, I could reproduce the problem with later friffin build.
Comment 8 Craig Conover 2007-04-09 22:11:11 UTC
It appears maybe that the new template-based code gen system needs it's template
updated for this on NB6.
Comment 9 Viktor Lapitski 2007-04-10 01:56:13 UTC
as it was mentioned before the "builder" role name should be moved to the part end. 
Comment 10 Viktor Lapitski 2007-04-10 02:53:22 UTC
corrected the pattern in the library.
Comment 11 Andrew Korostelev 2007-04-10 14:39:16 UTC
verified in all-nbms-hydra-070410_6
Comment 12 Andrew Korostelev 2007-04-17 13:33:46 UTC
verified in all-nbms-griffin_fixes-070416_1-ml


By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2014, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo