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 - Allow users to override the code generation for a method, and attribute
Summary: Allow users to override the code generation for a method, and attribute
Status: VERIFIED FIXED
Alias: None
Product: uml
Classification: Unclassified
Component: Synchronization (show other bugs)
Version: 6.x
Hardware: All All
: P2 blocker with 1 vote (vote)
Assignee: Viktor Lapitski
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-03-29 19:57 UTC by Trey Spiva
Modified: 2007-06-14 13:37 UTC (History)
0 users

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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