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 106475 - Code is not correctly generated for Enumeration element
Summary: Code is not correctly generated for Enumeration element
Status: VERIFIED DUPLICATE of bug 106732
Alias: None
Product: uml
Classification: Unclassified
Component: Code Generation (show other bugs)
Version: 6.x
Hardware: All All
: P2 blocker (vote)
Assignee: Viktor Lapitski
URL:
Keywords: REGRESSION
Depends on:
Blocks:
 
Reported: 2007-06-13 11:52 UTC by Alexandr Scherbatiy
Modified: 2007-06-22 23:37 UTC (History)
0 users

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 Alexandr Scherbatiy 2007-06-13 11:52:35 UTC
build netbeans-hudson-trunk-649-full.zip

Steps to reproduce:

- Create 'MyEnum' Enumeration element
- Generate code for the element
- Insert 'A' enumeration literal to the element
- Generate code for the element
  The source code is broken:
---------------------------------------------------------------------------
package pack;/ <editor-fold defaultstate="collapsed" desc=" UML Marker "> 
// #[regen=yes,id=DCE.A5998B8F-1B6B-BF62-C6DC-11A16842C50B]
// </editor-fold> 
public enum MyEnum {

} 
---------------------------------------------------------------------------
Comment 1 Craig Conover 2007-06-14 05:09:43 UTC
Worked as expected for me. Perhaps some missing subtle steps or env differences. I tested on WinXP.
Comment 2 Alexandr Scherbatiy 2007-06-14 11:13:31 UTC
The issue is reproduced in  netbeans-hudson-trunk-702-full.zip build as described.
Comment 3 Craig Conover 2007-06-14 20:39:05 UTC
Seems like a file merge issue or maybe a template issue.
Comment 4 Peter Lam 2007-06-15 00:55:09 UTC
I'm not able to reproduce this one with build netbeans-hudson-trunk-733-full.zip (070614). Initial code generation
always works correctly for me. However, regenerating code with update fail and it's filed as issue 106732.
Comment 5 Andrew Korostelev 2007-06-18 11:58:04 UTC
reproducible in netbeans-6.0-nightly-200706171200-full-windows
and netbeans-hudson-trunk-874-full (Build 070618)
win XP, jdk 1.6.0_01

code is broken after second code generation.
my steps are:
- create java-model project with default diagram.
- put enum on it and name.
- generate code.
- navigate to source (code is correct)
- generate code again
- look at source:
The first '/' in comment is loosed.

/ <editor-fold defaultstate="collapsed" desc=" UML Marker "> 
// #[regen=yes,id=DCE.E57385D6-3A73-28EC-F7CD-547158BC1A32]
// </editor-fold> 
public enum ttt {

}



Comment 6 Andrew Korostelev 2007-06-18 13:01:11 UTC
see also issue 106492
Comment 7 Viktor Lapitski 2007-06-21 11:24:22 UTC

*** This issue has been marked as a duplicate of 106732 ***
Comment 8 Peter Lam 2007-06-22 23:37:31 UTC
looks like this particular case is now fixed. 
verified in build netbeans-6.0-nightly-200706220000-full-windows.exe