Bug 78452 - Generate code action does not propagate template parameters to source
Generate code action does not propagate template parameters to source
Status: VERIFIED FIXED
Product: uml
Classification: Unclassified
Component: Code Generation
5.x
PC Windows XP
: P1 (vote)
: TBD
Assigned To: Craig Conover
issues@uml
COKE_REVIEWED_W
: REGRESSION
: 82251 (view as bug list)
Depends on:
Blocks: 78562
  Show dependency treegraph
 
Reported: 2006-06-20 04:59 UTC by bugbridge
Modified: 2006-10-19 11:18 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description bugbridge 2006-06-20 04:59:34 UTC
Original status: 1-Dispatched; Suggested Status: NEW

Original submitter: sunflower

Description:
Step to reproduce:

- Create a uml project 
- Create a Class diagram
- Put a Template class on the diagram and name it 'Class1'
- Add 'Type1' template parameter to the template class

- Create a java project
- Associate the uml project to the java project
- Select the uml project and invoke 'Generate Code'
- Go to the source of 'Class1' class

  Generic 'Class1<Type1>' is not generated.
Comment 1 Craig Conover 2006-08-09 19:51:29 UTC
This issue is a Code Generation issue, not a synchronization issue - changed
subcomponent.
Comment 2 Craig Conover 2006-08-10 00:50:18 UTC
*** Issue 82251 has been marked as a duplicate of this issue. ***
Comment 3 Peter Lam 2006-10-17 22:41:57 UTC
regression from JSE 8.1 UML tool.
Comment 4 Peter Lam 2006-10-17 22:48:01 UTC
New step to reproduce:

- Create a uml project 
- Create a Class diagram
- Put a Template class on the diagram and name it 'Class1'
- Add 'Type1' template parameter to the template class through Properties
Result: "Type1" is displayed as template parameter on "Class1"
- Right-click on "Class1" and select "Generate Code..."
- Open and view the source file for "Class1" which is the following without
"Type1" template parameter:

public class Class1 {
    public Class1() {
    }
}

The generate code should be 
public class Class1<Type1> {
    public Class1() {
    }
}
Comment 5 Peter Lam 2006-10-18 00:24:15 UTC
Agreed by Trey to raise to P1. This issue blocks the following issues:
78562 P2 Renaming generic through template parameters adds superfluous generic
86840 P2 Initial value is not properly generated for Generic attributes
Comment 6 Craig Conover 2006-10-19 02:12:53 UTC
The createJavaClass method of the JavaClassClass class (oh boy) in the JMI API
has a parameter for template parameters, but it causes and exception to be
thrown. Perhaps I am feeding it an inappropriate format, but it is a List type
as needed.

For quick fix, just going to attempt to generate the template params as a string
and append it to the class name.
Comment 7 Craig Conover 2006-10-19 02:20:26 UTC
Appending list of template params on the end of the class name worked just fine.
Comment 8 Andrew Korostelev 2006-10-19 11:18:36 UTC
verified in all-nbms-griffin-061018_35


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