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 99447

Summary: Allow users to override the code generation for a method, and attribute
Product: uml Reporter: Trey Spiva <tspiva>
Component: SynchronizationAssignee: Viktor Lapitski <lvv>
Status: VERIFIED FIXED    
Severity: blocker    
Priority: P2    
Version: 6.x   
Hardware: All   
OS: All   
Issue Type: ENHANCEMENT Exception Reporter:

Description Trey Spiva 2007-03-29 19:57:58 UTC
There will also be times when the user may want to override the code that is generated by the 
templates.  To give the user the ability to override the code that is generated for a section of the source 
code, some sort of annotation will be used.  The annotation may not be a Java Annotation, since Java 
annotations requires a Annotation declaration in order to compile the source code.  Since users may not 
want there Java project to contain this extra declaration, it may be best to use Javadoc tags.

{{{
public class MyClass
{
    /**
     * @generated
     */
   public void foo()
   {
      <Some Method Details>
   }
}
}}}

In the above example demostrates a Java method that is generated by the code generation mechanism.  
The source code synchronization process will replace the entire method '''foo'', when synchronizing the 
source code.  To override the implementation of '''foo''', the @generated tag must removed.  The source 
code synchronization process will no longer replace the '''foo''' method during code generation.
Comment 1 Trey Spiva 2007-06-01 22:27:52 UTC
The feature is implemented
Comment 2 Alexandr Scherbatiy 2007-06-14 13:37:20 UTC
verified in netbeans-hudson-trunk-702-full.zip