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 130184 - Code Gen of a UML project generates just one model object
Summary: Code Gen of a UML project generates just one model object
Status: RESOLVED DUPLICATE of bug 171788
Alias: None
Product: uml
Classification: Unclassified
Component: Code Generation (show other bugs)
Version: 6.x
Hardware: All All
: P2 blocker (vote)
Assignee: issues@uml
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-03-14 17:50 UTC by shche123
Modified: 2011-04-14 15:42 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 shche123 2008-03-14 17:50:26 UTC
Code Gen of a UML project generates just one model object.

Need to repeat the request - Code Gen on the project - to get the rest of model objects generated.

Happens 75% of the time. Cannot pin point to when it works and when it does not.

My users have also reported the same issue.
Comment 1 Peter Lam 2008-03-14 21:36:27 UTC
I could not reproduce this issue. Could you provide more detail or a scenario to reproduce this as well as the platform
and jdk version you're using. thanks.
Comment 2 shche123 2008-03-14 22:57:17 UTC
I have seen this issue for the last 12 months with multiple JDKs and NB versions.
One of my users has reported it today with JDK1.6.0_05 NB 6.0.1 on Windows XP.
I have similar configuration and it happens to me at least once a week.
Comment 3 Peter Lam 2008-03-14 23:00:00 UTC
Ok, thanks for the detail. Could you please provide a scenario to reproduce the problem?
Comment 4 shche123 2008-03-14 23:04:17 UTC
Create a UML project
create a couple of Model classes
create a Java project
generate code for UML project
only one class appears in the Java default package
repeat generate from UML project
both classes now appear.
Comment 5 Peter Lam 2008-03-15 00:18:33 UTC
I tried the same scenario you provided a dozen times on both Windows Vista and Windows XP using both NB 6.0 and NB 6.0.1
but could not reproduce the problem. I tried deleting the generated source files before re-generating codes just to make
sure the  correct number of source files got generated. I also tried re-gnerating codes to existing files and confirm
with the output message in the code gen output window to make sure the correct number of files get generated. All worked
well.

When you see this again, please pay attention to the output window to see if the message indicated the correct number of
files generated.
Comment 6 shche123 2008-03-15 04:27:46 UTC
It does display the correct number of files being generated. However, not all are being displayed in the Java project...
Refresh problem? Cache problem?
Comment 7 Peter Lam 2008-03-17 16:55:12 UTC
Ok, thanks for the update. In this case, I'm not sure if it's a refresh problem, but you click on the Files tab next to
the Projects tab. Then, expand the "src" folder from the java project folder to see if the expected file is there. If
so, then it's a refresh problem. Otherwise, it's the code gen that's reporting incorrect output. Could you please verify
this if it happens again. Thanks.
Comment 8 shche123 2008-03-17 21:51:48 UTC
I am assuming that no java source file is generated. But I will double check when this occurs again.
Thanks
Leonid
Comment 9 shche123 2008-05-05 17:58:10 UTC
Just happened again with NB 6.1
Forgot to check whether the java file as been generated by looking at the hard drive...
Comment 10 shche123 2008-05-14 14:04:09 UTC
Just duplicated the issue.
The source file for the second class is visible using the file system - outside of NetBeans.
Projects and Files windows in NetBeans shows only one class out of two.
As I was flipping back and forth between Windows Explorer and NB, NB finally showed the second class. 
So I guess it is a refresh issue, and there is not Refresh button in NB...
Thanks
Comment 11 Joanne Lau 2008-06-18 19:48:59 UTC
Not reproducible in 6.5
Comment 12 Viktor Lapitski 2008-09-16 20:00:05 UTC
it works ok in 6.5. 

Sounds like a some Java Project refresh problem in 6.1. 
If you see it again, please check if the IDE Java Project 
sees added or removed manually through Windows Explorer files  
(i.e. no UML involved), and open new bug for Java Project if it 
reproducible without UML or reopen this one back if it isn't 
reproducible without UML. 
 
Comment 13 Peter Lam 2008-10-04 01:45:08 UTC
not reproducible in NB 6.5
Comment 14 shche123 2008-12-07 14:56:51 UTC
Was able to recreate this issue on the first try of using NetBeans 6.5

All java files are created, but only one out of two appear in the Java project.
Is there a refresh option? Refresh problem?

After closing and reopening the project, both java files are there.

Thanks
Leonid
Comment 15 shche123 2008-12-07 15:06:37 UTC
The same refresh problem occurs when add a package to the class diagram and do nested link from package to the two
classes on the diagram. After Code Gen, only one java source file is listed in the Java project...
Comment 16 Sergey Petrov 2008-12-07 19:31:38 UTC
first saw this bahavior in 7.0, seems to be valid issue. haven't tried in 6.5 yet.
Comment 17 incubos 2009-02-11 13:55:39 UTC
The issue is reproducable.

JDK 1.6.0b10, NetBeans 6.5, Linux Mandriva PowerPack 2009.0 i586.
Comment 18 shche123 2009-08-16 16:17:29 UTC
Happens in NB 6.7.1 every time:
Create a UML project with a class diagram with a couple of classes
Create a Java project
Generate code on UML project to Java project
Output window displays source being generated
Don't see any source in Project window under Source Packages
Don't see any source in Files window under src folder
Swipe path to the src folder from output window and do Start, Run and paste the path to src folder
Windows File Explore window comes up displaying java source files
NetBeans Source Packages folder seems to refresh automatically and displays missing source files.

I have reported this issue over a year ago. Cannot someone figure out how to fix it?

Thanks
Leonid

Comment 19 shche123 2009-08-16 16:42:54 UTC
Getting files to refresh using the Windows Explorer courses other problems, such as the Compile File option being
disabled on the context sensitive menu. And no matter what I try, it does not get enabled.

Closing and reopening the project does not help either. I get other run time errors trying to compile files.

I found that the best way to 'refresh' the project is to restart NB.

It is a bit of a pain, especially when demonstrating NB to my new 'users'.

Comment 20 shche123 2009-09-28 12:04:09 UTC
Is there movement on this issue? I just tried it with 6.8 M1

This issue is very high priority for me.

When I demonstrate UML to my clients and generated code does not appear in the Source Packages, clients are usually not
very impressed ...

Thanks
Leonid
Comment 21 shche123 2009-12-07 05:37:58 UTC
Now none of java source files appear in the Source Packages after initial UML project Code generation. Must restart NB or use Windows explore to browse over the the default package directory and that action refreshes NB Source Packages default package contents.

This issue has been around for about a year. It is frustrating and it is about time it gets fixed.

Thanks
Leonid
Comment 22 javydreamercsw 2011-04-14 15:42:06 UTC
This seems to be another side effect of issue #171788

*** This bug has been marked as a duplicate of bug 171788 ***