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 105996 - Code is not generated with default configuration
Summary: Code is not generated with default configuration
Status: VERIFIED FIXED
Alias: None
Product: uml
Classification: Unclassified
Component: Code Generation (show other bugs)
Version: 6.x
Hardware: All All
: P1 blocker (vote)
Assignee: Craig Conover
URL:
Keywords: REGRESSION
Depends on:
Blocks:
 
Reported: 2007-06-07 11:23 UTC by Alexandr Scherbatiy
Modified: 2007-06-13 07:10 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-07 11:23:05 UTC
build: netbeans-hudson-trunk-378-full.zip

Steps to reproduce:
- Create UML Java-Platform Model project
- Create a Class diagram
- Put a Class element on the diagram and name It
- Generate code for the project
  Java code is not generated.
Comment 1 Peter Lam 2007-06-08 21:25:47 UTC
The output window indicated that code generation was completed successfully but
the source directory is empty and Navigate to Source menu item is not available.
Comment 2 Viktor Lapitski 2007-06-09 02:05:06 UTC
the prepackaged configuration doesn't work.
One would need manually configure templates as follows:
- goto Options->UML->Domain Templates
- remove existing row(s)
- add a row with
"{name}", "java, "", "CompilationUnit.java"  fields
- OK, Apply, OK.

Goto Properties of the UML project the code should be generated from. In Domain
Templates
check boxes for Java -> Class/Interface/Enum nodes. OK.
 
Comment 3 Peter Lam 2007-06-12 00:52:50 UTC
Using build netbeans-hudson-trunk-582-full.zip (070611) on Linux and Mac OSX,
code generation still doesn't work with workaround. I got the following message
from the output window. There's no exception in the log file.

Begin processing Generate Code: 4 items

Code Generation selected options:
  Source Folder Location -  /export/petersl/hydra/projects/JavaApplication1/src
  Backup Sources - true
  Generate Markers - true

Processing element 1 of 4: Class bankpack::BankAccount ... ERROR: No templates
defined for the element
Processing element 2 of 4: Interface bankpack::Bank ... ERROR: No templates
defined for the element
Processing element 3 of 4: Class bankpack::Checking ... ERROR: No templates
defined for the element
Processing element 4 of 4: Class bankpack::AccountTest ... ERROR: No templates
defined for the element

================================
Task Successful (total time: 0 seconds)
Comment 4 Craig Conover 2007-06-13 00:26:52 UTC
Cleaned up the TemplateFamilies.etc file so that the defaults are valid and only include the Java family and Class,
Interface, and Enumeration Domain template options.

And when a UML project is created, those templates are added to the project.properties file so that they are enabled for
code generation.

Must clear the user directory for this to work with new code adjustments.
Comment 5 Peter Lam 2007-06-13 07:10:04 UTC
verified in netbeans-hudson-trunk-635-full.zip (070613) that code is now generated for default config.